bug64726.phpt 662 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #63398 (Segfault when calling fetch_object on a use_result and DB pointer has closed)
  3. --EXTENSIONS--
  4. mysqli
  5. --SKIPIF--
  6. <?php
  7. require_once("connect.inc");
  8. if (!$IS_MYSQLND) {
  9. die("skip mysqlnd only test");
  10. }
  11. require_once('skipifconnectfailure.inc');
  12. ?>
  13. --FILE--
  14. <?php
  15. require 'connect.inc';
  16. $db = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
  17. mysqli_report(MYSQLI_REPORT_ERROR);
  18. $result = $db->query('SELECT 1', MYSQLI_USE_RESULT);
  19. $db->close();
  20. var_dump($result->fetch_object());
  21. ?>
  22. --EXPECTF--
  23. Warning: mysqli_result::fetch_object(): (HY000/2014): Commands out of sync; you can't run this command now in %s on line %d
  24. bool(false)