1--TEST--
2Fail gracefully on empty result set
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifemb.inc');
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11    require_once("connect.inc");
12    require('table.inc');
13
14    // Returns only one result set
15    $link->multi_query("SELECT 1");
16    var_dump($link->next_result()); // should return false
17    var_dump($link->store_result()); // now what happens here!?
18
19
20    // Returns only one result set
21    $link->multi_query("SELECT 1");
22    var_dump($link->next_result());
23    var_dump($link->use_result());
24
25    $link->close();
26?>
27=== DONE ===
28--CLEAN--
29<?php
30    require_once("clean_table.inc");
31?>
32--EXPECT--
33bool(false)
34object(mysqli_result)#3 (5) {
35  ["current_field"]=>
36  int(0)
37  ["field_count"]=>
38  int(1)
39  ["lengths"]=>
40  NULL
41  ["num_rows"]=>
42  int(1)
43  ["type"]=>
44  int(0)
45}
46bool(false)
47object(mysqli_result)#3 (5) {
48  ["current_field"]=>
49  int(0)
50  ["field_count"]=>
51  int(1)
52  ["lengths"]=>
53  NULL
54  ["num_rows"]=>
55  int(0)
56  ["type"]=>
57  int(1)
58}
59=== DONE ===
60