Bug #61075 Packets out of order
Submitted: 6 May 2011 1:40 Modified: 6 May 2011 13:39
Reporter: igor popov Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.5.11 OS:Microsoft Windows ((server 2008 x64))
Assigned to: CPU Architecture:Any

[6 May 2011 1:40] 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
[6 May 2011 13:39] MySQL Verification Team
Duplicate of bug: http://bugs.mysql.com/bug.php?id=61072.