Skip to content

Commit 5da78b2

Browse files
committed
Update ext/mysql's and ext/mysqli's tests
Add mysqli_stmt_more_result()/mysqli_stmt_next_result(), but only in mysqlnd builds as libmysql doesn't support this feature.
1 parent dedb146 commit 5da78b2

23 files changed

+596
-197
lines changed

ext/mysql/tests/connect.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1)))
6262
false;
6363

6464
$IS_MYSQLND = stristr(mysql_get_client_info(), "mysqlnd");
65-
?>
65+
?>

ext/mysql/tests/mysql_fetch_array.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ func_mysql_fetch_array($link, $engine, "BIGINT", NULL, NULL, 260);
184184
// func_mysql_fetch_array($link, $engine, "BIGINT UNSIGNED", 18446744073709551615, "1.84467e+019", 270, "/1\.84467e\+[0]?19/iu");
185185
func_mysql_fetch_array($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280);
186186

187-
func_mysql_fetch_array($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+[0]?18/iu");
187+
func_mysql_fetch_array($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu");
188188
func_mysql_fetch_array($link, $engine, "FLOAT", NULL, NULL, 300);
189-
func_mysql_fetch_array($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+19", 310, "/1\.84467e\+[0]?19/iu");
189+
func_mysql_fetch_array($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+19", 310, "/1\.84467e\+?[0]?19/iu");
190190
func_mysql_fetch_array($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320);
191191

192192
func_mysql_fetch_array($link, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330);

ext/mysqli/mysqli_api.c

+42
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,48 @@ PHP_FUNCTION(mysqli_next_result) {
15291529
}
15301530
/* }}} */
15311531

1532+
1533+
#ifdef MYSQLI_USE_MYSQLND
1534+
/* {{{ proto bool mysqli_stmt_next_result(object link)
1535+
check if there any more query results from a multi query */
1536+
PHP_FUNCTION(mysqli_stmt_more_results)
1537+
{
1538+
MY_STMT *stmt;
1539+
zval *mysql_stmt;
1540+
1541+
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
1542+
return;
1543+
}
1544+
MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID);
1545+
1546+
RETURN_BOOL(mysqlnd_stmt_more_results(stmt->stmt));
1547+
}
1548+
/* }}} */
1549+
1550+
1551+
/* {{{ proto bool mysqli_stmt_next_result(object link)
1552+
read next result from multi_query */
1553+
PHP_FUNCTION(mysqli_stmt_next_result) {
1554+
MY_STMT *stmt;
1555+
zval *mysql_stmt;
1556+
1557+
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
1558+
return;
1559+
}
1560+
MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID);
1561+
1562+
if (!mysqlnd_stmt_more_results(stmt->stmt)) {
1563+
php_error_docref(NULL TSRMLS_CC, E_STRICT, "There is no next result set. "
1564+
"Please, call mysqli_stmt_more_results()/mysqli_stmt::more_results() to check "
1565+
"whether to call this function/method");
1566+
}
1567+
1568+
RETURN_BOOL(!mysqlnd_stmt_next_result(stmt->stmt));
1569+
}
1570+
/* }}} */
1571+
#endif
1572+
1573+
15321574
/* {{{ proto int mysqli_num_fields(object result) U
15331575
Get number of fields in result */
15341576
PHP_FUNCTION(mysqli_num_fields)

ext/mysqli/mysqli_fe.c

