ID:               39858
 Comment by:       mike at we11er dot co dot uk
 Reported By:      develar at gmail dot com
 Status:           Assigned
 Bug Type:         PDO related
 Operating System: Windows XP SP2
 PHP Version:      5.2.0
 Assigned To:      wez
 New Comment:

I'm having this issue as well.

My bug report here: http://bugs.php.net/bug.php?id=39759 has some more
information. To recap:

I've tested this with php 5.2 release, as well as various recent
snapshots. I've tested with mysql 5.0.22 and 5.0.27. I've tested with
the libmysql.dll files that php ships with, as well as the libmysql.dll
that mysql ships with - they produce two different errors but the
problem is the same.

When using PHP's libmysql.dll the error is: SQLSTATE[HY000]:
General error: 2013 Lost connection to MySQL server during query

When using MySQL's libmysql.dll the error is: SQLSTATE[HY000]: General
error: 2014 Cannot execute queries while other
unbuffered queries are active.

When running through apache I get this error 100% of the time. When
running through the PHP command line interface, I get it about 50% of
the time, so perhaps there are performance issues here. I'm running on
a celeron 2.4GHz with 512 ram. Windows XP.

Please fix this!


Previous Comments:
------------------------------------------------------------------------

[2006-12-18 09:28:00] develar at gmail dot com

Почитайте
http://phpclub.ru/talk/showthread.php?s=&threadid=92764&rand=10

It always worked normally on linux. My first message: "I read #35333
#35637 #35203, but why the given code
fine works in Debian?" Only in windows.

------------------------------------------------------------------------

[2006-12-18 09:20:54] [EMAIL PROTECTED]

Works just fine on Linux.
Make sure you're really running the snapshot.

------------------------------------------------------------------------

[2006-12-18 08:43:52] develar at gmail dot com

It is not fixed.

------------------------------------------------------------------------

[2006-12-18 08:34:30] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip



------------------------------------------------------------------------

[2006-12-17 14:30:25] develar at gmail dot com

Description:
------------
The second call stored procedures causes an error "SQLSTATE[HY000]:
General error: 2013 Lost connection to MySQL server during query" with
probability of 50%. I read #35333 #35637 #35203, but why the given code
fine works in Debian?

Reproduce code:
---------------
CREATE PROCEDURE `foo`()
    NOT DETERMINISTIC
    CONTAINS SQL
    SQL SECURITY DEFINER
    COMMENT ''
BEGIN
     SELECT 2 * 2;
END;

<?php

$Db = new PDO('mysql:host=localhost;dbname=test', 'root', '',
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'",
PDO::ATTR_PERSISTENT => true));
$Db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
$Db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);

$Pdo = $Db->prepare('CALL foo()');
$Pdo->execute();
print_r($Pdo->fetchAll());

$Pdo = $Db->prepare('CALL foo()');
$Pdo->execute();
print_r($Pdo->fetchAll());
$Pdo->closeCursor();

?>

Expected result:
----------------
Array
(
    [0] => Array
        (
            [2 * 2] => 4
        )

)
Array
(
    [0] => Array
        (
            [2 * 2] => 4
        )

)


Actual result:
--------------
Array
(
    [0] => Array
        (
            [2 * 2] => 4
        )

)
<br />
<b>Warning</b>:  PDOStatement::execute() [<a
href='function.PDOStatement-execute'>function.PDOStatement-execute</a>]:
SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server
during query in <b>C:\home\test\www\pdo.php</b> on line <b>12</b><br
/>
Array
(
)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39858&edit=1

Reply via email to