#46257 [Asn->Csd]: Compile fails when building against versions before MySql 4.1.1
ID: 46257
Updated by: andrey@php.net
Reported By: binarycleric at gmail dot com
-Status: Assigned
+Status: Closed
Bug Type: MySQL related
Operating System: CentOS 5.2
PHP Version: 5.3.0alpha2
Assigned To: andrey
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fix will be in alpha3. Thank you for testing!
Previous Comments:
------------------------------------------------------------------------
[2008-10-24 16:22:12] jani@php.net
Andrey, seems like this broke the build:
revision 1.260
date: 2008/07/15 13:12:27; author: andrey; state: Exp; lines: +23
-4
Sync with bzr
------------------------------------------------------------------------
[2008-10-08 19:27:22] binarycleric at gmail dot com
Description:
------------
When trying to compile PHP 5.3 Alpha2 against MySQL 4.0.21 the build
would fail because a number of DEFINES and functions were not available
in that version.
A diff of my (semi-hack) fix is included.
Reproduce code:
---------------
--- php-5.3.0alpha2/ext/mysql/php_mysql.c 2008-08-06 15:25:03.000000000
-0400
+++ php-5.3.0alpha2-PATCHED/ext/mysql/php_mysql.c 2008-10-08
14:40:40.000000000 -0400
@@ -130,10 +130,23 @@
static MYSQLND_QCACHE *mysql_mysqlnd_qcache;
#endif
+
+#ifndef CLIENT_MULTI_STATEMENTS
+# define CLIENT_MULTI_STATEMENTS 0
+#endif
+
+#ifndef MYSQL_OPTION_MULTI_STATEMENTS_OFF
+# define MYSQL_OPTION_MULTI_STATEMENTS_OFF 0
+#endif
+
+#if MYSQL_VERSION_ID >= 40101
#define MYSQL_DISABLE_MQ if (mysql->multi_query) { \
mysql_set_server_option(mysql->conn,
MYSQL_OPTION_MULTI_STATEMENTS_OFF); \
mysql->multi_query = 0; \
}
+#else
+#define MYSQL_DISABLE_MQ
+#endif
/* {{{ mysql_functions[]
*/
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46257&edit=1
Thread (3 messages)