Bug #61207 [Com]: PDO::nextRowset() after a multi-statement query doesn't always work

From: Date: Wed, 15 Jun 2022 09:23:23 +0000
Subject: Bug #61207 [Com]: PDO::nextRowset() after a multi-statement query doesn't always work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241737@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61207&edit=1 ID: 61207 Comment by: biagiopas at yahoo dot it Reported by: acabal at ucla dot edu Summary: PDO::nextRowset() after a multi-statement query doesn't always work Status: Closed Type: Bug Package: PDO related Operating System: Ubuntu 11.10 64-bit PHP Version: 5.4.0RC8 Assigned To: mysql Block user comment: N Private report: N New Comment: $statement = $connection->query($sql_multiquery); //check for errors do { } while ($statement->nextRowset()); I noticed that $statement->nextRowset() closes the current transaction, so if something went wrong you can't rollBack Previous Comments: ------------------------------------------------------------------------ [2014-05-16 17:02:48] norbert at linuxnetworks dot de The fix might have introduced another problem. Executing a SQL query with multiple select statements won't return two result sets: select * from testtable; select * from testtable It also doesn't matter if both statements are the same. This SQL string doesn't work also: select * from testtable; select * from testtable where 1 PHP 5.3.10 works fine, later versions up to 5.3.27 won't. The result using PHP 5.4.27 and 5.5.11 is also OK and both result sets are returned. ------------------------------------------------------------------------ [2013-11-17 09:33:25] laruence@php.net Automatic comment on behalf of johannes Revision: http://git.php.net/?p=php-src.git;a=commit;h=5c896b344a761c597a2decda14e25375f3b69ef3 Log: Fix Bug #61207 PDO::nextRowset() after a multi-statement query doesn't always work ------------------------------------------------------------------------ [2012-07-24 23:36:49] rasmus@php.net Automatic comment on behalf of johannes Revision: http://git.php.net/?p=php-src.git;a=commit;h=5c896b344a761c597a2decda14e25375f3b69ef3 Log: Fix Bug #61207 PDO::nextRowset() after a multi-statement query doesn't always work ------------------------------------------------------------------------ [2012-04-18 09:45:37] laruence@php.net Automatic comment on behalf of johannes Revision: http://git.php.net/?p=php-src.git;a=commit;h=5c896b344a761c597a2decda14e25375f3b69ef3 Log: Fix Bug #61207 PDO::nextRowset() after a multi-statement query doesn't always work ------------------------------------------------------------------------ [2012-03-05 23:38:29] johannes@php.net This bug has been fixed in SVN. 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61207 -- Edit this bug report at https://bugs.php.net/bug.php?id=61207&edit=1

« previous php.bugs (#241737) next »