#19159 [Opn->Csd]: Incorrect MySQL version test for mysql_field_count
| From: | sniper@php.net | Date: | Thu, 29 Aug 2002 01:18:36 +0000 |
| Subject: | #19159 [Opn->Csd]: Incorrect MySQL version test for mysql_field_count | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18104@lists.php.net to get a copy of this message | ||
ID: 19159
Updated by: sniper@php.net
Reported By: cag@us.ibm.com
-Status: Open
+Status: Closed
Bug Type: MySQL related
Operating System: N/A
PHP Version: 4.2.2
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, 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/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-08-28 18:32:20] cag@us.ibm.com
According to MySQL documentation
(http://www.mysql.com/doc/en/mysql_field_count.html), mysql_field_count
became available in version 3.22.24. The test within php_mysql.c tests
for versions prior to 3.22.23 instead of 3.22.24. Anyone using 3.22.23
will have linker errors with the referenced symbol not being found.
Below is a patch to correct the version test.
*** php_mysql.c.orig Wed Aug 28 16:55:24 2002
--- php_mysql.c Wed Aug 28 16:55:32 2002
***************
*** 103,109 ****
#define MYSQL_USE_RESULT 0
#define MYSQL_STORE_RESULT 1
! #if MYSQL_VERSION_ID < 32223
#define PHP_MYSQL_VALID_RESULT(mysql) \
(mysql_num_fields(mysql)>0)
#else
--- 103,109 ----
#define MYSQL_USE_RESULT 0
#define MYSQL_STORE_RESULT 1
! #if MYSQL_VERSION_ID < 32224
#define PHP_MYSQL_VALID_RESULT(mysql) \
(mysql_num_fields(mysql)>0)
#else
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19159&edit=1