From: jille at hexon dot cx Operating system: Linux PHP version: 5.3.0 PHP Bug Type: MySQL related Bug description: mysql_info() hides warnings for single-row INSERT's
Description: ------------ mysql_info() returns false when inserting only one row. This results in the unability to retreive the number of warnings which might have occurred. if $numWarnings > 0 I would like to retreive the warnings with mysql_query("SHOW WARNINGS"); but I'd prefer not doing that if there are no warnings. Reproduce code: --------------- mysql_query("CREATE TABLE a (a VARCHAR(4))"); mysql_query("INSERT INTO a (a) VALUES ('abcde')"); var_dump(mysql_info()); Expected result: ---------------- Just like the mysql-CLI: mysql> INSERT INTO a (a) VALUES ('abcde'); Query OK, 1 row affected, 1 warning (0.01 sec) so something like "1 row affected, 1 warning" would be perfect Actual result: -------------- bool(false) -- Edit bug report at http://bugs.php.net/?id=49562&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49562&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49562&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49562&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49562&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49562&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49562&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49562&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49562&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49562&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49562&r=support Expected behavior: http://bugs.php.net/fix.php?id=49562&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49562&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49562&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49562&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49562&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49562&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49562&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49562&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49562&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49562&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49562&r=mysqlcfg