#33090 [NEW]: mysql_prepare doesn't return an error

From: Date: Sat, 21 May 2005 08:37:27 +0000
Subject: #33090 [NEW]: mysql_prepare doesn't return an error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79303@lists.php.net to get a copy of this message
From: georg@php.net Operating system: all PHP version: 5.0.4 PHP Bug Type: MySQLi related Bug description: mysql_prepare doesn't return an error Description: ------------ In later versions of libmysqlclient 4.1 and 5.0 the api call mysql_stmt_close also clears mysql->net.error* values. This affects that mysql_prepare doesn't return an error with current version of libmysql. Reproduce code: --------------- <?php $mysql = new mysqli("localhost", "user", "password", "test"); if (!($stmt = $mysql->prepare("this will never work"))) { printf("Error: %s\n", $mysql->error); } $mysql->close(); ?> Expected result: ---------------- Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'this will never work' at line 1 Actual result: -------------- Error: -- Edit bug report at http://bugs.php.net/?id=33090&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33090&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33090&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33090&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33090&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33090&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33090&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33090&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33090&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33090&r=support Expected behavior: http://bugs.php.net/fix.php?id=33090&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33090&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33090&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33090&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33090&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33090&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33090&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33090&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33090&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33090&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33090&r=mysqlcfg

« previous php.bugs (#79303) next »