PHP  
 PHP_5_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Expected Test Failure Report for ext/pdo_mysql/tests/bug_pecl_7976.phpt ('PECL Bug #7976 (Calling stored procedure several times)')

Script

1: <?php
2:
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR 'mysql_pdo_test.inc');
3:
$db MySQLPDOTest::factory();
4:
5: function 
bug_pecl_7976($db) {
6:
7:     
$db->exec('DROP PROCEDURE IF EXISTS p');
8:     
$db->exec('CREATE PROCEDURE p() BEGIN SELECT "1" AS _one; END;');
9:
10:     
$stmt $db->query('CALL p()');
11:     
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
12:     
$stmt->closeCursor();
13:
14:     
$stmt $db->query('CALL p()');
15:     
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
16:     
$stmt->closeCursor();
17:
18: }
19:
20:
printf("Emulated...\n");
21:
$db MySQLPDOTest::factory();
22:
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES1);
23:
bug_pecl_7976($db);
24:
25:
printf("Native...\n");
26:
$db MySQLPDOTest::factory();
27:
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES0);
28:
bug_pecl_7976($db);
29:
30: print 
"done!";
31:
?>
32:

Expected

Emulated...
array(1) {
  [0]=>
  array(1) {
    [%u|b%"_one"]=>
    %unicode|string%(1) "1"
  }
}
array(1) {
  [0]=>
  array(1) {
    [%u|b%"_one"]=>
    %unicode|string%(1) "1"
  }
}
Native...
array(1) {
  [0]=>
  array(1) {
    [%u|b%"_one"]=>
    %unicode|string%(1) "1"
  }
}
array(1) {
  [0]=>
  array(1) {
    [%u|b%"_one"]=>
    %unicode|string%(1) "1"
  }
}
done!

Output

Emulated...
array(1) {
  [0]=>
  array(1) {
    ["_one"]=>
    string(1) "1"
  }
}
array(1) {
  [0]=>
  array(1) {
    ["_one"]=>
    string(1) "1"
  }
}
Native...
array(1) {
  [0]=>
  array(1) {
    ["_one"]=>
    string(1) "1"
  }
}

Warning: Packets out of order. Expected 1 received 6. Packet size=7 in /var/php_gcov/PHP_5_3/ext/pdo_mysql/tests/bug_pecl_7976.php on line 14

Warning: PDO::query(): MySQL server has gone away in /var/php_gcov/PHP_5_3/ext/pdo_mysql/tests/bug_pecl_7976.php on line 14

Warning: PDO::query(): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/php_gcov/PHP_5_3/ext/pdo_mysql/tests/bug_pecl_7976.php on line 14

Fatal error: Call to a member function fetchAll() on a non-object in /var/php_gcov/PHP_5_3/ext/pdo_mysql/tests/bug_pecl_7976.php on line 15

Diff

024+ 
025+ Warning: Packets out of order. Expected 1 received 6. Packet size=7 in /var/php_gcov/PHP_5_3/ext/pdo_mysql/tests/bug_pecl_7976.php on line 14
026+ 
027+ Warning: PDO::query(): MySQL server has gone away in /var/php_gcov/PHP_5_3/ext/pdo_mysql/tests/bug_pecl_7976.php on line 14
028+ 
029+ Warning: PDO::query(): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/php_gcov/PHP_5_3/ext/pdo_mysql/tests/bug_pecl_7976.php on line 14
030+ 
031+ Fatal error: Call to a member function fetchAll() on a non-object in /var/php_gcov/PHP_5_3/ext/pdo_mysql/tests/bug_pecl_7976.php on line 15
024- array(1) {
025-   [0]=>
026-   array(1) {
027-     [%u|b%"_one"]=>
028-     %unicode|string%(1) "1"
029-   }
030- }
031- done!

 

Generated at Sun, 27 Jul 2014 12:58:43 +0000 (3 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.