#46257 [NEW]: Compile fails when building against versions before MySql 4.1.1
| From: | binarycleric at gmail dot com | Date: | Wed, 08 Oct 2008 19:27:22 +0000 |
| Subject: | #46257 [NEW]: Compile fails when building against versions before MySql 4.1.1 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-129567@lists.php.net to get a copy of this message | ||
From: binarycleric at gmail dot com
Operating system: CentOS 5.2
PHP version: 5.3.0alpha2
PHP Bug Type: Compile Failure
Bug description: Compile fails when building against versions before MySql 4.1.1
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 bug report at http://bugs.php.net/?id=46257&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46257&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46257&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46257&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46257&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=46257&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46257&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46257&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46257&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46257&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46257&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46257&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46257&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46257&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46257&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46257&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46257&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46257&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46257&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46257&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46257&r=mysqlcfg