package: php5-mysql
severity: wishlist
tags: patch
Dear php maintainers,
as you might know, apr-util added support for mysql recently. However,
this feature cannot be activated yet, since it would make libaprutil
link against libmysqlclient_r while php-mysql links against
libmysqlclient. Unfortunately, libmysqlclient_r and libmysqlclient
use the same symbol versions and cannot safely be used together in
the same process.
While mysql might change the symbol versioning in the future (see
#450535), it is unlikely that this will happen in time for lenny.
Therefore, I ask you to change php5-mysql to link against
libmysqlclient_r instead of libmysqlclient (patch attached).
There are some '#ifdef ZTS's in the code, but if I read the code
and [1] correctly, this is only necessary if a thread that is calling
MySQL functions did not create the connection to the MySQL database.
Since this cannot happen in single threaded php, it should be safe to
just change the linkage without any code changes.
With the patch, at least the mysql extension seems to work ok (but I
don't know how to test mysqli and pdo_mysql).
It would be nice if you could make this change soon, so that it
receives enough testing before lenny release.
Cheers,
Stefan
[1] http://dev.mysql.com/doc/refman/5.0/en/threaded-clients.html
Index: php5-5.2.5/ext/mysql/config.m4
===================================================================
--- php5-5.2.5.orig/ext/mysql/config.m4 2008-03-01 21:03:07.000000000 +0100
+++ php5-5.2.5/ext/mysql/config.m4 2008-03-01 21:03:36.000000000 +0100
@@ -86,7 +86,7 @@
Note that the MySQL client library is not bundled anymore!])
fi
- if test "$enable_maintainer_zts" = "yes"; then
+ if true || test "$enable_maintainer_zts" = "yes"; then
MYSQL_LIBNAME=mysqlclient_r
else
MYSQL_LIBNAME=mysqlclient
Index: php5-5.2.5/ext/mysqli/config.m4
===================================================================
--- php5-5.2.5.orig/ext/mysqli/config.m4 2008-03-01 21:03:07.000000000 +0100
+++ php5-5.2.5/ext/mysqli/config.m4 2008-03-01 21:03:58.000000000 +0100
@@ -26,7 +26,7 @@
if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then
AC_DEFINE(HAVE_EMBEDDED_MYSQLI, 1, [embedded MySQL support enabled])
MYSQL_LIB_CFG='--libmysqld-libs'
- elif test "$enable_maintainer_zts" = "yes"; then
+ elif true || test "$enable_maintainer_zts" = "yes"; then
MYSQL_LIB_CFG='--libs_r'
MYSQL_LIB_NAME='mysqlclient_r'
else
Index: php5-5.2.5/ext/pdo_mysql/config.m4
===================================================================
--- php5-5.2.5.orig/ext/pdo_mysql/config.m4 2008-03-01 21:03:07.000000000 +0100
+++ php5-5.2.5/ext/pdo_mysql/config.m4 2008-03-01 21:03:50.000000000 +0100
@@ -58,7 +58,7 @@
if test "x$SED" = "x"; then
AC_PATH_PROG(SED, sed)
fi
- if test "$enable_maintainer_zts" = "yes"; then
+ if true || test "$enable_maintainer_zts" = "yes"; then
PDO_MYSQL_LIBNAME=mysqlclient_r
PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs_r | $SED -e "s/'//g"`
else