bug70066.phpt 679 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #70066: Unexpected "Cannot execute queries while other unbuffered queries"
  3. --EXTENSIONS--
  4. pdo
  5. pdo_mysql
  6. --SKIPIF--
  7. <?php
  8. require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
  9. MySQLPDOTest::skip();
  10. ?>
  11. --FILE--
  12. <?php
  13. require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
  14. $pdo = MySQLPDOTest::factory();
  15. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  16. $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
  17. $db = $pdo->query('SELECT DATABASE()')->fetchColumn(0);
  18. // USE is not supported in the prepared statement protocol,
  19. // so this will fall back to emulation.
  20. $pdo->query('USE ' . $db);
  21. ?>
  22. ===DONE===
  23. --EXPECT--
  24. ===DONE===