Bug #3208
closedLighttpd 1.4.70's `src/mod_vhostdb_mysql.c` change is incompatible with MySQL 8
Description
Hi there!
It seems that the changes made in Lighttpd 1.4.70's `src/mod_vhostdb_mysql.c` file is incompatible with MySQL version 8, as the MySQL headers no longer exposes the `mysql_get_socket` function; however, I do confirm that it compiles with no issues with MariaDB 10.11.
Enviornment: Debian 11 64Bit, Clang+LLVM 16.0.4, MySQL 8.0.33 / MariaDB 10.11.3.
Commit: https://github.com/lighttpd/lighttpd1.4/commit/abaf0a5f4d17206340f54420558fc7dfaae62e4f
```
117 - fdevent_setfd_cloexec(dbconn->net.fd);
117 + my_socket sfd = mysql_get_socket(dbconn);
118 + (void)fdevent_socket_set_cloexec(sfd);
```
Thank you and hope you have a great day!
Updated by gstrauss over 1 year ago
- Status changed from New to Patch Pending
- Target version changed from 1.4.xx to 1.4.71
Thanks for reporting that. Does this work for you with MySQL?
--- a/src/mod_vhostdb_mysql.c +++ b/src/mod_vhostdb_mysql.c @@ -114,7 +114,11 @@ static int mod_vhostdb_dbconf_setup (server *srv, const array *opts, void **vdat return -1; } + #ifdef LIBMARIADB my_socket sfd = mysql_get_socket(dbconn); + #else + my_socket sfd = dbconn->net.fd; + #endif (void)fdevent_socket_set_cloexec(sfd); dbconf = (vhostdb_config *)ck_calloc(1, sizeof(*dbconf));
Updated by co over 1 year ago
gstrauss wrote in #note-1:
Thanks for reporting that. Does this work for you with MySQL?
[...]
Hi gstrauss!
Thank you so very much for your help! I confirm after applying the patch, Lighttpd compiles with no issues against MySQL 8.0.33!
Hope you have a wonderful day!
Regards
Updated by gstrauss over 1 year ago
- Status changed from Patch Pending to Fixed
Applied in changeset 94595bf483030b876a75e512c9914ec38afc95de.
Also available in: Atom