Bug #66624 [NEW]: Bug? Don't return the results of all sentences SQL
From: bspbsp15 at gmail dot com
Operating system: Windows 7 SP1 x32
PHP version: 5.5.8
Package: MySQLi related
Bug Type: Bug
Bug description:Bug? Don't return the results of all sentences SQL
Description:
------------
---
From manual page: http://www.php.net/mysqli.multi-query
---
If you put in multi_query() 3 SQL sentences for example: Valid1;
Non-valid2; Valid3; only you get results of the first SQl sentence.
¿Is a bug or its my conceptual error?
Test script:
---------------
$query = 'Valid SQL sentence;';
$query .= 'NON valid SQL sentence;'; //For example: Incorrect table.
$query .= 'Valid SQL sentence;';
$mysqli->multi_query($query);
$mysqli->next_result(); //Returns TRUE, ok (valid SQL
sentence)
$result = $mysqli->store_result();
$row = $result->fetch_assoc();
var_dump($row[0]);
$mysqli->next_result(); //Returns FALSE, Ok (non valid SQL
sentence)
$mysqli->next_result(); //Returns FALSE, but is a valid SQL
sentence
$result = $mysqli->store_result();
$row = $result->fetch_assoc();
var_dump($row[0]);
Expected result:
----------------
In the second evaluation $mysqli->next_result() returns FALSE because is
a non-valid SQL sentece is OK, but if you try to get the results of the
next valid SQL sentence you can't, if you try to evaluate again retuns
FALSE again.
--
Edit bug report at https://bugs.php.net/bug.php?id=66624&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66624&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66624&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66624&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66624&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66624&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66624&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66624&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66624&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66624&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66624&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66624&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66624&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66624&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66624&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66624&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66624&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66624&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66624&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66624&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66624&r=mysqlcfg
Thread (2 messages)
- bspbsp15 at gmail dot com