php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46257 Compile fails when building against versions before MySql 4.1.1
Submitted: 2008-10-08 19:27 UTC Modified: 2008-10-27 12:33 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: binarycleric at gmail dot com Assigned: andrey (profile)
Status: Closed Package: MySQL related
PHP Version: 5.3.0alpha2 OS: CentOS 5.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: binarycleric at gmail dot com
New email:
PHP Version: OS:

 

 [2008-10-08 19:27 UTC] 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[]
  */


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-24 16:22 UTC] 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-27 12:33 UTC] andrey@php.net
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!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 20:01:35 2024 UTC