summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests')
-rw-r--r--ext/mysqli/tests/057.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_affected_rows.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_autocommit.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_begin_transaction.phpt21
-rw-r--r--ext/mysqli/tests/mysqli_change_user.phpt18
-rw-r--r--ext/mysqli/tests/mysqli_character_set_name.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_character_set_name_oo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt13
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_close.phpt13
-rw-r--r--ext/mysqli/tests/mysqli_close_oo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_commit.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_connect.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_data_seek.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_data_seek_oo.phpt13
-rw-r--r--ext/mysqli/tests/mysqli_debug.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_dump_debug_info.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_errno.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_error.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_error_unicode.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_fetch_all.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_fetch_array.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_fetch_assoc.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt3
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_direct.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_fetch_field_oo.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_fetch_fields.phpt8
-rw-r--r--ext/mysqli/tests/mysqli_fetch_lengths.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object.phpt11
-rw-r--r--ext/mysqli/tests/mysqli_fetch_object_oo.phpt7
-rw-r--r--ext/mysqli/tests/mysqli_fetch_row.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_field_count.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_field_seek.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_field_tell.phpt17
-rw-r--r--ext/mysqli/tests/mysqli_free_result.phpt21
-rw-r--r--ext/mysqli/tests/mysqli_get_charset.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_get_client_stats.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_get_connection_stats.phpt7
-rw-r--r--ext/mysqli/tests/mysqli_get_host_info.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_get_proto_info.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_get_server_info.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_get_server_version.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_info.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_insert_id.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_kill.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_max_links.phpt28
-rw-r--r--ext/mysqli/tests/mysqli_more_results.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_multi_query.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_next_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_num_fields.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_num_rows.phpt30
-rw-r--r--ext/mysqli/tests/mysqli_options.phpt18
-rw-r--r--ext/mysqli/tests/mysqli_ping.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_poll.phpt23
-rw-r--r--ext/mysqli/tests/mysqli_prepare.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_query.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_query_unicode.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_real_connect.phpt27
-rw-r--r--ext/mysqli/tests/mysqli_real_escape_string.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_real_query.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_reap_async_query.phpt10
-rw-r--r--ext/mysqli/tests/mysqli_release_savepoint.phpt13
-rw-r--r--ext/mysqli/tests/mysqli_report.phpt6
-rw-r--r--ext/mysqli/tests/mysqli_rollback.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_savepoint.phpt15
-rw-r--r--ext/mysqli/tests/mysqli_select_db.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_set_charset.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_set_opt.phpt18
-rw-r--r--ext/mysqli/tests/mysqli_sqlstate.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_ssl_set.phpt21
-rw-r--r--ext/mysqli/tests/mysqli_stat.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_stmt_affected_rows.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_attr_get.phpt15
-rw-r--r--ext/mysqli/tests/mysqli_stmt_attr_set.phpt17
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_param.phpt16
-rw-r--r--ext/mysqli/tests/mysqli_stmt_bind_result.phpt20
-rw-r--r--ext/mysqli/tests/mysqli_stmt_close.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_data_seek.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_errno.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_error.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_execute.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_fetch.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_stmt_field_count.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_free_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result2.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt5
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_warnings.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_init.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_stmt_insert_id.phpt10
-rw-r--r--ext/mysqli/tests/mysqli_stmt_num_rows.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_param_count.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_stmt_prepare.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_stmt_reset.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_stmt_result_metadata.phpt14
-rw-r--r--ext/mysqli/tests/mysqli_stmt_send_long_data.phpt24
-rw-r--r--ext/mysqli/tests/mysqli_stmt_sqlstate.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_stmt_store_result.phpt12
-rw-r--r--ext/mysqli/tests/mysqli_store_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_thread_id.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_use_result.phpt9
-rw-r--r--ext/mysqli/tests/mysqli_warning_count.phpt12
106 files changed, 14 insertions, 1202 deletions
diff --git a/ext/mysqli/tests/057.phpt b/ext/mysqli/tests/057.phpt
index dab3dfa78d..e0dd351d4c 100644
--- a/ext/mysqli/tests/057.phpt
+++ b/ext/mysqli/tests/057.phpt
@@ -40,7 +40,6 @@ require_once('skipifconnectfailure.inc');
var_dump(mysqli_stmt_execute($stmt));
var_dump($stmt = @mysqli_prepare($link, "SELECT * FROM test_store_result"), mysqli_error($link));
- var_dump(mysqli_stmt_reset($stmt));
$stmt = mysqli_prepare($link, "SELECT * FROM test_store_result");
mysqli_stmt_execute($stmt);
@@ -102,9 +101,6 @@ object(mysqli_stmt)#%d (%d) {
bool(true)
bool(false)
string(0) ""
-
-Warning: mysqli_stmt_reset() expects parameter 1 to be mysqli_stmt, bool given in %s on line %d
-NULL
Rows: 3
array(1) {
[0]=>
diff --git a/ext/mysqli/tests/mysqli_affected_rows.phpt b/ext/mysqli/tests/mysqli_affected_rows.phpt
index 95c3bb3426..81a7f5b6de 100644
--- a/ext/mysqli/tests/mysqli_affected_rows.phpt
+++ b/ext/mysqli/tests/mysqli_affected_rows.phpt
@@ -10,18 +10,6 @@ mysqli_affected_rows()
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_affected_rows()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_affected_rows($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_affected_rows($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_autocommit.phpt b/ext/mysqli/tests/mysqli_autocommit.phpt
index cc41786bdb..ea91408b60 100644
--- a/ext/mysqli/tests/mysqli_autocommit.phpt
+++ b/ext/mysqli/tests/mysqli_autocommit.phpt
@@ -19,18 +19,6 @@ mysqli_autocommit()
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_autocommit()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_autocommit($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_autocommit($link, $link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_begin_transaction.phpt b/ext/mysqli/tests/mysqli_begin_transaction.phpt
index b316ca9fe3..8a0dac8816 100644
--- a/ext/mysqli/tests/mysqli_begin_transaction.phpt
+++ b/ext/mysqli/tests/mysqli_begin_transaction.phpt
@@ -17,31 +17,10 @@ if (!have_innodb($link))
<?php
require_once("connect.inc");
/* {{{ proto bool mysqli_begin_transaction(object link, [int flags [, string name]]) */
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_begin_transaction()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_begin_transaction($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_begin_transaction($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if (!is_null($tmp = @mysqli_begin_transaction($link, $link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_begin_transaction($link, 0, $link)))
- printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_begin_transaction($link, 0, "mytrx", $link)))
- printf("[007] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_change_user.phpt b/ext/mysqli/tests/mysqli_change_user.phpt
index 7b9f23cf9e..bf1515e645 100644
--- a/ext/mysqli/tests/mysqli_change_user.phpt
+++ b/ext/mysqli/tests/mysqli_change_user.phpt
@@ -10,24 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_change_user()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_change_user($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_change_user($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_change_user($link, $link, $link)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_change_user($link, $link, $link, $link, $link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[006] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_character_set_name.phpt b/ext/mysqli/tests/mysqli_character_set_name.phpt
index 90dd46fa73..4e7153e5b0 100644
--- a/ext/mysqli/tests/mysqli_character_set_name.phpt
+++ b/ext/mysqli/tests/mysqli_character_set_name.phpt
@@ -11,18 +11,6 @@ require_once('skipifconnectfailure.inc');
/* NOTE: http://bugs.mysql.com/bug.php?id=7923 makes this test fail very likely on all 4.1.x - 5.0.x! */
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_character_set_name()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_character_set_name($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_character_set_name($link, $link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[005] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
@@ -65,10 +53,6 @@ require_once('skipifconnectfailure.inc');
if (false !== ($tmp = @mysqli_character_set_name($link)))
printf("[013] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
- /* Make sure that the function alias exists */
- if (!is_null($tmp = @mysqli_character_set_name()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
print "done!";
?>
--EXPECT--
diff --git a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
index 5d303fd503..4b760ec5bb 100644
--- a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
+++ b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt
@@ -18,9 +18,6 @@ mysqli_chararcter_set_name(), mysql_client_encoding() [alias]
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if (!is_null($tmp = @$mysqli->character_set_name($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$res = $mysqli->query('SELECT version() AS server_version'))
printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
$tmp = $res->fetch_assoc();
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
index 7367a5cd7c..b8ab4a4af5 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt
@@ -128,9 +128,6 @@ require_once('skipifconnectfailure.inc');
if (!is_object($res = new mysqli_result($link, MYSQLI_USE_RESULT)))
printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (!is_object($res = new mysqli_result($link, 'invalid')))
- printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
$valid = array(MYSQLI_STORE_RESULT, MYSQLI_USE_RESULT);
do {
$mode = mt_rand(-1000, 1000);
@@ -146,12 +143,6 @@ require_once('skipifconnectfailure.inc');
printf("[009] Expecting warning because of invalid resultmode\n");
}
- if (!is_object($res = new mysqli_result('foo')))
- printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
- if (!is_object($res = @new mysqli_result($link, MYSQLI_STORE_RESULT, 1)))
- printf("[011] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-
print "done!";
?>
--EXPECTF--
@@ -186,8 +177,4 @@ Access to undefined properties:
mysqli_result->unknown = ''
Constructor:
-
-Warning: mysqli_result::__construct() expects parameter 2 to be int, string given in %s on line %d
-
-Warning: mysqli_result::__construct() expects parameter 1 to be mysqli, string given in %s on line %d
done!
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt
index 8fc4583a4c..3e3301361d 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt
@@ -123,16 +123,6 @@ printf("stmt->unknown = '%s'\n", @$stmt->unknown);
@$stmt->unknown = 13;
printf("stmt->unknown = '%s'\n", @$stmt->unknown);
-printf("\nPrepare using the constructor:\n");
-$stmt = new mysqli_stmt($link, 'SELECT id FROM test ORDER BY id');
-if (!$stmt->execute())
-printf("[002] [%d] %s\n", $stmt->errno, $stmt->error);
-$stmt->close();
-
-$obj = new stdClass();
-if (!is_object($stmt = new mysqli_stmt($link, $obj)))
-printf("[003] Expecting NULL got %s/%s\n", gettype($stmt), $stmt);
-
print "done!";
?>
--EXPECTF--
@@ -191,8 +181,4 @@ stmt->sqlstate = '00000'
Access to undefined properties:
stmt->unknown = ''
stmt->unknown = '13'
-
-Prepare using the constructor:
-
-Warning: mysqli_stmt::__construct() expects parameter 2 to be string, object given in %s on line %d
done!
diff --git a/ext/mysqli/tests/mysqli_close.phpt b/ext/mysqli/tests/mysqli_close.phpt
index a300fb8314..0110847334 100644
--- a/ext/mysqli/tests/mysqli_close.phpt
+++ b/ext/mysqli/tests/mysqli_close.phpt
@@ -10,23 +10,10 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_close()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_close($link, $link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- $tmp = @mysqli_close(NULL);
- if (NULL !== $tmp)
- printf("[004] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
$tmp = mysqli_close($link);
if (true !== $tmp)
printf("[005] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_close_oo.phpt b/ext/mysqli/tests/mysqli_close_oo.phpt
index 305d5edf88..be189ba232 100644
--- a/ext/mysqli/tests/mysqli_close_oo.phpt
+++ b/ext/mysqli/tests/mysqli_close_oo.phpt
@@ -17,9 +17,6 @@ require_once('skipifconnectfailure.inc');
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if (!is_null($tmp = @$mysqli->close($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
$tmp = $mysqli->close();
if (true !== $tmp)
printf("[003] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_commit.phpt b/ext/mysqli/tests/mysqli_commit.phpt
index 27ae3a928a..73a9cdf25d 100644
--- a/ext/mysqli/tests/mysqli_commit.phpt
+++ b/ext/mysqli/tests/mysqli_commit.phpt
@@ -17,18 +17,6 @@ if (!have_innodb($link))
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_commit()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_commit($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_commit($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[004] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_connect.phpt b/ext/mysqli/tests/mysqli_connect.phpt
index 66cd94bd54..d5e4febbef 100644
--- a/ext/mysqli/tests/mysqli_connect.phpt
+++ b/ext/mysqli/tests/mysqli_connect.phpt
@@ -19,10 +19,6 @@ require_once('skipifconnectfailure.inc');
$exptype = ($anon_allow) ? "mysqli_object" : "false";
- $obj = new stdClass();
- if (!is_null($tmp = @mysqli_connect($obj)))
- printf("[001] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
-
$tmp = @mysqli_connect($link);
if (($anon_allow && gettype($tmp) != "object") || (!$anon_allow && $tmp != false)) {
printf("[002] Expecting %s, got %s/%s\n", $exptype, gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_data_seek.phpt b/ext/mysqli/tests/mysqli_data_seek.phpt
index 9bc3b12f73..0859ee61d5 100644
--- a/ext/mysqli/tests/mysqli_data_seek.phpt
+++ b/ext/mysqli/tests/mysqli_data_seek.phpt
@@ -10,18 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_data_seek()))
- printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_data_seek($link)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_data_seek($link, $link)))
- printf("[003] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, 'SELECT * FROM test ORDER BY id LIMIT 4', MYSQLI_STORE_RESULT))
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_data_seek_oo.phpt b/ext/mysqli/tests/mysqli_data_seek_oo.phpt
index 7fb14f0956..2c4377d845 100644
--- a/ext/mysqli/tests/mysqli_data_seek_oo.phpt
+++ b/ext/mysqli/tests/mysqli_data_seek_oo.phpt
@@ -9,10 +9,6 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
require_once("connect.inc");
-
- $tmp = NULL;
- $link = NULL;
-
require('table.inc');
if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
@@ -26,15 +22,6 @@ require_once('skipifconnectfailure.inc');
if (!$res = $mysqli->query('SELECT * FROM test ORDER BY id LIMIT 4', MYSQLI_STORE_RESULT))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (NULL !== ($tmp = @$res->data_seek()))
- printf("[004] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @$res->data_seek($link)))
- printf("[005] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @$res->data_seek($link, $link)))
- printf("[006] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (true !== ($tmp = $res->data_seek(3)))
printf("[007] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_debug.phpt b/ext/mysqli/tests/mysqli_debug.phpt
index aa455d7f6e..478dcf7d08 100644
--- a/ext/mysqli/tests/mysqli_debug.phpt
+++ b/ext/mysqli/tests/mysqli_debug.phpt
@@ -19,9 +19,6 @@ if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
<?php
require_once('connect.inc');
- if (NULL !== ($tmp = @mysqli_debug()))
- printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
// NOTE: documentation is not clear on this: function always return NULL or TRUE
if (true !== ($tmp = mysqli_debug(sprintf('d:t:O,%s/mysqli_debug_phpt.trace', sys_get_temp_dir()))))
printf("[002] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_dump_debug_info.phpt b/ext/mysqli/tests/mysqli_dump_debug_info.phpt
index b3fbde7fd9..d9c894dfff 100644
--- a/ext/mysqli/tests/mysqli_dump_debug_info.phpt
+++ b/ext/mysqli/tests/mysqli_dump_debug_info.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_dump_debug_info()))
- printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_dump_debug_info($link)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt b/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
index a0b5365432..58eb63cb2b 100644
--- a/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
+++ b/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
@@ -16,9 +16,6 @@ require_once('skipifconnectfailure.inc');
if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket);
- if (NULL !== ($tmp = @$mysqli->dump_debug_info($link)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!is_bool($tmp = $mysqli->dump_debug_info()))
printf("[003] Expecting boolean/[true|false] value, got %s/%s, [%d] %s\n",
gettype($tmp), $tmp,
diff --git a/ext/mysqli/tests/mysqli_errno.phpt b/ext/mysqli/tests/mysqli_errno.phpt
index 0a9c245341..f26a30e089 100644
--- a/ext/mysqli/tests/mysqli_errno.phpt
+++ b/ext/mysqli/tests/mysqli_errno.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_errno()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_errno($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_error.phpt b/ext/mysqli/tests/mysqli_error.phpt
index fd61f0f5d2..4154f45f1d 100644
--- a/ext/mysqli/tests/mysqli_error.phpt
+++ b/ext/mysqli/tests/mysqli_error.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_error()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_error($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_error_unicode.phpt b/ext/mysqli/tests/mysqli_error_unicode.phpt
index f4d8da9110..8127931882 100644
--- a/ext/mysqli/tests/mysqli_error_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_error_unicode.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_error()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_error($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_fetch_all.phpt b/ext/mysqli/tests/mysqli_fetch_all.phpt
index f9a7ee3770..9f18499454 100644
--- a/ext/mysqli/tests/mysqli_fetch_all.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_all.phpt
@@ -12,15 +12,6 @@ if (!function_exists('mysqli_fetch_all'))
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_fetch_all()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_all($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 2")) {
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt
index e9dd1602b5..775c6f20c4 100644
--- a/ext/mysqli/tests/mysqli_fetch_array.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_array.phpt
@@ -9,14 +9,6 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_fetch_array()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_array($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
if (!$res = mysqli_query($link, "SELECT * FROM test ORDER BY id LIMIT 5")) {
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_assoc.phpt
index 6b98b5f51c..3097eb2bc4 100644
--- a/ext/mysqli/tests/mysqli_fetch_assoc.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_assoc.phpt
@@ -10,17 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
// Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
- if (!is_null($tmp = @mysqli_fetch_assoc()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_assoc($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) {
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
index e4f6465176..db3457a4a0 100644
--- a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
@@ -24,9 +24,6 @@ require_once('skipifconnectfailure.inc');
printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if (!is_null($tmp = @$res->fetch_assoc($link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$res = $mysqli->query("SELECT id, label FROM test ORDER BY id LIMIT 1")) {
printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
}
diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt
index 684795a48e..5035cf70d2 100644
--- a/ext/mysqli/tests/mysqli_fetch_field.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field.phpt
@@ -10,15 +10,7 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
// Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
- if (!is_null($tmp = @mysqli_fetch_field()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_field($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
index be883ef625..5acc3b75d4 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt
@@ -10,18 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_fetch_field_direct()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_field_direct($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_field_direct($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 1")) {
diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
index c240050e17..c1220c7832 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
@@ -10,13 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
$mysqli = new mysqli();
$res = @new mysqli_result($mysqli);
- if (!is_null($tmp = @$res->fetch_field_direct()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
@@ -28,15 +23,6 @@ require_once('skipifconnectfailure.inc');
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
- if (!is_null($tmp = @$res->fetch_field_direct()))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @$res->fetch_field_direct($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @$res->fetch_field_direct($link, $link)))
- printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
var_dump($res->fetch_field_direct(-1));
var_dump($res->fetch_field_direct(0));
var_dump($res->fetch_field_direct(2));
diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
index 2293c9581a..35fdbb050e 100644
--- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt
@@ -10,23 +10,15 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
// Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
$mysqli = new mysqli();
$res = @new mysqli_result($mysqli);
- if (false !== ($tmp = @$res->fetch_field()))
- printf("[001] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if (!is_null($tmp = @$res->fetch_field($link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
// Make sure that client, connection and result charsets are all the
// same. Not sure whether this is strictly necessary.
if (!$mysqli->set_charset('utf8'))
diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt
index c79555c3a1..6dee8108f9 100644
--- a/ext/mysqli/tests/mysqli_fetch_fields.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt
@@ -10,15 +10,7 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
// Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
- if (!is_null($tmp = @mysqli_fetch_fields()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_fields($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
diff --git a/ext/mysqli/tests/mysqli_fetch_lengths.phpt b/ext/mysqli/tests/mysqli_fetch_lengths.phpt
index 85921f800d..b407d91894 100644
--- a/ext/mysqli/tests/mysqli_fetch_lengths.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_lengths.phpt
@@ -15,12 +15,6 @@ require_once('skipifconnectfailure.inc');
$host, $user, $db, $port, $socket);
}
- if (!is_null($tmp = @mysqli_fetch_lengths()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_lengths($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt
index 09ea19161a..262b48d49f 100644
--- a/ext/mysqli/tests/mysqli_fetch_object.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object.phpt
@@ -12,15 +12,6 @@ require_once('skipifconnectfailure.inc');
set_error_handler('handle_catchable_fatal');
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_fetch_object()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_object($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 5")) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@@ -145,8 +136,6 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECTF--
-[E_WARNING] mysqli_fetch_object() expects at least 1 parameter, 0 given in %s on line %d
-[E_WARNING] mysqli_fetch_object() expects parameter 1 to be mysqli_result, null given in %s on line %d
Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 0 passed and exactly 2 expected
Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected
NULL
diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
index d8c8cc70fd..2688f050fa 100644
--- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt
@@ -11,9 +11,6 @@ require_once('skipifconnectfailure.inc');
require_once("connect.inc");
set_error_handler('handle_catchable_fatal');
- $tmp = NULL;
- $link = NULL;
-
$mysqli = new mysqli();
$res = @new mysqli_result($mysqli);
if (false !== ($tmp = @$res->fetch_object()))
@@ -28,9 +25,6 @@ require_once('skipifconnectfailure.inc');
printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error);
}
- if (!is_null($tmp = @$res->fetch_object($link)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
try {
if (!is_null($tmp = @$res->fetch_object($link, $link)))
printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
@@ -132,7 +126,6 @@ require_once('skipifconnectfailure.inc');
[E_WARNING] mysqli_result::__construct(): invalid object or resource mysql%s
%s on line %d
[E_WARNING] mysqli_result::fetch_object(): Couldn't fetch mysqli_result in %s on line %d
-[E_WARNING] mysqli_result::fetch_object() expects parameter 1 to be string, object given in %s on line %d
[0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, object given in %s on line %d
[0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, object given in %s on line %d
[0] Argument 2 passed to mysqli_result::fetch_object() must be of the type array, null given in %s on line %d
diff --git a/ext/mysqli/tests/mysqli_fetch_row.phpt b/ext/mysqli/tests/mysqli_fetch_row.phpt
index 7ca1b9a132..c16ca1da77 100644
--- a/ext/mysqli/tests/mysqli_fetch_row.phpt
+++ b/ext/mysqli/tests/mysqli_fetch_row.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_fetch_row()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_fetch_row($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, "SELECT id, label, id AS _id FROM test ORDER BY id LIMIT 1")) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_field_count.phpt b/ext/mysqli/tests/mysqli_field_count.phpt
index d6581c6699..18fc3c9ec1 100644
--- a/ext/mysqli/tests/mysqli_field_count.phpt
+++ b/ext/mysqli/tests/mysqli_field_count.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_field_count()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_field_count($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
var_dump(mysqli_field_count($link));
diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt
index c34cf3f647..3cd60c7ce9 100644
--- a/ext/mysqli/tests/mysqli_field_seek.phpt
+++ b/ext/mysqli/tests/mysqli_field_seek.phpt
@@ -56,15 +56,6 @@ require_once('skipifconnectfailure.inc');
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_field_seek()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_field_seek($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
// Make sure that client, connection and result charsets are all the
@@ -99,10 +90,6 @@ require_once('skipifconnectfailure.inc');
var_dump(mysqli_field_tell($res));
var_dump(mysqli_field_seek($res, 2));
var_dump(mysqli_fetch_field($res));
- var_dump(mysqli_field_seek($res, PHP_INT_MAX + 1));
-
- if (!is_null($tmp = @mysqli_field_seek($res, 0, "too many")))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
mysqli_free_result($res);
@@ -217,9 +204,6 @@ int(2)
Warning: mysqli_field_seek(): Invalid field offset in %s on line %d
bool(false)
bool(false)
-
-Warning: mysqli_field_seek() expects parameter 2 to be int, float given in %s on line %d
-NULL
bool(true)
object(stdClass)#%d (13) {
["name"]=>
diff --git a/ext/mysqli/tests/mysqli_field_tell.phpt b/ext/mysqli/tests/mysqli_field_tell.phpt
index 9885c1d9d8..0b1d3bd0c1 100644
--- a/ext/mysqli/tests/mysqli_field_tell.phpt
+++ b/ext/mysqli/tests/mysqli_field_tell.phpt
@@ -10,31 +10,17 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_field_tell()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_field_tell($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, "SELECT id FROM test ORDER BY id LIMIT 1", MYSQLI_USE_RESULT)) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
var_dump(mysqli_field_tell($res));
- var_dump(mysqli_field_seek(1));
var_dump(mysqli_field_tell($res));
var_dump(mysqli_fetch_field($res));
var_dump(mysqli_fetch_field($res));
var_dump(mysqli_field_tell($res));
- if (!is_null($tmp = @mysqli_field_tell($res, 'too many arguments')))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-
var_dump(mysqli_field_seek($res, 2));
var_dump(mysqli_field_tell($res));
@@ -60,9 +46,6 @@ require_once('skipifconnectfailure.inc');
?>
--EXPECTF--
int(0)
-
-Warning: mysqli_field_seek() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
int(0)
object(stdClass)#%d (13) {
["name"]=>
diff --git a/ext/mysqli/tests/mysqli_free_result.phpt b/ext/mysqli/tests/mysqli_free_result.phpt
index 6cd7778319..be377a8817 100644
--- a/ext/mysqli/tests/mysqli_free_result.phpt
+++ b/ext/mysqli/tests/mysqli_free_result.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_free_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_free_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, "SELECT id FROM test ORDER BY id LIMIT 1")) {
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@@ -33,7 +24,7 @@ require_once('skipifconnectfailure.inc');
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
print "c\n";
- var_dump($res = mysqli_store_result($link));
+ var_dump(mysqli_store_result($link));
var_dump(mysqli_error($link));
print "[005]\n";
var_dump(mysqli_free_result($res));
@@ -42,7 +33,7 @@ require_once('skipifconnectfailure.inc');
printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
print "d\n";
- var_dump($res = mysqli_use_result($link));
+ var_dump(mysqli_use_result($link));
var_dump(mysqli_error($link));
print "[007]\n";
var_dump(mysqli_free_result($res));
@@ -63,16 +54,12 @@ Warning: mysqli_free_result(): Couldn't fetch mysqli_result in %s on line %d
bool(false)
c
bool(false)
-%s(0) ""
+string(0) ""
[005]
-
-Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d
NULL
d
bool(false)
-%s(0) ""
+string(0) ""
[007]
-
-Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d
NULL
done!
diff --git a/ext/mysqli/tests/mysqli_get_charset.phpt b/ext/mysqli/tests/mysqli_get_charset.phpt
index 537809dd70..cd7cfb3ae4 100644
--- a/ext/mysqli/tests/mysqli_get_charset.phpt
+++ b/ext/mysqli/tests/mysqli_get_charset.phpt
@@ -12,18 +12,6 @@ if (!function_exists('mysqli_get_charset'))
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_get_charset()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_get_charset($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_set_charset($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, 'SELECT version() AS server_version'))
diff --git a/ext/mysqli/tests/mysqli_get_client_stats.phpt b/ext/mysqli/tests/mysqli_get_client_stats.phpt
index 07ef78f296..6df6e2bee7 100644
--- a/ext/mysqli/tests/mysqli_get_client_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_client_stats.phpt
@@ -81,10 +81,6 @@ mysqli.allow_local_infile=1
}
- $tmp = $link = null;
- if (!is_null($tmp = @mysqli_get_client_stats($link)))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require_once("connect.inc");
if (!is_array($info = mysqli_get_client_stats()) || empty($info))
diff --git a/ext/mysqli/tests/mysqli_get_connection_stats.phpt b/ext/mysqli/tests/mysqli_get_connection_stats.phpt
index 80875a44e6..45d09b1baf 100644
--- a/ext/mysqli/tests/mysqli_get_connection_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_connection_stats.phpt
@@ -14,13 +14,6 @@ if (!function_exists('mysqli_get_connection_stats')) {
?>
--FILE--
<?php
- $tmp = $link = null;
- if (!is_null($tmp = @mysqli_get_connection_stats()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_get_connection_stats($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require("table.inc");
if (!is_array($info = mysqli_get_connection_stats($link)) || empty($info))
diff --git a/ext/mysqli/tests/mysqli_get_host_info.phpt b/ext/mysqli/tests/mysqli_get_host_info.phpt
index ada57f7d9f..534765808b 100644
--- a/ext/mysqli/tests/mysqli_get_host_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_host_info.phpt
@@ -10,12 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- if (!is_null($tmp = @mysqli_get_host_info()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_get_host_info(NULL)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require "table.inc";
if (!is_string($info = mysqli_get_host_info($link)) || ('' === $info))
printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
diff --git a/ext/mysqli/tests/mysqli_get_proto_info.phpt b/ext/mysqli/tests/mysqli_get_proto_info.phpt
index b24ab11fbd..c46fe30379 100644
--- a/ext/mysqli/tests/mysqli_get_proto_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_proto_info.phpt
@@ -10,19 +10,10 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- if (!is_null($tmp = @mysqli_get_proto_info()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_get_proto_info(NULL)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require "table.inc";
if (!is_int($info = mysqli_get_proto_info($link)) || ($info < 1))
printf("[003] Expecting int/any_non_empty, got %s/%s\n", gettype($info), $info);
- if (!is_null($tmp = @mysqli_get_proto_info('too many', 'arguments')))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
print "done!";
?>
--EXPECT--
diff --git a/ext/mysqli/tests/mysqli_get_server_info.phpt b/ext/mysqli/tests/mysqli_get_server_info.phpt
index 3ea1b4a70d..25278528a6 100644
--- a/ext/mysqli/tests/mysqli_get_server_info.phpt
+++ b/ext/mysqli/tests/mysqli_get_server_info.phpt
@@ -10,19 +10,10 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- if (!is_null($tmp = @mysqli_get_server_info()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_get_server_info(NULL)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require "table.inc";
if (!is_string($info = mysqli_get_server_info($link)) || ('' === $info))
printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
- if (!is_null($tmp = @mysqli_get_server_info('too', 'many arguments')))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
print "done!";
?>
--CLEAN--
diff --git a/ext/mysqli/tests/mysqli_get_server_version.phpt b/ext/mysqli/tests/mysqli_get_server_version.phpt
index ddbf4e73bb..6589e335b4 100644
--- a/ext/mysqli/tests/mysqli_get_server_version.phpt
+++ b/ext/mysqli/tests/mysqli_get_server_version.phpt
@@ -10,12 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- if (!is_null($tmp = @mysqli_get_server_version()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_get_server_version(NULL)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require "table.inc";
/* 5.1.5 -> 50105 -- major_version*10000 + minor_version *100 + sub_version */
/* < 30000 = pre 3.2.3, very unlikely! */
diff --git a/ext/mysqli/tests/mysqli_info.phpt b/ext/mysqli/tests/mysqli_info.phpt
index 56ee2cce05..b3a090b6e8 100644
--- a/ext/mysqli/tests/mysqli_info.phpt
+++ b/ext/mysqli/tests/mysqli_info.phpt
@@ -12,12 +12,6 @@ mysqli.allow_local_infile=1
<?php
require_once("connect.inc");
- if (!is_null($tmp = @mysqli_info()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_info(NULL)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require "table.inc";
if (!$res = mysqli_query($link, "INSERT INTO test(id, label) VALUES (100, 'a')"))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_insert_id.phpt b/ext/mysqli/tests/mysqli_insert_id.phpt
index 7d4c0e085c..383ed087b7 100644
--- a/ext/mysqli/tests/mysqli_insert_id.phpt
+++ b/ext/mysqli/tests/mysqli_insert_id.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_insert_id()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_insert_id($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (0 !== ($tmp = mysqli_insert_id($link)))
diff --git a/ext/mysqli/tests/mysqli_kill.phpt b/ext/mysqli/tests/mysqli_kill.phpt
index 85eb90e65a..7d96ac9426 100644
--- a/ext/mysqli/tests/mysqli_kill.phpt
+++ b/ext/mysqli/tests/mysqli_kill.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_kill()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_kill($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
// Zend will cast the NULL to 0
diff --git a/ext/mysqli/tests/mysqli_max_links.phpt b/ext/mysqli/tests/mysqli_max_links.phpt
index f3469e20e6..8586cb9276 100644
--- a/ext/mysqli/tests/mysqli_max_links.phpt
+++ b/ext/mysqli/tests/mysqli_max_links.phpt
@@ -25,14 +25,6 @@ mysqli.max_links=1
$i, mysqli_connect_errno(), mysqli_connect_error(),
mysqli_errno($links[$i]), mysqli_error($links[$i]));
- for ($i = 1; $i <= 5; $i++) {
- if ($res = mysqli_query($links[$i], 'SELECT id FROM test LIMIT 1')) {
- printf("[%03d] Can run query on link %d\n", 5 + $i, $i);
- mysqli_free_result($res);
- }
- mysqli_close($links[$i]);
- }
-
mysqli_close($link);
print "done!";
?>
@@ -53,24 +45,4 @@ Warning: mysqli_%sonnect(): Too many open links (1) in %s on line %d
Warning: mysqli_%sonnect(): Too many open links (1) in %s on line %d
Warning: mysqli_%sonnect(): Too many open links (1) in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d
-
-Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d
done!
diff --git a/ext/mysqli/tests/mysqli_more_results.phpt b/ext/mysqli/tests/mysqli_more_results.phpt
index 4ce6a19c79..50a09c0fef 100644
--- a/ext/mysqli/tests/mysqli_more_results.phpt
+++ b/ext/mysqli/tests/mysqli_more_results.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_more_results()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_more_results($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
print "[004]\n";
diff --git a/ext/mysqli/tests/mysqli_multi_query.phpt b/ext/mysqli/tests/mysqli_multi_query.phpt
index 28898b1dcb..12ffe2c38d 100644
--- a/ext/mysqli/tests/mysqli_multi_query.phpt
+++ b/ext/mysqli/tests/mysqli_multi_query.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_multi_query()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_multi_query($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (false !== ($tmp = mysqli_multi_query($link, "")))
diff --git a/ext/mysqli/tests/mysqli_next_result.phpt b/ext/mysqli/tests/mysqli_next_result.phpt
index e01f507c20..2967d12983 100644
--- a/ext/mysqli/tests/mysqli_next_result.phpt
+++ b/ext/mysqli/tests/mysqli_next_result.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_next_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_next_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (false !== ($tmp = mysqli_next_result($link)))
diff --git a/ext/mysqli/tests/mysqli_num_fields.phpt b/ext/mysqli/tests/mysqli_num_fields.phpt
index f891b309c2..1f33b4d2d9 100644
--- a/ext/mysqli/tests/mysqli_num_fields.phpt
+++ b/ext/mysqli/tests/mysqli_num_fields.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_num_fields()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_num_fields($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
function func_test_mysqli_num_fields($link, $query, $expected, $offset, $test_free = false) {
diff --git a/ext/mysqli/tests/mysqli_num_rows.phpt b/ext/mysqli/tests/mysqli_num_rows.phpt
index c6e646e4c3..15d3f90257 100644
--- a/ext/mysqli/tests/mysqli_num_rows.phpt
+++ b/ext/mysqli/tests/mysqli_num_rows.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_num_rows()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_num_rows($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
function func_test_mysqli_num_rows($link, $query, $expected, $offset, $test_free = false) {
@@ -28,16 +19,17 @@ require_once('skipifconnectfailure.inc');
return;
}
- if ($expected !== ($tmp = mysqli_num_rows($res)))
- printf("[%03d] Expecting %s/%d, got %s/%d\n", $offset + 1,
- gettype($expected), $expected,
- gettype($tmp), $tmp);
-
- mysqli_free_result($res);
+ if (!is_bool($res)) {
+ if ($expected !== ($tmp = mysqli_num_rows($res)))
+ printf("[%03d] Expecting %s/%d, got %s/%d\n", $offset + 1,
+ gettype($expected), $expected,
+ gettype($tmp), $tmp);
- if ($test_free && (false !== ($tmp = mysqli_num_rows($res))))
- printf("[%03d] Expecting false, got %s/%s\n", $offset + 2, gettype($tmp), $tmp);
+ mysqli_free_result($res);
+ if ($test_free && (false !== ($tmp = mysqli_num_rows($res))))
+ printf("[%03d] Expecting false, got %s/%s\n", $offset + 2, gettype($tmp), $tmp);
+ }
}
func_test_mysqli_num_rows($link, "SELECT 1 AS a", 1, 5);
@@ -78,10 +70,6 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECTF--
-Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in %s on line %d
-
-Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d
-
Warning: mysqli_num_rows(): Couldn't fetch mysqli_result in %s on line %d
run_tests.php don't fool me with your 'ungreedy' expression '.+?'!
diff --git a/ext/mysqli/tests/mysqli_options.phpt b/ext/mysqli/tests/mysqli_options.phpt
index 6d5247943b..13590bf5a9 100644
--- a/ext/mysqli/tests/mysqli_options.phpt
+++ b/ext/mysqli/tests/mysqli_options.phpt
@@ -27,30 +27,12 @@ require_once('skipifconnectfailure.inc');
if ($IS_MYSQLND && defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE'))
$valid_options[] = constant('MYSQLI_OPT_INT_AND_FLOAT_NATIVE');
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_options()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_options($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
$link = mysqli_init();
/* set it twice, checking if memory for the previous one is correctly freed */
mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "utf8");
mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "latin1");
- if (!is_null($tmp = @mysqli_options($link, MYSQLI_OPT_CONNECT_TIMEOUT)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_options($link, "s", 'extra_my.cnf')))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_options($link, MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT=0', 'foo')))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
// print "run_tests.php don't fool me with your 'ungreedy' expression '.+?'!\n";
var_dump("MYSQLI_READ_DEFAULT_GROUP", mysqli_options($link, MYSQLI_READ_DEFAULT_GROUP, 'extra_my.cnf'));
var_dump("MYSQLI_READ_DEFAULT_FILE", mysqli_options($link, MYSQLI_READ_DEFAULT_FILE, 'extra_my.cnf'));
diff --git a/ext/mysqli/tests/mysqli_ping.phpt b/ext/mysqli/tests/mysqli_ping.phpt
index 6ddb29efef..93deeebfa3 100644
--- a/ext/mysqli/tests/mysqli_ping.phpt
+++ b/ext/mysqli/tests/mysqli_ping.phpt
@@ -10,17 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_ping()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (!is_null($tmp = @mysqli_ping($link, $link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
var_dump(mysqli_ping($link));
// provoke an error to check if mysqli_ping resets it
diff --git a/ext/mysqli/tests/mysqli_poll.phpt b/ext/mysqli/tests/mysqli_poll.phpt
index b9c66381f9..f6d99c8e13 100644
--- a/ext/mysqli/tests/mysqli_poll.phpt
+++ b/ext/mysqli/tests/mysqli_poll.phpt
@@ -25,29 +25,6 @@ if (!$IS_MYSQLND)
if (!$link = get_connection())
printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- if (NULL !== ($tmp = @mysqli_poll()))
- printf("[002] Expecting NULL got %s\n", var_export($tmp, true));
-
- $l = array($link);
- if (NULL !== ($tmp = @mysqli_poll($l)))
- printf("[003] Expecting NULL got %s\n", var_export($tmp, true));
-
- $l = array($link); $n = NULL;
- if (NULL !== ($tmp = @mysqli_poll($l, $n)))
- printf("[004] Expecting NULL got %s\n", var_export($tmp, true));
-
- $l = array($link); $n = NULL;
- if (NULL !== ($tmp = @mysqli_poll($l, $n, $n)))
- printf("[005] Expecting NULL got %s\n", var_export($tmp, true));
-
- $l = array($link); $e = NULL; $r = NULL;
- if (NULL !== ($tmp = @mysqli_poll($l, $e, $r, -1)))
- printf("[007] Expecting boolean/false got %s/%s\n", gettype($tmp), var_export($tmp, true));
-
- $l = array($link); $e = NULL; $r = NULL;
- if (NULL !== ($tmp = @mysqli_poll($l, $e, $r, 0, -1)))
- printf("[008] Expecting boolean/false got %s/%s\n", gettype($tmp), var_export($tmp, true));
-
$read = $error = $reject = array($link);
if (0 !== ($tmp = (mysqli_poll($read, $error, $reject, 0, 1))))
printf("[009] Expecting int/0 got %s/%s\n", gettype($tmp), var_export($tmp, true));
diff --git a/ext/mysqli/tests/mysqli_prepare.phpt b/ext/mysqli/tests/mysqli_prepare.phpt
index 0c3bedf5b5..c6400e0b17 100644
--- a/ext/mysqli/tests/mysqli_prepare.phpt
+++ b/ext/mysqli/tests/mysqli_prepare.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_prepare()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_prepare($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (false !== ($tmp = @mysqli_prepare($link, false)))
@@ -105,15 +96,8 @@ require_once('skipifconnectfailure.inc');
var_dump(mysqli_stmt_prepare($stmt, 'SELECT 1; SELECT 2'));
mysqli_stmt_close($stmt);
-
- if (!is_null($tmp = @mysqli_stmt_prepare($link, 'SELECT id FROM test', 'foo')))
- printf("[023] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
mysqli_close($link);
- if (!is_null($tmp = @mysqli_stmt_prepare($link, 'SELECT id FROM test')))
- printf("[024] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
print "done!";
?>
--CLEAN--
diff --git a/ext/mysqli/tests/mysqli_query.phpt b/ext/mysqli/tests/mysqli_query.phpt
index 08145cddcf..a9502a83e4 100644
--- a/ext/mysqli/tests/mysqli_query.phpt
+++ b/ext/mysqli/tests/mysqli_query.phpt
@@ -10,23 +10,11 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_query()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_query($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (false !== ($tmp = @mysqli_query($link, '')))
printf("[002a] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp);
- if (NULL !== ($tmp = @mysqli_query($link, "SELECT 1 AS a", MYSQLI_USE_RESULT, "foo")))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (false !== ($tmp = mysqli_query($link, 'THIS IS NOT SQL')))
printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_query_unicode.phpt b/ext/mysqli/tests/mysqli_query_unicode.phpt
index 819a849d94..f167b4373a 100644
--- a/ext/mysqli/tests/mysqli_query_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_query_unicode.phpt
@@ -16,23 +16,11 @@ mysqli_close($link);
<?php
include_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_query()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_query($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require_once('table.inc');
if (TRUE !== ($tmp = @mysqli_query($link, "set names utf8")))
printf("[002.5] Expecting TRUE, got %s/%s\n", gettype($tmp), $tmp);
- if (NULL !== ($tmp = @mysqli_query($link, "SELECT 1 AS колона", MYSQLI_USE_RESULT, "foo")))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (false !== ($tmp = mysqli_query($link, 'това не е ескюел')))
printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_real_connect.phpt b/ext/mysqli/tests/mysqli_real_connect.phpt
index 5e4b56173b..32c37b9a14 100644
--- a/ext/mysqli/tests/mysqli_real_connect.phpt
+++ b/ext/mysqli/tests/mysqli_real_connect.phpt
@@ -12,34 +12,7 @@ mysqli.allow_local_infile=1
<?php
include("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_real_connect($link)))
- printf("[001a] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_real_connect($link, $link)))
- printf("[001b] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link)))
- printf("[001c] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link)))
- printf("[001d] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link, $link)))
- printf("[001e] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link, $link, $link)))
- printf("[001f] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link, $link, $link, $link)))
- printf("[001g] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
// ( mysqli link [, string hostname [, string username [, string passwd [, string dbname [, int port [, string socket [, int flags]]]]]]]
- if (NULL !== ($tmp = @mysqli_real_connect($link, $link, $link, $link, $link, $link, $link, $link)))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = mysqli_init())
printf("[002] mysqli_init() failed\n");
diff --git a/ext/mysqli/tests/mysqli_real_escape_string.phpt b/ext/mysqli/tests/mysqli_real_escape_string.phpt
index 05588cac63..57ab99eb89 100644
--- a/ext/mysqli/tests/mysqli_real_escape_string.phpt
+++ b/ext/mysqli/tests/mysqli_real_escape_string.phpt
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_real_escape_string()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_real_escape_string($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (NULL !== ($tmp =@mysqli_real_escape_string($link, "foo", "foo")))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if ('\\\\' !== ($tmp = mysqli_real_escape_string($link, '\\')))
printf("[004] Expecting \\\\, got %s\n", $tmp);
@@ -47,10 +35,6 @@ require_once('skipifconnectfailure.inc');
if (false !== ($tmp = mysqli_real_escape_string($link, 'foo')))
printf("[010] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
- /* Make sure that the function alias exists */
- if (NULL !== ($tmp = @mysqli_escape_string()))
- printf("[011] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
print "done!";
?>
--EXPECTF--
diff --git a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
index b3465ad2b1..3db0ecce62 100644
--- a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
+++ b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_real_escape_string()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (NULL !== ($tmp = @mysqli_real_escape_string($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (NULL !== ($tmp =@mysqli_real_escape_string($link, "фуу", "бар")))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if ('фу\\\\бар' !== ($tmp = mysqli_real_escape_string($link, 'фу\\бар')))
printf("[004] Expecting фу\\\\бар, got %s\n", $tmp);
diff --git a/ext/mysqli/tests/mysqli_real_query.phpt b/ext/mysqli/tests/mysqli_real_query.phpt
index 9b99435d42..4515810310 100644
--- a/ext/mysqli/tests/mysqli_real_query.phpt
+++ b/ext/mysqli/tests/mysqli_real_query.phpt
@@ -9,20 +9,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_real_query()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_real_query($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (NULL !== ($tmp = @mysqli_real_query($link, "SELECT 1 AS a", MYSQLI_USE_RESULT, "foo")))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (false !== ($tmp = mysqli_real_query($link, 'THIS IS NOT SQL')))
printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_reap_async_query.phpt b/ext/mysqli/tests/mysqli_reap_async_query.phpt
index b43b6b2478..5f13c2bbd9 100644
--- a/ext/mysqli/tests/mysqli_reap_async_query.phpt
+++ b/ext/mysqli/tests/mysqli_reap_async_query.phpt
@@ -25,16 +25,6 @@ if (!$IS_MYSQLND)
if (!$link = get_connection())
printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- if (NULL !== ($tmp = @mysqli_reap_async_query()))
- printf("[002] Expecting NULL got %s\n", var_export($tmp, true));
-
- $l = array($link);
- if (NULL !== ($tmp = @mysqli_reap_async_query($l)))
- printf("[003] Expecting NULL got %s\n", var_export($tmp, true));
-
- if (NULL !== ($tmp = @mysqli_reap_async_query($link, $link)))
- printf("[004] Expecting NULL got %s\n", var_export($tmp, true));
-
function poll_async($offset, $link, $links, $errors, $reject, $exp_ready, $use_oo_syntax) {
diff --git a/ext/mysqli/tests/mysqli_release_savepoint.phpt b/ext/mysqli/tests/mysqli_release_savepoint.phpt
index bb9a77a0af..219b5975b4 100644
--- a/ext/mysqli/tests/mysqli_release_savepoint.phpt
+++ b/ext/mysqli/tests/mysqli_release_savepoint.phpt
@@ -20,23 +20,10 @@ if (!have_innodb($link))
$tmp = NULL;
$link = NULL;
- if (!is_null($tmp = @mysqli_release_savepoint()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_release_savepoint($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- $name = array();
- if (!is_null($tmp = @mysqli_release_savepoint($link, $name)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_release_savepoint($link, 'foo', $link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (false !== ($tmp = mysqli_release_savepoint($link, '')))
printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_report.phpt b/ext/mysqli/tests/mysqli_report.phpt
index 889fda5fbd..6215e6508c 100644
--- a/ext/mysqli/tests/mysqli_report.phpt
+++ b/ext/mysqli/tests/mysqli_report.phpt
@@ -10,12 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (NULL !== ($tmp = @mysqli_report()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (true !== ($tmp = mysqli_report(-1)))
printf("[002] Expecting boolean/true even for invalid flags, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_rollback.phpt b/ext/mysqli/tests/mysqli_rollback.phpt
index 15fc21c16a..72a79cfcaa 100644
--- a/ext/mysqli/tests/mysqli_rollback.phpt
+++ b/ext/mysqli/tests/mysqli_rollback.phpt
@@ -17,22 +17,10 @@ mysqli_rollback()
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_rollback()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_rollback($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if (!is_null($tmp = @mysqli_rollback($link, 'foo')))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (true !== ($tmp = mysqli_autocommit($link, false)))
printf("[005] Cannot turn off autocommit, expecting true, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_savepoint.phpt b/ext/mysqli/tests/mysqli_savepoint.phpt
index cb0d1169c8..00e51deb6e 100644
--- a/ext/mysqli/tests/mysqli_savepoint.phpt
+++ b/ext/mysqli/tests/mysqli_savepoint.phpt
@@ -17,26 +17,11 @@ if (!have_innodb($link))
<?php
require_once("connect.inc");
/* {{{ proto bool mysqli_savepoint(object link, string name) */
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_savepoint()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_savepoint($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- $name = array();
- if (!is_null($tmp = @mysqli_savepoint($link, $name)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_savepoint($link, 'foo', $link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (false !== ($tmp = mysqli_savepoint($link, '')))
printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_select_db.phpt b/ext/mysqli/tests/mysqli_select_db.phpt
index 041b7fbb22..e023866c17 100644
--- a/ext/mysqli/tests/mysqli_select_db.phpt
+++ b/ext/mysqli/tests/mysqli_select_db.phpt
@@ -11,22 +11,10 @@ require_once('skipifconnectfailure.inc');
require_once("connect.inc");
require_once("table.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_select_db()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_select_db($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if (!is_null($tmp = @mysqli_select_db($link, $db, "foo")))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
/* does not make too much sense, unless we have access to at least one more database than $db */
if (!mysqli_select_db($link, $db))
printf("[005] Cannot select DB %s, [%d] %s\n", $db, mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_set_charset.phpt b/ext/mysqli/tests/mysqli_set_charset.phpt
index df90333867..33ebb8347b 100644
--- a/ext/mysqli/tests/mysqli_set_charset.phpt
+++ b/ext/mysqli/tests/mysqli_set_charset.phpt
@@ -48,18 +48,6 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_set_charset()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_set_charset($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_set_charset($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_query($link, 'SELECT @@character_set_connection AS charset, @@collation_connection AS collation'))
diff --git a/ext/mysqli/tests/mysqli_set_opt.phpt b/ext/mysqli/tests/mysqli_set_opt.phpt
index 757b8490b7..6769d2c530 100644
--- a/ext/mysqli/tests/mysqli_set_opt.phpt
+++ b/ext/mysqli/tests/mysqli_set_opt.phpt
@@ -10,26 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_set_opt()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_set_opt($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
$link = mysqli_init();
- if (!is_null($tmp = @mysqli_set_opt($link, MYSQLI_OPT_CONNECT_TIMEOUT)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_set_opt($link, "s", 'extra_my.cnf')))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_set_opt($link, MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT=0', 'foo')))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
// print "run_tests.php don't fool me with your 'ungreedy' expression '.+?'!\n";
var_dump(mysqli_set_opt($link, MYSQLI_READ_DEFAULT_GROUP, 'extra_my.cnf'));
var_dump(mysqli_set_opt($link, MYSQLI_READ_DEFAULT_FILE, 'extra_my.cnf'));
diff --git a/ext/mysqli/tests/mysqli_sqlstate.phpt b/ext/mysqli/tests/mysqli_sqlstate.phpt
index b36291872e..55dd115403 100644
--- a/ext/mysqli/tests/mysqli_sqlstate.phpt
+++ b/ext/mysqli/tests/mysqli_sqlstate.phpt
@@ -10,19 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_sqlstate()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_sqlstate($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- var_dump(@mysqli_sqlstate($link, "foo"));
-
var_dump(mysqli_sqlstate($link));
mysqli_query($link, "SELECT unknown_column FROM test");
var_dump(mysqli_sqlstate($link));
@@ -40,7 +29,6 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECTF--
-NULL
%s(5) "00000"
%s(5) "42S22"
%s(5) "00000"
diff --git a/ext/mysqli/tests/mysqli_ssl_set.phpt b/ext/mysqli/tests/mysqli_ssl_set.phpt
index 8463cc58b8..4f28350ef5 100644
--- a/ext/mysqli/tests/mysqli_ssl_set.phpt
+++ b/ext/mysqli/tests/mysqli_ssl_set.phpt
@@ -12,27 +12,6 @@ if (!function_exists('mysqli_ssl_set'))
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_ssl_set()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_ssl_set($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_ssl_set($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link, $link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_ssl_set($link, $link, $link, $link, $link)))
- printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
/*
This function always returns TRUE value.
diff --git a/ext/mysqli/tests/mysqli_stat.phpt b/ext/mysqli/tests/mysqli_stat.phpt
index 2507a4c8f8..71f7af5a54 100644
--- a/ext/mysqli/tests/mysqli_stat.phpt
+++ b/ext/mysqli/tests/mysqli_stat.phpt
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stat()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stat($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (!is_null($tmp = @mysqli_stat($link, "foo")))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if ((!is_string($tmp = mysqli_stat($link))) || ('' === $tmp))
printf("[004] Expecting non empty string, got %s/'%s', [%d] %s\n",
gettype($tmp), $tmp, mysqli_errno($link), mysql_error($link));
diff --git a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
index 1e08f0dec3..cfe5d53516 100644
--- a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_affected_rows()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_affected_rows($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
index 92937a15ce..f3634a7621 100644
--- a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt
@@ -10,23 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_attr_get()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_attr_get($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_attr_get($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (!is_null($tmp = @mysqli_stmt_attr_get($link, $link)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
$valid_attr = array("max_length" => MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH);
if (mysqli_get_client_version() > 50003)
$valid_attr["cursor_type"] = MYSQLI_STMT_ATTR_CURSOR_TYPE;
diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
index b3d60380cb..6e5710a0fc 100644
--- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt
@@ -8,22 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
- require_once("connect.inc");
-
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_attr_set()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_attr_set($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_attr_set($link, $link)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_attr_set($link, $link, $link)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+require_once("connect.inc");
require('table.inc');
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
index d2d825438e..027460fc5f 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt
@@ -19,18 +19,6 @@ require_once('skipifconnectfailure.inc');
*/
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_bind_param()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_bind_param($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_bind_param($link, $link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
$stmt = mysqli_stmt_init($link);
@@ -379,10 +367,6 @@ require_once('skipifconnectfailure.inc');
mysqli_stmt_close($stmt);
mysqli_close($link);
- /* Check that the function alias exists. It's a deprecated function,
- but we have not announce the removal so far, therefore we need to check for it */
- if (!is_null($tmp = @mysqli_stmt_bind_param()))
- printf("[021] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
--CLEAN--
diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
index dcd05e5f68..c166d91c48 100644
--- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
@@ -9,25 +9,12 @@ require_once('skipifconnectfailure.inc');
--FILE--
<?php
require_once("connect.inc");
-
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_bind_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_bind_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
$stmt = mysqli_stmt_init($link);
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 1"))
printf("[002a] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
- if (!is_null($tmp = mysqli_stmt_bind_result($stmt)))
- printf("[002b] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
mysqli_stmt_close($stmt);
$stmt = mysqli_stmt_init($link);
@@ -295,11 +282,6 @@ require_once('skipifconnectfailure.inc');
if (mysqli_get_server_version($link) >= 50600)
func_mysqli_stmt_bind_result($link, $engine, "s", "TIME", "13:31:34.123456", 1770, "13:31:34");
- /* Check that the function alias exists. It's a deprecated function,
- but we have not announce the removal so far, therefore we need to check for it */
- if (!is_null($tmp = @mysqli_stmt_bind_result()))
- printf("[3000] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
$stmt = mysqli_stmt_init($link);
if (!mysqli_stmt_prepare($stmt, "INSERT INTO test(id, label) VALUES (1000, 'z')"))
printf("[3001] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
@@ -318,8 +300,6 @@ require_once('skipifconnectfailure.inc');
require_once("clean_table.inc");
?>
--EXPECTF--
-Warning: mysqli_stmt_bind_result() expects at least 2 parameters, 1 given in %s on line %d
-
Warning: mysqli_stmt_bind_result(): invalid object or resource mysqli_stmt
in %s on line %d
diff --git a/ext/mysqli/tests/mysqli_stmt_close.phpt b/ext/mysqli/tests/mysqli_stmt_close.phpt
index 6ea64e815a..dfeab7075d 100644
--- a/ext/mysqli/tests/mysqli_stmt_close.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_close.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_close()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_close($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
index f9224eef62..23ecea0be3 100644
--- a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_data_seek()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_data_seek($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_errno.phpt b/ext/mysqli/tests/mysqli_stmt_errno.phpt
index d98a98b87a..39760e3003 100644
--- a/ext/mysqli/tests/mysqli_stmt_errno.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_errno.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_errno()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_errno($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_error.phpt b/ext/mysqli/tests/mysqli_stmt_error.phpt
index ad8efef602..49e03c8aee 100644
--- a/ext/mysqli/tests/mysqli_stmt_error.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_error.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_error()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_error($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_execute.phpt b/ext/mysqli/tests/mysqli_stmt_execute.phpt
index d97111a6fd..fd0fd3c628 100644
--- a/ext/mysqli/tests/mysqli_stmt_execute.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_execute.phpt
@@ -16,15 +16,6 @@ if (mysqli_get_server_version($link) <= 40100) {
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_execute()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_execute($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_fetch.phpt b/ext/mysqli/tests/mysqli_stmt_fetch.phpt
index 4b41c9213d..25a1f52eb1 100644
--- a/ext/mysqli/tests/mysqli_stmt_fetch.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_fetch.phpt
@@ -15,15 +15,6 @@ require_once('skipifconnectfailure.inc');
*/
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_fetch()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_fetch($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
@@ -78,11 +69,6 @@ require_once('skipifconnectfailure.inc');
mysqli_close($link);
- /* Check that the function alias exists. It's a deprecated function,
- but we have not announce the removal so far, therefore we need to check for it */
- if (!is_null($tmp = @mysqli_stmt_fetch()))
- printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
print "done!";
?>
--CLEAN--
diff --git a/ext/mysqli/tests/mysqli_stmt_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_field_count.phpt
index 847fe04a3b..2fa8a8ac80 100644
--- a/ext/mysqli/tests/mysqli_stmt_field_count.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_field_count.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_field_count()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_field_count($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
$stmt = mysqli_stmt_init($link);
diff --git a/ext/mysqli/tests/mysqli_stmt_free_result.phpt b/ext/mysqli/tests/mysqli_stmt_free_result.phpt
index 292905ab63..9d28d8a116 100644
--- a/ext/mysqli/tests/mysqli_stmt_free_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_free_result.phpt
@@ -15,15 +15,6 @@ require_once('skipifconnectfailure.inc');
*/
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_free_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_free_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result.phpt b/ext/mysqli/tests/mysqli_stmt_get_result.phpt
index e8f2843920..594e112cac 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result.phpt
@@ -18,15 +18,6 @@ if (!function_exists('mysqli_stmt_get_result'))
*/
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_get_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_get_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
index 00ed7adee4..ab261bd82b 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
@@ -17,23 +17,11 @@ if (!function_exists('mysqli_stmt_get_result'))
*/
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_get_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_get_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (!is_null($tmp = @mysqli_stmt_get_result($stmt, "foo")))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id ASC LIMIT 1"))
printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
index 51198523c9..c63a91487b 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
@@ -67,9 +67,6 @@ if (!function_exists('mysqli_stmt_get_result'))
if (false !== ($tmp = $res->data_seek($res->num_rows + 1)))
printf("[012] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp);
- if (NULL !== ($tmp = $res->data_seek(PHP_INT_MAX + 1)))
- printf("[013] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
-
for ($i = 0; $i < 100; $i++) {
/* intentionally out of range! */
$pos = mt_rand(-1, 4);
@@ -118,8 +115,6 @@ if (!function_exists('mysqli_stmt_get_result'))
require_once("clean_table.inc");
?>
--EXPECTF--
-Warning: mysqli_result::data_seek() expects parameter 1 to be int, float given in %s on line %d
-
Warning: mysqli_data_seek(): Couldn't fetch mysqli_result in %s on line %d
Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result in %s on line %d
diff --git a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt
index 1ebe6d051f..958a278554 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt
@@ -26,15 +26,6 @@ mysqli_query($link, "DROP TABLE IF EXISTS test");
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_get_warnings()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_get_warnings($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_init.phpt b/ext/mysqli/tests/mysqli_stmt_init.phpt
index b82a855dd2..c16f708fe6 100644
--- a/ext/mysqli/tests/mysqli_stmt_init.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_init.phpt
@@ -15,15 +15,6 @@ require_once('skipifconnectfailure.inc');
*/
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_init()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_init($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!is_object($stmt = mysqli_stmt_init($link)))
@@ -34,9 +25,6 @@ require_once('skipifconnectfailure.inc');
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_init($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
mysqli_close($link);
if (false !== ($tmp = mysqli_stmt_init($link)))
@@ -52,7 +40,5 @@ require_once('skipifconnectfailure.inc');
Warning: mysqli_stmt_close(): invalid object or resource mysqli_stmt
in %s on line %d
-Warning: mysqli_stmt_init() expects parameter 1 to be mysqli, object given in %s on line %d
-
Warning: mysqli_stmt_init(): Couldn't fetch mysqli in %s on line %d
done!
diff --git a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
index e3ef9a25ec..fedf305650 100644
--- a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt
@@ -10,16 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_insert_id()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- $stmt = @new mysqli_stmt($link);
- if (!is_null($tmp = @mysqli_insert_id($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
$stmt = mysqli_stmt_init($link);
diff --git a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
index 5355b3deb7..f798e22f71 100644
--- a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_num_rows()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_num_rows($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_param_count.phpt b/ext/mysqli/tests/mysqli_stmt_param_count.phpt
index e847d165f6..4176de60c5 100644
--- a/ext/mysqli/tests/mysqli_stmt_param_count.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_param_count.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_param_count()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_param_count($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
@@ -53,11 +44,6 @@ require_once('skipifconnectfailure.inc');
mysqli_close($link);
- /* Check that the function alias exists. It's a deprecated function,
- but we have not announce the removal so far, therefore we need to check for it */
- if (!is_null($tmp = @mysqli_stmt_param_count()))
- printf("[041] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
print "done!";
?>
--CLEAN--
diff --git a/ext/mysqli/tests/mysqli_stmt_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_prepare.phpt
index d0e38075d9..52c7597ef6 100644
--- a/ext/mysqli/tests/mysqli_stmt_prepare.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_prepare.phpt
@@ -16,23 +16,11 @@ require_once('skipifconnectfailure.inc');
// fetch tests, because the fetch tests would have to call prepare/execute etc.
// anyway.
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_prepare()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_prepare($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (NULL !== ($tmp = @mysqli_stmt_prepare($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (false !== ($tmp = mysqli_stmt_prepare($stmt, '')))
printf("[005] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
diff --git a/ext/mysqli/tests/mysqli_stmt_reset.phpt b/ext/mysqli/tests/mysqli_stmt_reset.phpt
index b7ec4e3ed7..339b885b72 100644
--- a/ext/mysqli/tests/mysqli_stmt_reset.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_reset.phpt
@@ -16,15 +16,6 @@ require_once('skipifconnectfailure.inc');
// fetch tests, because the fetch tests would have to call prepare/execute etc.
// anyway.
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_reset()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_reset($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
index 8f4e13ef39..adb7f6f726 100644
--- a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_result_metadata()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_result_metadata($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
@@ -85,11 +76,6 @@ require_once('skipifconnectfailure.inc');
if (false !== ($tmp = mysqli_stmt_result_metadata($stmt)))
printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- /* Check that the function alias exists. It's a deprecated function,
- but we have not announce the removal so far, therefore we need to check for it */
- if (!is_null($tmp = @mysqli_stmt_result_metadata()))
- printf("[018] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
mysqli_close($link);
print "done!";
?>
diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
index 1fc2745511..b42e393503 100644
--- a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt
@@ -10,23 +10,11 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_send_long_data()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_send_long_data($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$stmt = mysqli_stmt_init($link))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (NULL !== ($tmp = @mysqli_stmt_send_long_data($stmt, '')))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@@ -80,10 +68,6 @@ require_once('skipifconnectfailure.inc');
printf("[012] Expecting boolean/false, got %s/%s. [%d] %s\n",
gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
- if (NULL !== ($tmp = @mysqli_stmt_send_long_data($stmt, PHP_INT_MAX + 1, $blob)))
- printf("[013] Expecting NULL, got %s/%s. [%d] %s\n",
- gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
-
if (false !== ($tmp = mysqli_stmt_send_long_data($stmt, 999, $blob)))
printf("[014] Expecting boolean/false, got %s/%s. [%d] %s\n",
gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
@@ -115,14 +99,6 @@ require_once('skipifconnectfailure.inc');
if ($blob != $row['label'])
printf("[021] Blob value has not been stored properly!\n");
- if (NULL !== ($tmp = @mysqli_stmt_send_long_data($stmt, '')))
- printf("[022] Expecting NULL, got %s/%s\n");
-
- /* Check that the function alias exists. It's a deprecated function,
- but we have not announce the removal so far, therefore we need to check for it */
- if (!is_null($tmp = @mysqli_stmt_send_long_data()))
- printf("[023] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
mysqli_close($link);
print "done!";
?>
diff --git a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
index 1784106162..2740195931 100644
--- a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_sqlstate()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_sqlstate($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (!is_null($tmp = @mysqli_stmt_sqlstate($link, '')))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$stmt = mysqli_stmt_init($link))
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_stmt_store_result.phpt b/ext/mysqli/tests/mysqli_stmt_store_result.phpt
index 89b8ed3bf8..a6634e56f9 100644
--- a/ext/mysqli/tests/mysqli_stmt_store_result.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_store_result.phpt
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_stmt_store_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_stmt_store_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (false !== ($tmp = @mysqli_stmt_store_result(new mysqli_stmt())))
- printf("[003] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$stmt = mysqli_stmt_init($link))
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
diff --git a/ext/mysqli/tests/mysqli_store_result.phpt b/ext/mysqli/tests/mysqli_store_result.phpt
index b87d147e38..5ee8a14f6b 100644
--- a/ext/mysqli/tests/mysqli_store_result.phpt
+++ b/ext/mysqli/tests/mysqli_store_result.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_store_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_store_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
diff --git a/ext/mysqli/tests/mysqli_thread_id.phpt b/ext/mysqli/tests/mysqli_thread_id.phpt
index 4a71d60f41..f8e286b54c 100644
--- a/ext/mysqli/tests/mysqli_thread_id.phpt
+++ b/ext/mysqli/tests/mysqli_thread_id.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_thread_id()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_thread_id($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!is_int($tmp = mysqli_thread_id($link)) || (0 === $tmp))
diff --git a/ext/mysqli/tests/mysqli_use_result.phpt b/ext/mysqli/tests/mysqli_use_result.phpt
index 190cafa5d5..650a130c89 100644
--- a/ext/mysqli/tests/mysqli_use_result.phpt
+++ b/ext/mysqli/tests/mysqli_use_result.phpt
@@ -10,15 +10,6 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_use_result()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_use_result($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
if (!$res = mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id"))
diff --git a/ext/mysqli/tests/mysqli_warning_count.phpt b/ext/mysqli/tests/mysqli_warning_count.phpt
index 9d59f26e52..5e6a2e2381 100644
--- a/ext/mysqli/tests/mysqli_warning_count.phpt
+++ b/ext/mysqli/tests/mysqli_warning_count.phpt
@@ -10,20 +10,8 @@ require_once('skipifconnectfailure.inc');
<?php
require_once("connect.inc");
- $tmp = NULL;
- $link = NULL;
-
- if (!is_null($tmp = @mysqli_warning_count()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
- if (!is_null($tmp = @mysqli_warning_count($link)))
- printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
require('table.inc');
- if (NULL !== ($tmp = @mysqli_warning_count($link, "too_many")))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
if (!$res = mysqli_query($link, "SELECT id, label FROM test"))
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));