bug45289.phpt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. Bug #45289 (Bogus store_result on PS)
  3. --EXTENSIONS--
  4. mysqli
  5. --SKIPIF--
  6. <?php
  7. require_once('skipifconnectfailure.inc');
  8. ?>
  9. --FILE--
  10. <?php
  11. require('table.inc');
  12. $link->close();
  13. $link = mysqli_init();
  14. if (!($link->real_connect($host, $user, $passwd, $db, $port, $socket)))
  15. printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
  16. $host, $user, $db, $port, $socket);
  17. $id = 1;
  18. if (!($stmt = $link->prepare('SELECT id, label FROM test WHERE id=? LIMIT 1')))
  19. printf("[002] [%d] %s\n", $link->errno, $link->error);
  20. if (!$stmt->bind_param('i', $id) || !$stmt->execute())
  21. printf("[003] [%d] %s\n", $stmt->errno, $stmt->error);
  22. if ($res = $link->store_result()) {
  23. if ($IS_MYSQLND)
  24. printf("[004] Can store result!\n");
  25. else
  26. printf("[004] [007] http://bugs.mysql.com/bug.php?id=47485\n");
  27. } else {
  28. printf("[004] [%d] %s\n", $link->errno, $link->error);
  29. }
  30. ?>
  31. --CLEAN--
  32. <?php
  33. require_once("clean_table.inc");
  34. ?>
  35. --EXPECTF--
  36. [004] [%s