Bug #61072 Packets out of order
Submitted: 5 May 2011 15:19 Modified: 18 Jun 2011 16:22
Reporter: igor popov Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.9/5.5.11 OS:Windows (server 2008 x64)
Assigned to: CPU Architecture:Any

[5 May 2011 15:19] igor popov
Description:
Hi.
I use php ext/mysqli and try execute (from script) query:
$sth_rash_get = $dbh->prepare("select r.itog,
                                      r.per,                                            case r.per when 1 then 'единоразово' when 2 then 'ежегодно' when 3 then 'ежеквартально' when 4 then 'ежемесячно' when 5 then 'ежедневно' end as               per_info,n.name,r.rascomm,round(r.val, 2) as val,
case r.type when 1 then 'руб' when 2 then '$' when 6 then '€' when 7 then 'фр' when 8 then '¥' when 555 then '%' end as type,
r.min,r.max
from bus_rash r,
bus_rname n
where r.name = n.id 
and (r.id_int = ? or (r.id_int = 0 and r.id_prg = ?))                                     order by r.itog desc, r.per, n.name");
  if ($sth_rash_get)
          {
            $sth_rash_get->bind_param("ii", $row["i_id"], $row["p_id"]);
            $sth_rash_get->execute() or die(mysqli_error($dbh));
            $sth_rash_get->bind_result($rg_itog, $rg_per, $per_info, $rg_name, $rg_rascomm, $rg_val, $rg_type, $rg_min, $rg_max);

It gave me error:
PHP Warning:  Packets out of order. Expected 1 received 0. Packet size=0 in C:\inetpub\phpsites\bankex.ru\vsbkru\bus\allinfo.php on line 1455
PHP Warning:  mysqli_stmt::execute() [<a href='mysqli-stmt.execute'>mysqli-stmt.execute</a>]: MySQL server has gone away in C:\inetpub\phpsites\bankex.ru\vsbkru\bus\allinfo.php on line 1455
PHP Warning:  mysqli_stmt::execute() [<a href='mysqli-stmt.execute'>mysqli-stmt.execute</a>]: Error reading result set's header in C:\inetpub\phpsites\bankex.ru\vsbkru\bus\allinfo.php on line 1455

How to repeat:
Setup mysql server on ms windows server 2008 x64
use fastCgi and php 5.2 with exp/mysqli
[5 May 2011 15:24] MySQL Verification Team
Thank you for the bug report. Your version 5.0.9 is quite older please try version 5.0.92. Thanks.

http://dev.mysql.com/downloads/mysql/5.0.html
[6 May 2011 0:48] igor popov
I try also execute this query on mysql 5.5, but the result remained the same.
[18 May 2011 16:22] Valeriy Kravchuk
Please, check if there is something unusual in server's error log for the moment when you run this SELECT. 

Also, please, send the results of EXPLAIN for the SELECT, with parameters substituted by some typical values.
[18 May 2011 16:22] Valeriy Kravchuk
Please, check if there is something unusual in server's error log for the moment when you run this SELECT. 

Also, please, send the results of EXPLAIN for the SELECT, with parameters substituted by some typical values.
[18 Jun 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".