+8
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ const zend_function_entry mysqli_functions[] = {
157157
PHP_FE(mysqli_stmt_data_seek, NULL)
158158
PHP_FE(mysqli_stmt_errno, NULL)
159159
PHP_FE(mysqli_stmt_error, NULL)
160+
#if defined(MYSQLI_USE_MYSQLND)
161+
PHP_FE(mysqli_stmt_more_results, NULL)
162+
PHP_FE(mysqli_stmt_next_result, NULL)
163+
#endif
160164
PHP_FE(mysqli_stmt_num_rows, NULL)
161165
PHP_FE(mysqli_stmt_sqlstate, NULL)
162166
PHP_FE(mysqli_stmt_store_result, NULL)
@@ -281,6 +285,10 @@ const zend_function_entry mysqli_stmt_methods[] = {
281285
PHP_FALIAS(fetch,mysqli_stmt_fetch,NULL)
282286
PHP_FALIAS(get_warnings, mysqli_stmt_get_warnings, NULL)
283287
PHP_FALIAS(result_metadata, mysqli_stmt_result_metadata,NULL)
288+
#if defined(MYSQLI_USE_MYSQLND)
289+
PHP_FALIAS(more_results, mysqli_stmt_more_results,NULL)
290+
PHP_FALIAS(next_result, mysqli_stmt_next_result,NULL)
291+
#endif
284292
PHP_FALIAS(num_rows, mysqli_stmt_num_rows,NULL)
285293
PHP_FALIAS(send_long_data,mysqli_stmt_send_long_data,NULL)
286294
PHP_FALIAS(stmt,mysqli_prepare,NULL)

ext/mysqli/php_mysqli_structs.h

+2
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@ PHP_FUNCTION(mysqli_stmt_get_result);
477477
PHP_FUNCTION(mysqli_stmt_get_warnings);
478478
PHP_FUNCTION(mysqli_stmt_reset);
479479
PHP_FUNCTION(mysqli_stmt_insert_id);
480+
PHP_FUNCTION(mysqli_stmt_more_results);
481+
PHP_FUNCTION(mysqli_stmt_next_result);
480482
PHP_FUNCTION(mysqli_stmt_num_rows);
481483
PHP_FUNCTION(mysqli_stmt_sqlstate);
482484
PHP_FUNCTION(mysqli_stmt_store_result);

ext/mysqli/tests/mysqli_class_mysqli_interface.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Interface of the class mysqli
33
--SKIPIF--
4-
<?php
4+
<?php
55
require_once('skipif.inc');
66
require_once('skipifemb.inc');
77
require_once('skipifconnectfailure.inc');

ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ Interface of the class mysqli_stmt
4141
'store_result' => true,
4242
);
4343

44-
if ($IS_MYSQLND)
44+
if ($IS_MYSQLND) {
4545
$expected_methods['get_result'] = true;
46+
$expected_methods['more_results'] = true;
47+
$expected_methods['next_result'] = true;
48+
}
4649

4750
foreach ($methods as $k => $method) {
4851
if (isset($expected_methods[$method])) {

ext/mysqli/tests/mysqli_fetch_all.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ if (!function_exists('mysqli_fetch_all'))
198198
func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", 18446744073709551615, "18446744073709551615", 270);
199199
func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280);
200200

201-
func_mysqli_fetch_all($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+[0]?18/iu");
201+
func_mysqli_fetch_all($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu");
202202
func_mysqli_fetch_all($link, $engine, "FLOAT", NULL, NULL, 300);
203-
func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+19", 310, "/1\.84467e\+[0]?19/iu");
203+
func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+19", 310, "/1\.84467e\+?[0]?19/iu");
204204
func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320);
205205

206206
func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330);

ext/mysqli/tests/mysqli_fetch_all_oo.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ if (!function_exists('mysqli_fetch_all'))
198198
func_mysqli_fetch_all_oo($link, $engine, "BIGINT UNSIGNED", 18446744073709551615, "18446744073709551615", 270);
199199
func_mysqli_fetch_all_oo($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280);
200200

201-
func_mysqli_fetch_all_oo($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+[0]?18/iu");
201+
func_mysqli_fetch_all_oo($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu");
202202
func_mysqli_fetch_all_oo($link, $engine, "FLOAT", NULL, NULL, 300);
203-
func_mysqli_fetch_all_oo($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+19", 310, "/1\.84467e\+[0]?19/iu");
203+
func_mysqli_fetch_all_oo($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu");
204204
func_mysqli_fetch_all_oo($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320);
205205

206206
func_mysqli_fetch_all_oo($link, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330);

ext/mysqli/tests/mysqli_fetch_array.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ require_once('skipifconnectfailure.inc');
191191
func_mysqli_fetch_array($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280);
192192
}
193193

194-
func_mysqli_fetch_array($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+[0]?18/iu");
194+
func_mysqli_fetch_array($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu");
195195
func_mysqli_fetch_array($link, $engine, "FLOAT", NULL, NULL, 300);
196-
func_mysqli_fetch_array($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+19", 310, "/1\.84467e\+[0]?19/iu");
196+
func_mysqli_fetch_array($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu");
197197
func_mysqli_fetch_array($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320);
198198

199199
func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330);

ext/mysqli/tests/mysqli_fetch_array_oo.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ require_once('skipifconnectfailure.inc');
175175
func_mysqli_fetch_array($mysqli, $engine, "BIGINT UNSIGNED", NULL, NULL, 280);
176176
}
177177

178-
func_mysqli_fetch_array($mysqli, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+[0]?18/iu");
178+
func_mysqli_fetch_array($mysqli, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu");
179179
func_mysqli_fetch_array($mysqli, $engine, "FLOAT", NULL, NULL, 300);
180-
func_mysqli_fetch_array($mysqli, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+19", 310, "/1\.84467e\+[0]?19/iu");
180+
func_mysqli_fetch_array($mysqli, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu");
181181
func_mysqli_fetch_array($mysqli, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320);
182182

183183
func_mysqli_fetch_array($mysqli, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330);

ext/mysqli/tests/mysqli_fetch_field_flags.phpt

+71-10
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,22 @@ mysqli_fetch_field() - flags/field->flags
55
require_once('skipif.inc');
66
require_once('skipifemb.inc');
77
require_once('skipifconnectfailure.inc');
8+
9+
require_once('connect.inc');
10+
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
11+
die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
12+
13+
if (mysqli_get_server_version($link) < 50041)
14+
die("skip: Due to many MySQL Server differences, the test requires 5.0.41+");
15+
16+
mysqli_close($link);
817
?>
918
--FILE--
1019
<?php
1120
include "connect.inc";
1221

22+
/* TODO: mysqli.c needs to export a few more constants - see all the defined() calls! */
23+
1324
$flags = array(
1425
MYSQLI_NOT_NULL_FLAG => 'NOT_NULL',
1526
MYSQLI_PRI_KEY_FLAG => 'PRI_KEY',
@@ -23,12 +34,19 @@ require_once('skipifconnectfailure.inc');
2334
MYSQLI_SET_FLAG => 'SET',
2435
MYSQLI_NUM_FLAG => 'NUM',
2536
MYSQLI_PART_KEY_FLAG => 'PART_KEY',
26-
MYSQLI_GROUP_FLAG => 'MYSQLI_GROUP_FLAG'
27-
// MYSQLI_NO_DEFAULT_VALUE_FLAG
28-
// MYSQLI_BINARY_FLAG
29-
// MYSQLI_ENUM_FLAG
37+
// MYSQLI_GROUP_FLAG => 'MYSQLI_GROUP_FLAG' - internal usage only
38+
(defined('MYSQLI_NO_DEFAULT_VALUE_FLAG') ? MYSQLI_NO_DEFAULT_VALUE_FLAG : 4096) => 'NO_DEFAULT_VALUE',
39+
(defined('MYSQLI_BINARY_FLAG') ? MYSQLI_BINARY_FLAG : 128) => 'BINARY',
40+
(defined('MYSQLI_ENUM_FLAG') ? MYSQLI_ENUM_FLAG : 256) => 'ENUM',
3041
// MYSQLI_BINCMP_FLAG
3142
);
43+
44+
// 5.1.24 / 6.0.4+
45+
if (defined('MYSQLI_ON_UPDATE_NOW'))
46+
$flags[MYSQLI_ON_UPDATE_NOW] = 'ON_UPDATE_NOW';
47+
else
48+
$flags[8192] = 'ON_UPDATE_NOW';
49+
3250
krsort($flags);
3351

3452
$columns = array(
@@ -37,13 +55,13 @@ require_once('skipifconnectfailure.inc');
3755
'INT NOT NULL DEFAULT 1' => 'NOT_NULL NUM',
3856
'INT UNSIGNED DEFAULT NULL' => 'UNSIGNED NUM',
3957
'INT UNSIGNED NOT NULL' => 'NOT_NULL UNSIGNED NO_DEFAULT_VALUE NUM',
40-
'INT UNSIGNED NOT NULL DEFAULT 1' => 'NOT_NULL UNSIGNED NULL',
58+
'INT UNSIGNED NOT NULL DEFAULT 1' => 'NOT_NULL UNSIGNED NUM',
4159
'INT UNSIGNED ZEROFILL DEFAULT NULL' => 'UNSIGNED ZEROFILL NUM',
4260
'INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY' => 'NOT_NULL PRI_KEY UNSIGNED AUTO_INCREMENT NUM PART_KEY',
4361
'CHAR(1) DEFAULT NULL' => '',
4462
'CHAR(1) NOT NULL' => 'NOT_NULL NO_DEFAULT_VALUE',
4563
'TIMESTAMP NOT NULL' => 'NOT_NULL UNSIGNED ZEROFILL BINARY TIMESTAMP',
46-
'VARBINARY(127) DEFAULT NULL' => 'NOT_NULL BINARY',
64+
'VARBINARY(127) DEFAULT NULL' => 'BINARY',
4765
'BLOB' => 'BLOB BINARY',
4866
'TINYBLOB' => 'BLOB BINARY',
4967
'MEDIUMBLOB' => 'BLOB BINARY',
@@ -67,10 +85,9 @@ require_once('skipifconnectfailure.inc');
6785
);
6886

6987
function checkFlags($reported_flags, $expected_flags, $flags) {
70-
7188
$found_flags = $unexpected_flags = '';
7289
foreach ($flags as $code => $name) {
73-
if ($code >= $reported_flags) {
90+
if ($reported_flags >= $code) {
7491
$reported_flags -= $code;
7592
$found_flags .= $name . ' ';
7693
if (stristr($expected_flags, $name)) {
@@ -118,13 +135,57 @@ require_once('skipifconnectfailure.inc');
118135
continue;
119136
}
120137

138+
/*
139+
TODO
140+
Unfortunately different server versions give you slightly different
141+
results.The test does not yet fully reflect all server changes/bugs etc.
142+
*/
143+
switch ($column_def) {
144+
case 'TIMESTAMP NOT NULL':
145+
// http://bugs.mysql.com/bug.php?id=30081 - new flag introduced in 5.1.24/6.0.4
146+
$version = mysqli_get_server_version($link);
147+
if ((($version > 50122) && ($version < 60000)) ||
148+
($version >= 60004)) {
149+
// new flag ON_UPDATE_NOW_FLAG (8192)
150+
$expected_flags .= ' ON_UPDATE_NOW';
151+
}
152+
break;
153+
154+
case 'INT UNSIGNED NOT NULL':
155+
case 'INT NOT NULL':
156+
case 'CHAR(1) NOT NULL':
157+
case 'SET("one", "two") NOT NULL':
158+
case 'ENUM("one", "two") NOT NULL':
159+
$version = mysqli_get_server_version($link);
160+
if ($version < 50000) {
161+
// TODO - check exact version!
162+
$expected_flags = trim(str_replace('NO_DEFAULT_VALUE', '', $expected_flags));
163+
}
164+
break;
165+
166+
case 'BIT':
167+
$version = mysqli_get_server_version($link);
168+
if ($version <= 50105) {
169+
// TODO - check exact version!
170+
$expected_flags = trim(str_replace('UNSIGNED', '', $expected_flags));
171+
}
172+
173+
default:
174+
break;
175+
}
176+
121177
list($missing_flags, $unexpected_flags, $flags_found) = checkFlags($field->flags, $expected_flags, $flags);
122-
if ($unexpected_flags)
178+
if ($unexpected_flags) {
123179
printf("[006] Found unexpected flags '%s' for %s, found '%s'\n",
124180
$unexpected_flags, $column_def, $flags_found);
125-
if ($missing_flags)
181+
}
182+
if ($missing_flags) {
126183
printf("[007] The flags '%s' have not been reported for %s, found '%s'\n",
127184
$missing_flags, $column_def, $flags_found);
185+
var_dump($create);
186+
var_dump(mysqli_get_server_version($link));
187+
die($missing_flags);
188+
}
128189

129190
mysqli_free_result($res);
130191
}

ext/mysqli/tests/mysqli_stmt_execute.phpt

+48-2
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,61 @@ require_once('skipifconnectfailure.inc');
5757
if (true !== ($tmp = mysqli_stmt_execute($stmt)))
5858
printf("[012] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
5959

60+
// calling reset between executions
61+
mysqli_stmt_close($stmt);
62+
if (!$stmt = mysqli_stmt_init($link))
63+
printf("[013] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
64+
65+
if (!mysqli_stmt_prepare($stmt, "SELECT id FROM test ORDER BY id LIMIT 1"))
66+
printf("[014] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
67+
68+
if (true !== ($tmp = mysqli_stmt_execute($stmt)))
69+
printf("[015] Expecting boolean/true, got %s/%s. [%d] %s\n",
70+
gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
71+
72+
$id = null;
73+
if (!mysqli_stmt_bind_result($stmt, $id) || !mysqli_stmt_fetch($stmt))
74+
printf("[016] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
75+
76+
if ($id !== 1)
77+
printf("[017] Expecting int/1 got %s/%s\n", gettype($id), $id);
78+
79+
if (true !== ($tmp = mysqli_stmt_reset($stmt)))
80+
printf("[018] Expecting boolean/true, got %s/%s. [%d] %s\n",
81+
gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
82+
83+
printf("Don't know what we should expect\n");
84+
var_dump(mysqli_stmt_execute($stmt));
85+
var_dump(mysqli_stmt_fetch($stmt));
86+
87+
mysqli_stmt_close($stmt);
88+
if (!$stmt = mysqli_stmt_init($link))
89+
printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
90+
91+
if (!mysqli_stmt_prepare($stmt, "SELECT id FROM test ORDER BY id LIMIT 1"))
92+
printf("[020] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
93+
94+
if (true !== ($tmp = mysqli_stmt_execute($stmt)))
95+
printf("[021] Expecting boolean/true, got %s/%s. [%d] %s\n",
96+
gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
97+
98+
if (true !== ($tmp = mysqli_stmt_reset($stmt)))
99+
printf("[022] Expecting boolean/true, got %s/%s. [%d] %s\n",
100+
gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
101+
102+
printf("Don't know what we should expect\n");
103+
var_dump(mysqli_stmt_execute($stmt));
104+
var_dump(mysqli_stmt_fetch($stmt));
105+
60106
mysqli_kill($link, mysqli_thread_id($link));
61107

62108
if (false !== ($tmp = mysqli_stmt_execute($stmt)))
63-
printf("[014] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
109+
printf("[023] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
64110

65111
mysqli_stmt_close($stmt);
66112

67113
if (NULL !== ($tmp = mysqli_stmt_execute($stmt)))
68-
printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
114+
printf("[024] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
69115

70116
mysqli_close($link);
71117
print "done!";

0 commit comments

Comments
 (0)