mirror of
https://github.com/php/php-src.git
synced 2024-12-12 11:23:53 +08:00
MFB: #37630 MySQL extensions should link against thread safe client libs if built with ZTS
This commit is contained in:
parent
8c04c51f9b
commit
1ba7a6812c
@ -86,7 +86,11 @@ if test "$PHP_MYSQL" != "no"; then
|
|||||||
Note that the MySQL client library is not bundled anymore!])
|
Note that the MySQL client library is not bundled anymore!])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MYSQL_LIBNAME=mysqlclient
|
if test "$enable_maintainer_zts" = "yes"; then
|
||||||
|
MYSQL_LIBNAME=mysqlclient_r
|
||||||
|
else
|
||||||
|
MYSQL_LIBNAME=mysqlclient
|
||||||
|
fi
|
||||||
case $host_alias in
|
case $host_alias in
|
||||||
*netware*[)]
|
*netware*[)]
|
||||||
MYSQL_LIBNAME=mysql
|
MYSQL_LIBNAME=mysql
|
||||||
|
@ -385,13 +385,6 @@ ZEND_MODULE_STARTUP_D(mysql)
|
|||||||
REGISTER_LONG_CONSTANT("MYSQL_CLIENT_INTERACTIVE", CLIENT_INTERACTIVE, CONST_CS | CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("MYSQL_CLIENT_INTERACTIVE", CLIENT_INTERACTIVE, CONST_CS | CONST_PERSISTENT);
|
||||||
REGISTER_LONG_CONSTANT("MYSQL_CLIENT_IGNORE_SPACE", CLIENT_IGNORE_SPACE, CONST_CS | CONST_PERSISTENT);
|
REGISTER_LONG_CONSTANT("MYSQL_CLIENT_IGNORE_SPACE", CLIENT_IGNORE_SPACE, CONST_CS | CONST_PERSISTENT);
|
||||||
|
|
||||||
|
|
||||||
#ifdef ZTS
|
|
||||||
# if MYSQL_VERSION_ID >= 40000
|
|
||||||
mysql_thread_init();
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
@ -400,12 +393,6 @@ ZEND_MODULE_STARTUP_D(mysql)
|
|||||||
*/
|
*/
|
||||||
PHP_MSHUTDOWN_FUNCTION(mysql)
|
PHP_MSHUTDOWN_FUNCTION(mysql)
|
||||||
{
|
{
|
||||||
#ifdef ZTS
|
|
||||||
# if MYSQL_VERSION_ID >= 40000
|
|
||||||
mysql_thread_end();
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
UNREGISTER_INI_ENTRIES();
|
UNREGISTER_INI_ENTRIES();
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,13 @@ dnl fi
|
|||||||
MYSQL_CONFIG=$PHP_MYSQLI
|
MYSQL_CONFIG=$PHP_MYSQLI
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
MYSQL_LIB_NAME='mysqlclient'
|
||||||
if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then
|
if test "$PHP_EMBEDDED_MYSQLI" = "yes"; then
|
||||||
AC_DEFINE(HAVE_EMBEDDED_MYSQLI, 1, [embedded MySQL support enabled])
|
AC_DEFINE(HAVE_EMBEDDED_MYSQLI, 1, [embedded MySQL support enabled])
|
||||||
MYSQL_LIB_CFG='--libmysqld-libs'
|
MYSQL_LIB_CFG='--libmysqld-libs'
|
||||||
|
elif test "$enable_maintainer_zts" = "yes"; then
|
||||||
|
MYSQL_LIB_CFG='--libs_r'
|
||||||
|
MYSQL_LIB_NAME='mysqlclient_r'
|
||||||
else
|
else
|
||||||
MYSQL_LIB_CFG='--libs'
|
MYSQL_LIB_CFG='--libs'
|
||||||
fi
|
fi
|
||||||
@ -40,12 +44,12 @@ dnl fi
|
|||||||
dnl
|
dnl
|
||||||
dnl Check the library
|
dnl Check the library
|
||||||
dnl
|
dnl
|
||||||
PHP_CHECK_LIBRARY(mysqlclient, mysql_set_server_option,
|
PHP_CHECK_LIBRARY($MYSQL_LIB_NAME, mysql_set_server_option,
|
||||||
[
|
[
|
||||||
PHP_EVAL_INCLINE($MYSQLI_INCLINE)
|
PHP_EVAL_INCLINE($MYSQLI_INCLINE)
|
||||||
PHP_EVAL_LIBLINE($MYSQLI_LIBLINE, MYSQLI_SHARED_LIBADD)
|
PHP_EVAL_LIBLINE($MYSQLI_LIBLINE, MYSQLI_SHARED_LIBADD)
|
||||||
AC_DEFINE(HAVE_MYSQLILIB,1,[ ])
|
AC_DEFINE(HAVE_MYSQLILIB,1,[ ])
|
||||||
PHP_CHECK_LIBRARY(mysqlclient, mysql_stmt_field_count,
|
PHP_CHECK_LIBRARY($MYSQL_LIB_NAME, mysql_stmt_field_count,
|
||||||
[ ],[
|
[ ],[
|
||||||
AC_MSG_ERROR([MySQLI doesn't support versions < 4.1.3 (for MySQL 4.1.x) and < 5.0.1 for (MySQL 5.0.x) anymore. Please update your libraries.])
|
AC_MSG_ERROR([MySQLI doesn't support versions < 4.1.3 (for MySQL 4.1.x) and < 5.0.1 for (MySQL 5.0.x) anymore. Please update your libraries.])
|
||||||
],[$MYSQLI_LIBLINE])
|
],[$MYSQLI_LIBLINE])
|
||||||
|
Loading…
Reference in New Issue
Block a user