diff options
author | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
commit | 2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch) | |
tree | 33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /ext/mysql/tests | |
parent | 3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff) | |
download | php-git-php-5.3.0alpha2.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
Diffstat (limited to 'ext/mysql/tests')
26 files changed, 68 insertions, 68 deletions
diff --git a/ext/mysql/tests/mysql_affected_rows.phpt b/ext/mysql/tests/mysql_affected_rows.phpt index 9e2da44e3c..246991fa66 100644 --- a/ext/mysql/tests/mysql_affected_rows.phpt +++ b/ext/mysql/tests/mysql_affected_rows.phpt @@ -15,8 +15,8 @@ $link = NULL; if (false !== ($tmp = @mysql_affected_rows())) printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); -if (null !== ($tmp = @mysql_affected_rows($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_affected_rows($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); if (!is_null($tmp = @mysql_affected_rows($link, $link))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); diff --git a/ext/mysql/tests/mysql_close.phpt b/ext/mysql/tests/mysql_close.phpt index 8f305ba780..aab3553f72 100644 --- a/ext/mysql/tests/mysql_close.phpt +++ b/ext/mysql/tests/mysql_close.phpt @@ -23,8 +23,8 @@ if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) $host, $user, $db, $port, $socket); $tmp = @mysql_close(NULL); -if (null !== $tmp) - printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== $tmp) + printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); $tmp = mysql_close($link); if (true !== $tmp) @@ -36,4 +36,4 @@ if (false !== ($tmp = @mysql_query("SELECT 1", $link))) print "done!\n"; ?> --EXPECTF-- -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_data_seek.phpt b/ext/mysql/tests/mysql_data_seek.phpt index 687af1136b..24f930dea8 100644 --- a/ext/mysql/tests/mysql_data_seek.phpt +++ b/ext/mysql/tests/mysql_data_seek.phpt @@ -18,8 +18,8 @@ if (NULL !== ($tmp = @mysql_data_seek())) if (NULL !== ($tmp = @mysql_data_seek($link))) printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_data_seek($link, $link))) - printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_data_seek($link, $link))) + printf("[003] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); if (!$res = mysql_query('SELECT * FROM test ORDER BY id LIMIT 4', $link)) @@ -70,4 +70,4 @@ Warning: mysql_data_seek(): Offset -1 is invalid for MySQL result index %d (or t Warning: mysql_data_seek(): Offset 3 is invalid for MySQL result index %d (or the query data is unbuffered) in %s on line %d Warning: mysql_data_seek(): %d is not a valid MySQL result resource in %s on line %d -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_db_name.phpt b/ext/mysql/tests/mysql_db_name.phpt index b1a03ed2cd..7341259788 100644 --- a/ext/mysql/tests/mysql_db_name.phpt +++ b/ext/mysql/tests/mysql_db_name.phpt @@ -15,8 +15,8 @@ $link = NULL; if (NULL !== ($tmp = @mysql_db_name())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_db_name($link, $link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_db_name($link, $link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); @@ -63,4 +63,4 @@ Warning: mysql_db_name(): Unable to jump to row -1 on MySQL result index %d in % Warning: mysql_db_name(): Unable to jump to row %d on MySQL result index %d in %s on line %d Warning: mysql_db_name(): %d is not a valid MySQL result resource in %s on line %d -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_errno.phpt b/ext/mysql/tests/mysql_errno.phpt index 7a9e85fb30..fd76f226cd 100644 --- a/ext/mysql/tests/mysql_errno.phpt +++ b/ext/mysql/tests/mysql_errno.phpt @@ -15,8 +15,8 @@ $link = NULL; if (false !== ($tmp = @mysql_errno())) printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); -if (null !== ($tmp = @mysql_errno($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_errno($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); if (!is_null($tmp = @mysql_errno($link, 'too many args'))) printf("[002b] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); @@ -56,4 +56,4 @@ int(%d) Warning: mysql_errno(): %d is not a valid MySQL-Link resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_error.phpt b/ext/mysql/tests/mysql_error.phpt index b64982a42f..2b3acb7197 100644 --- a/ext/mysql/tests/mysql_error.phpt +++ b/ext/mysql/tests/mysql_error.phpt @@ -15,8 +15,8 @@ $link = NULL; if (false !== ($tmp = @mysql_error())) printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_error($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_error($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); if (!is_null($tmp = @mysql_error($link, 'too many args'))) printf("[002b] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); @@ -60,4 +60,4 @@ print "done!"; --EXPECTF-- Warning: mysql_error(): %d is not a valid MySQL-Link resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_fetch_array.phpt b/ext/mysql/tests/mysql_fetch_array.phpt index 729523514a..c3a70ea55c 100644 --- a/ext/mysql/tests/mysql_fetch_array.phpt +++ b/ext/mysql/tests/mysql_fetch_array.phpt @@ -15,8 +15,8 @@ $link = NULL; if (NULL !== ($tmp = @mysql_fetch_array())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); -if (NULL != ($tmp = @mysql_fetch_array($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_fetch_array($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); if (!$res = mysql_query("SELECT * FROM test ORDER BY id LIMIT 5", $link)) { diff --git a/ext/mysql/tests/mysql_fetch_assoc.phpt b/ext/mysql/tests/mysql_fetch_assoc.phpt index 4479a2ab3e..172917b6fd 100644 --- a/ext/mysql/tests/mysql_fetch_assoc.phpt +++ b/ext/mysql/tests/mysql_fetch_assoc.phpt @@ -17,8 +17,8 @@ $link = NULL; if (!is_null($tmp = @mysql_fetch_assoc())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_fetch_assoc($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_fetch_assoc($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); if (!$res = mysql_query("SELECT id, label FROM test ORDER BY id LIMIT 1", $link)) { @@ -135,4 +135,4 @@ array(5) { [u"_foo"]=> NULL } -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_fetch_field.phpt b/ext/mysql/tests/mysql_fetch_field.phpt index c46335f9d6..7a50e23ca0 100644 --- a/ext/mysql/tests/mysql_fetch_field.phpt +++ b/ext/mysql/tests/mysql_fetch_field.phpt @@ -16,8 +16,8 @@ require_once('skipifconnectfailure.inc'); if (!is_null($tmp = @mysql_fetch_field())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - if (NULL !== ($tmp = @mysql_fetch_field($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); + if (false !== ($tmp = @mysql_fetch_field($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); diff --git a/ext/mysql/tests/mysql_fetch_lengths.phpt b/ext/mysql/tests/mysql_fetch_lengths.phpt index 4b181765b4..32c6ea9094 100644 --- a/ext/mysql/tests/mysql_fetch_lengths.phpt +++ b/ext/mysql/tests/mysql_fetch_lengths.phpt @@ -15,8 +15,8 @@ $link = NULL; if (!is_null($tmp = @mysql_fetch_lengths())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_fetch_lengths($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_fetch_lengths($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); if (!$res = mysql_query("SELECT id, label FROM test ORDER BY id LIMIT 1", $link)) { @@ -45,4 +45,4 @@ bool(false) Warning: mysql_fetch_lengths(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_fetch_row.phpt b/ext/mysql/tests/mysql_fetch_row.phpt index d9fff217ad..797e7ba1c8 100644 --- a/ext/mysql/tests/mysql_fetch_row.phpt +++ b/ext/mysql/tests/mysql_fetch_row.phpt @@ -15,8 +15,8 @@ $link = NULL; if (!is_null($tmp = @mysql_fetch_row())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_fetch_row($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_fetch_row($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); if (!$res = mysql_query("SELECT id, label FROM test ORDER BY id LIMIT 1", $link)) { diff --git a/ext/mysql/tests/mysql_field_flags.phpt b/ext/mysql/tests/mysql_field_flags.phpt index c609123cc2..4a63c907fc 100644 --- a/ext/mysql/tests/mysql_field_flags.phpt +++ b/ext/mysql/tests/mysql_field_flags.phpt @@ -136,7 +136,7 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- -Warning: mysql_field_flags() expects exactly 2 parameters, 1 given in %s on line %d +Warning: Wrong parameter count for mysql_field_flags() in %s on line %d Warning: mysql_field_flags(): Field -1 is invalid for MySQL result index %d in %s on line %d @@ -144,4 +144,4 @@ Warning: mysql_field_flags(): Field 2 is invalid for MySQL result index %d in %s Warning: mysql_field_flags(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_field_len.phpt b/ext/mysql/tests/mysql_field_len.phpt index a81e36a681..76c298112c 100644 --- a/ext/mysql/tests/mysql_field_len.phpt +++ b/ext/mysql/tests/mysql_field_len.phpt @@ -43,7 +43,7 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- -Warning: mysql_field_len() expects exactly 2 parameters, 1 given in %s on line %d +Warning: Wrong parameter count for mysql_field_len() in %s on line %d Warning: mysql_field_len(): Field -1 is invalid for MySQL result index %d in %s on line %d @@ -51,4 +51,4 @@ Warning: mysql_field_len(): Field 2 is invalid for MySQL result index %d in %s o Warning: mysql_field_len(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_field_name.phpt b/ext/mysql/tests/mysql_field_name.phpt index aeb516c8bb..c37ba6eb04 100644 --- a/ext/mysql/tests/mysql_field_name.phpt +++ b/ext/mysql/tests/mysql_field_name.phpt @@ -42,7 +42,7 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- -Warning: mysql_field_name() expects exactly 2 parameters, 1 given in %s on line %d +Warning: Wrong parameter count for mysql_field_name() in %s on line %d Warning: mysql_field_name(): Field -1 is invalid for MySQL result index %d in %s on line %d string(2) "id" @@ -62,4 +62,4 @@ Warning: mysql_field_name(): Field 2 is invalid for MySQL result index %d in %s Warning: mysql_field_name(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_field_table.phpt b/ext/mysql/tests/mysql_field_table.phpt index 5e552f8ee5..e82ac13abc 100644 --- a/ext/mysql/tests/mysql_field_table.phpt +++ b/ext/mysql/tests/mysql_field_table.phpt @@ -42,7 +42,7 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- -Warning: mysql_field_table() expects exactly 2 parameters, 1 given in %s on line %d +Warning: Wrong parameter count for mysql_field_table() in %s on line %d Warning: mysql_field_table(): Field -1 is invalid for MySQL result index %d in %s on line %d string(4) "test" @@ -62,4 +62,4 @@ Warning: mysql_field_table(): Field 2 is invalid for MySQL result index %d in %s Warning: mysql_field_table(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_field_type.phpt b/ext/mysql/tests/mysql_field_type.phpt index 2a72e2de88..61d8425fe7 100644 --- a/ext/mysql/tests/mysql_field_type.phpt +++ b/ext/mysql/tests/mysql_field_type.phpt @@ -42,7 +42,7 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- -Warning: mysql_field_type() expects exactly 2 parameters, 1 given in %s on line %d +Warning: Wrong parameter count for mysql_field_type() in %s on line %d Warning: mysql_field_type(): Field -1 is invalid for MySQL result index %d in %s on line %d string(3) "int" @@ -62,4 +62,4 @@ Warning: mysql_field_type(): Field 2 is invalid for MySQL result index %d in %s Warning: mysql_field_type(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_free_result.phpt b/ext/mysql/tests/mysql_free_result.phpt index 5a02ecff37..95e5656a4f 100644 --- a/ext/mysql/tests/mysql_free_result.phpt +++ b/ext/mysql/tests/mysql_free_result.phpt @@ -15,8 +15,8 @@ $link = NULL; if (!is_null($tmp = @mysql_free_result())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); -if (null !== ($tmp = @mysql_free_result($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_free_result($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); if (!$res = mysql_query("SELECT id FROM test ORDER BY id LIMIT 1", $link)) { @@ -44,4 +44,4 @@ bool(true) Warning: mysql_free_result(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_get_host_info.phpt b/ext/mysql/tests/mysql_get_host_info.phpt index d0ee6803af..213a792fd8 100644 --- a/ext/mysql/tests/mysql_get_host_info.phpt +++ b/ext/mysql/tests/mysql_get_host_info.phpt @@ -9,8 +9,8 @@ require_once('skipifconnectfailure.inc'); <?php include_once "connect.inc"; -if (NULL !== ($tmp = @mysql_get_host_info(NULL))) - printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_get_host_info(NULL))) + printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require "table.inc"; if (!is_string($info = mysql_get_host_info($link)) || ('' === $info)) @@ -37,4 +37,4 @@ if (!is_null($tmp = @mysql_get_host_info($link, "too many arguments"))) { print "done!"; ?> --EXPECTF-- -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_get_proto_info.phpt b/ext/mysql/tests/mysql_get_proto_info.phpt index 3dae99314b..989141a47f 100644 --- a/ext/mysql/tests/mysql_get_proto_info.phpt +++ b/ext/mysql/tests/mysql_get_proto_info.phpt @@ -9,8 +9,8 @@ require_once('skipifconnectfailure.inc'); <?php include_once "connect.inc"; -if (NULL !== ($tmp = @mysql_get_proto_info(NULL))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_get_proto_info(NULL))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require "table.inc"; if (!is_int($info = mysql_get_proto_info($link)) || (0 === $info)) diff --git a/ext/mysql/tests/mysql_get_server_info.phpt b/ext/mysql/tests/mysql_get_server_info.phpt index 83b9c35f40..b759f47f69 100644 --- a/ext/mysql/tests/mysql_get_server_info.phpt +++ b/ext/mysql/tests/mysql_get_server_info.phpt @@ -9,8 +9,8 @@ require_once('skipifconnectfailure.inc'); <?php include "connect.inc"; -if (null !== ($tmp = @mysql_get_server_info(NULL))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_get_server_info(NULL))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require "table.inc"; if (!is_string($info = mysql_get_server_info($link)) || ('' === $info)) diff --git a/ext/mysql/tests/mysql_insert_id.phpt b/ext/mysql/tests/mysql_insert_id.phpt index 832f370b5f..29ac78f243 100644 --- a/ext/mysql/tests/mysql_insert_id.phpt +++ b/ext/mysql/tests/mysql_insert_id.phpt @@ -15,8 +15,8 @@ $link = NULL; if (false !== ($tmp = @mysql_insert_id())) printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_insert_id($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_insert_id($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); if (!is_null($tmp = @mysql_insert_id($link, 'too many args'))) printf("[002a] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); @@ -63,4 +63,4 @@ print "done!"; --EXPECTF-- Warning: mysql_insert_id(): %d is not a valid MySQL-Link resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_list_dbs.phpt b/ext/mysql/tests/mysql_list_dbs.phpt index 7c8828d7aa..f79ee2d127 100644 --- a/ext/mysql/tests/mysql_list_dbs.phpt +++ b/ext/mysql/tests/mysql_list_dbs.phpt @@ -12,8 +12,8 @@ include_once "connect.inc"; $tmp = NULL; $link = NULL; -if (NULL !== ($tmp = @mysql_list_dbs(NULL))) - printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_list_dbs(NULL))) + printf("[001] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); if (NULL !== ($tmp = @mysql_list_dbs($link, $link))) printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); diff --git a/ext/mysql/tests/mysql_list_tables.phpt b/ext/mysql/tests/mysql_list_tables.phpt index 820ad378a0..6b66dd7067 100644 --- a/ext/mysql/tests/mysql_list_tables.phpt +++ b/ext/mysql/tests/mysql_list_tables.phpt @@ -21,8 +21,8 @@ if (NULL !== ($tmp = @mysql_list_tables('too', 'many', 'arguments'))) if (false !== ($tmp = @mysql_list_tables(NULL))) printf("[003] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_list_tables($db, NULL))) - printf("[004] Expecting NULL got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_list_tables($db, NULL))) + printf("[004] Expecting boolean/false got %s/%s\n", gettype($tmp), $tmp); require_once('table.inc'); @@ -78,4 +78,4 @@ mysql_close($link); print "done!\n"; ?> --EXPECTF-- -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_num_fields.phpt b/ext/mysql/tests/mysql_num_fields.phpt index 3ec305ea2d..c49234a0a3 100644 --- a/ext/mysql/tests/mysql_num_fields.phpt +++ b/ext/mysql/tests/mysql_num_fields.phpt @@ -15,8 +15,8 @@ $link = NULL; if (!is_null($tmp = @mysql_num_fields())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_num_fields($link))) - printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_num_fields($link))) + printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); @@ -49,4 +49,4 @@ print "done!"; ?> --EXPECTF-- Warning: mysql_num_fields(): %d is not a valid MySQL result resource in %s on line %d -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_num_rows.phpt b/ext/mysql/tests/mysql_num_rows.phpt index d93b4e2ffc..14c4c4e0b2 100644 --- a/ext/mysql/tests/mysql_num_rows.phpt +++ b/ext/mysql/tests/mysql_num_rows.phpt @@ -15,8 +15,8 @@ $link = NULL; if (!is_null($tmp = @mysql_num_rows())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); -if (NULL !== ($tmp = @mysql_num_rows($link))) -printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); +if (false !== ($tmp = @mysql_num_rows($link))) +printf("[002] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); require('table.inc'); @@ -40,7 +40,7 @@ function func_test_mysql_num_rows($link, $query, $expected, $offset, $test_free func_test_mysql_num_rows($link, "SELECT 1 AS a", 1, 5); func_test_mysql_num_rows($link, "SHOW VARIABLES LIKE '%nixnutz%'", 0, 10); -func_test_mysql_num_rows($link, "INSERT INTO test(id, label) VALUES (100, 'z')", NULL, 15); +func_test_mysql_num_rows($link, "INSERT INTO test(id, label) VALUES (100, 'z')", false, 15); func_test_mysql_num_rows($link, "SELECT id FROM test LIMIT 2", 2, 20, true); if ($res = mysql_query('SELECT COUNT(id) AS num FROM test', $link)) { @@ -58,9 +58,9 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- -Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in %s on line %d +Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in %s on line %d -Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in %s on line %d +Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in %s on line %d Warning: mysql_num_rows(): %d is not a valid MySQL result resource in %s on line %d -done! +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_tablename.phpt b/ext/mysql/tests/mysql_tablename.phpt index 684734a7d0..7524cdb343 100644 --- a/ext/mysql/tests/mysql_tablename.phpt +++ b/ext/mysql/tests/mysql_tablename.phpt @@ -42,7 +42,7 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- -Warning: mysql_tablename() expects at least 2 parameters, 1 given in %s on line %d +Warning: Wrong parameter count for mysql_tablename() in %s on line %d Warning: mysql_tablename(): Unable to jump to row -1 on MySQL result index %d in %s on line %d string(1) "1" @@ -62,4 +62,4 @@ Warning: mysql_tablename(): Unable to jump to row 2 on MySQL result index %d in Warning: mysql_tablename(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done! +done!
\ No newline at end of file |