PHP  
 PHP_5_6
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_41997.phpt ('PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks future queries)')

Script

1: <?php
2:
require dirname(__FILE__) . '/mysql_pdo_test.inc';
3:
$db MySQLPDOTest::factory();
4:
5:
$db->exec('DROP PROCEDURE IF EXISTS p');
6:
$db->exec('CREATE PROCEDURE p() BEGIN SELECT 1 AS "one"; END');
7:
8:
$stmt $db->query("CALL p()");
9: do {
10:     
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
11: } while (
$stmt->nextRowset());
12:
var_dump($stmt->errorInfo());
13:
14:
$stmt $db->query('SELECT 2 AS "two"');
15:
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
16:
var_dump($stmt->errorInfo());
17: print 
"done!";
18:
?>
19:

Expected

array(1) {
  [0]=>
  array(1) {
    [%u|b%"one"]=>
    %unicode|string%(1) "1"
  }
}
array(3) {
  [0]=>
  %unicode|string%(5) "00000"
  [1]=>
  NULL
  [2]=>
  NULL
}
array(1) {
  [0]=>
  array(1) {
    [%u|b%"two"]=>
    %unicode|string%(1) "2"
  }
}
array(3) {
  [0]=>
  %unicode|string%(5) "00000"
  [1]=>
  NULL
  [2]=>
  NULL
}
done!

Output

array(1) {
  [0]=>
  array(1) {
    ["one"]=>
    string(1) "1"
  }
}

Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in /var/php_gcov/PHP_5_6/ext/pdo_mysql/tests/bug_41997.php on line 10
array(0) {
}
array(3) {
  [0]=>
  string(5) "00000"
  [1]=>
  NULL
  [2]=>
  NULL
}
array(1) {
  [0]=>
  array(1) {
    ["two"]=>
    string(1) "2"
  }
}
array(3) {
  [0]=>
  string(5) "00000"
  [1]=>
  NULL
  [2]=>
  NULL
}
done!

Diff

008+ 
009+ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in /var/php_gcov/PHP_5_6/ext/pdo_mysql/tests/bug_41997.php on line 10
010+ array(0) {
011+ }

 

Generated at Thu, 28 Aug 2014 18:52:45 +0000 (8 hours ago)

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