Bug #68359 | Packets Out Of Order | ||
---|---|---|---|
Submitted: | 13 Feb 2013 10:32 | Modified: | 15 Feb 2013 9:28 |
Reporter: | James Hill | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.6.10 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[13 Feb 2013 10:32]
James Hill
[13 Feb 2013 21:18]
MySQL Verification Team
Why do you assume this is a bug?
[13 Feb 2013 23:09]
James Hill
Well, I assumed that we would be able to call stored procedures returning recordsets without getting packets out of order or malformed in 5.6? If I'm doing something wrong then it would be great if you could suggest something I can change....I would much rather it was my mistake and not a bug, simpler to fix! Something somewhere has changed between 5.1 and 5.6 as the same code calling the same stored procedure accessing the same data is now throwing an error. Thanks in advance
[15 Feb 2013 8:45]
MySQL Verification Team
stored procedures return multiple resultsets, so you have to fetch them all. Nice example in the manual here, check if it works better: http://php.net/manual/en/mysqli.quickstart.stored-procedures.php
[15 Feb 2013 9:28]
James Hill
Thanks so much Shane, I hate to think how many hours I wasted on this! Sorry for raising an issue that wasn't a bug, but hopefully this will help someone else as well. Here is the working code: $stmt = $link->stmt_init(); $result = $stmt->prepare("call $query($argstr)"); $bindParameters($args); $stmt->execute(); do { $result = $stmt->get_result(); var_dump($result->fetch_all()); $result->free(); } while ($this->stmt->more_results() && $this->stmt->next_result());
[15 Feb 2013 9:41]
MySQL Verification Team
No problem, glad to help :)