#19159 [NEW]: Incorrect MySQL version test for mysql_field_count

From: Date: Wed, 28 Aug 2002 22:32:20 +0000
Subject: #19159 [NEW]: Incorrect MySQL version test for mysql_field_count
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18091@lists.php.net to get a copy of this message
From: cag@us.ibm.com Operating system: N/A PHP version: 4.2.2 PHP Bug Type: MySQL related Bug description: Incorrect MySQL version test for mysql_field_count 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 bug report at http://bugs.php.net/?id=19159&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19159&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19159&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19159&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19159&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19159&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19159&r=support Expected behavior: http://bugs.php.net/fix.php?id=19159&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19159&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19159&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19159&r=globals

« previous php.bugs (#18091) next »