diff options
Diffstat (limited to 'ext/mysql')
68 files changed, 708 insertions, 40 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index d6a0c94677..dc7f108b5d 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -297,27 +297,27 @@ static const zend_function_entry mysql_functions[] = { PHP_FE(mysql_set_charset, arginfo_mysql_set_charset) #endif /* for downwards compatability */ - PHP_FALIAS(mysql, mysql_db_query, arginfo_mysql_db_query) - PHP_FALIAS(mysql_fieldname, mysql_field_name, arginfo_mysql_field_name) - PHP_FALIAS(mysql_fieldtable, mysql_field_table, arginfo_mysql_field_seek) - PHP_FALIAS(mysql_fieldlen, mysql_field_len, arginfo_mysql_field_seek) - PHP_FALIAS(mysql_fieldtype, mysql_field_type, arginfo_mysql_field_seek) - PHP_FALIAS(mysql_fieldflags, mysql_field_flags, arginfo_mysql_field_seek) - PHP_FALIAS(mysql_selectdb, mysql_select_db, arginfo_mysql_select_db) + PHP_DEP_FALIAS(mysql, mysql_db_query, arginfo_mysql_db_query) + PHP_DEP_FALIAS(mysql_fieldname, mysql_field_name, arginfo_mysql_field_name) + PHP_DEP_FALIAS(mysql_fieldtable, mysql_field_table, arginfo_mysql_field_seek) + PHP_DEP_FALIAS(mysql_fieldlen, mysql_field_len, arginfo_mysql_field_seek) + PHP_DEP_FALIAS(mysql_fieldtype, mysql_field_type, arginfo_mysql_field_seek) + PHP_DEP_FALIAS(mysql_fieldflags, mysql_field_flags, arginfo_mysql_field_seek) + PHP_DEP_FALIAS(mysql_selectdb, mysql_select_db, arginfo_mysql_select_db) #ifndef NETWARE /* The below two functions not supported on NetWare */ #if MYSQL_VERSION_ID < 40000 PHP_DEP_FALIAS(mysql_createdb, mysql_create_db, arginfo_mysql_select_db) PHP_DEP_FALIAS(mysql_dropdb, mysql_drop_db, arginfo_mysql_select_db) #endif #endif /* NETWARE */ - PHP_FALIAS(mysql_freeresult, mysql_free_result, arginfo__result_mysql_arg) - PHP_FALIAS(mysql_numfields, mysql_num_fields, arginfo__result_mysql_arg) - PHP_FALIAS(mysql_numrows, mysql_num_rows, arginfo__result_mysql_arg) - PHP_FALIAS(mysql_listdbs, mysql_list_dbs, arginfo__optional_mysql_link) + PHP_DEP_FALIAS(mysql_freeresult, mysql_free_result, arginfo__result_mysql_arg) + PHP_DEP_FALIAS(mysql_numfields, mysql_num_fields, arginfo__result_mysql_arg) + PHP_DEP_FALIAS(mysql_numrows, mysql_num_rows, arginfo__result_mysql_arg) + PHP_DEP_FALIAS(mysql_listdbs, mysql_list_dbs, arginfo__optional_mysql_link) PHP_DEP_FALIAS(mysql_listtables,mysql_list_tables, arginfo_mysql_select_db) - PHP_FALIAS(mysql_listfields, mysql_list_fields, arginfo_mysql_list_fields) + PHP_DEP_FALIAS(mysql_listfields, mysql_list_fields, arginfo_mysql_list_fields) PHP_FALIAS(mysql_db_name, mysql_result, arginfo_mysql_result) - PHP_FALIAS(mysql_dbname, mysql_result, arginfo_mysql_result) + PHP_DEP_FALIAS(mysql_dbname, mysql_result, arginfo_mysql_result) PHP_FALIAS(mysql_tablename, mysql_result, arginfo_mysql_result) PHP_FALIAS(mysql_table_name, mysql_result, arginfo_mysql_result) PHP_FE_END @@ -731,6 +731,10 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) zend_bool free_host=0, new_link=0; long connect_timeout; + php_error_docref(NULL TSRMLS_CC, + E_DEPRECATED, + "The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead"); + #if !defined(MYSQL_USE_MYSQLND) if ((MYSQL_VERSION_ID / 100) != (mysql_get_client_version() / 100)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, @@ -1989,16 +1993,16 @@ Q: String or long first? if (sql_row[field_offset]) { Z_TYPE_P(return_value) = IS_STRING; -#if PHP_API_VERSION < 20100412 +#if PHP_API_VERSION < 20100412 if (PG(magic_quotes_runtime)) { Z_STRVAL_P(return_value) = php_addslashes(sql_row[field_offset], sql_row_lengths[field_offset],&Z_STRLEN_P(return_value), 0 TSRMLS_CC); } else { -#endif +#endif Z_STRLEN_P(return_value) = sql_row_lengths[field_offset]; Z_STRVAL_P(return_value) = (char *) safe_estrndup(sql_row[field_offset], Z_STRLEN_P(return_value)); #if PHP_API_VERSION < 20100412 } -#endif +#endif } else { Z_TYPE_P(return_value) = IS_NULL; } @@ -2116,16 +2120,16 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type, MAKE_STD_ZVAL(data); -#if PHP_API_VERSION < 20100412 +#if PHP_API_VERSION < 20100412 if (PG(magic_quotes_runtime)) { Z_TYPE_P(data) = IS_STRING; Z_STRVAL_P(data) = php_addslashes(mysql_row[i], mysql_row_lengths[i], &Z_STRLEN_P(data), 0 TSRMLS_CC); } else { -#endif +#endif ZVAL_STRINGL(data, mysql_row[i], mysql_row_lengths[i], 1); -#if PHP_API_VERSION < 20100412 +#if PHP_API_VERSION < 20100412 } -#endif +#endif if (result_type & MYSQL_NUM) { add_index_zval(return_value, i, data); diff --git a/ext/mysql/tests/001.phpt b/ext/mysql/tests/001.phpt index 72b6614771..8782fd1252 100644 --- a/ext/mysql/tests/001.phpt +++ b/ext/mysql/tests/001.phpt @@ -29,5 +29,8 @@ var_dump($test); print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d %unicode|string%(2) "11" done! diff --git a/ext/mysql/tests/002.phpt b/ext/mysql/tests/002.phpt index 8355c5f11e..8f53f4d724 100644 --- a/ext/mysql/tests/002.phpt +++ b/ext/mysql/tests/002.phpt @@ -37,6 +37,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d resource(%d) of type (mysql link) bool(true) bool(true) diff --git a/ext/mysql/tests/003.phpt b/ext/mysql/tests/003.phpt index 2d0b68b9f8..365abc20e9 100644 --- a/ext/mysql/tests/003.phpt +++ b/ext/mysql/tests/003.phpt @@ -57,6 +57,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d ==stdClass== object(stdClass)#%d (1) { [%u|b%"a"]=> diff --git a/ext/mysql/tests/bug47438.phpt b/ext/mysql/tests/bug47438.phpt index 11f0ff33b8..fa7b3e6a2b 100644 --- a/ext/mysql/tests/bug47438.phpt +++ b/ext/mysql/tests/bug47438.phpt @@ -46,7 +46,8 @@ if (!mysql_select_db($db, $link) || mysql_close($link); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d 0.a 1.b 2.c diff --git a/ext/mysql/tests/bug48754.phpt b/ext/mysql/tests/bug48754.phpt index fb322f4615..b461db3320 100644 --- a/ext/mysql/tests/bug48754.phpt +++ b/ext/mysql/tests/bug48754.phpt @@ -68,6 +68,8 @@ var_dump($link); ?> --EXPECTF-- Explicit connection on close + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d Expect same thread id for $link and default conn: bool(true) resource(%d) of type (mysql link) resource(%d) of type (Unknown) @@ -75,18 +77,24 @@ resource(%d) of type (Unknown) Warning: mysql_close(): no MySQL-Link resource supplied in %s on line %d Closing default link + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d Expect same thread id for $link and default conn but not the previous: bool(true) resource(%d) of type (mysql link) resource(%d) of type (mysql link) resource(%d) of type (Unknown) Explicit resource and pconnect + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d resource(%d) of type (mysql link persistent) resource(%d) of type (Unknown) Warning: mysql_close(): no MySQL-Link resource supplied in %s on line %d Default link and pconnect + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d resource(%d) of type (mysql link persistent) resource(%d) of type (mysql link persistent) resource(%d) of type (Unknown) diff --git a/ext/mysql/tests/bug51242.phpt b/ext/mysql/tests/bug51242.phpt index 9b62cdb4cd..6801d3021f 100644 --- a/ext/mysql/tests/bug51242.phpt +++ b/ext/mysql/tests/bug51242.phpt @@ -35,4 +35,5 @@ if ($link = my_mysql_connect($host, $user, $passwd, $db, null, $socket)) { } ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d resource(%d) of type (mysql link) diff --git a/ext/mysql/tests/bug53649.phpt b/ext/mysql/tests/bug53649.phpt index 70bf9bed36..7ccdf08e5f 100644 --- a/ext/mysql/tests/bug53649.phpt +++ b/ext/mysql/tests/bug53649.phpt @@ -67,5 +67,6 @@ mysql_close($link); unlink('bug53649.data');
?>
---EXPECT--
-done
\ No newline at end of file +--EXPECTF--
+Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d
+done
diff --git a/ext/mysql/tests/bug55473.phpt b/ext/mysql/tests/bug55473.phpt index befecef192..1cc2dc9282 100644 --- a/ext/mysql/tests/bug55473.phpt +++ b/ext/mysql/tests/bug55473.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #55473 (mysql_pconnect leaks file descriptors on reconnect) +Bug #5547 (mysql_pconnect leaks file descriptors on reconnect) --SKIPIF-- <?php require_once('skipif.inc'); @@ -8,7 +8,7 @@ if (defined('PHP_WINDOWS_VERSION_MAJOR')) { die("skip Test doesn't work on Windows"); } -if (!($output = @exec("lsof -nwp " . getmypid()))) +if (!($output = @exec("lsof -np " . getmypid()))) die("skip Test can't find command line tool lsof"); ?> --INI-- @@ -56,9 +56,9 @@ mysql.allow_persistent=1 if ($opened_files == -1) { - $opened_files = trim(exec("lsof -nwp " . getmypid() . " | wc -l")); + $opened_files = trim(exec("lsof -np " . getmypid() . " | wc -l")); printf("[005] Setting openened files...\n"); - } else if (($tmp = trim(exec("lsof -nwp " . getmypid() . " | wc -l"))) != $opened_files) { + } else if (($tmp = trim(exec("lsof -np " . getmypid() . " | wc -l"))) != $opened_files) { printf("[006] [%d] different number of opened_files : expected %d, got %d", $i, $opened_files, $tmp); } else { printf("[007] Opened files as expected\n"); @@ -68,12 +68,21 @@ mysql.allow_persistent=1 print "done!"; ?> --EXPECTF-- +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [003] reconnect 0 + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [005] Setting openened files... [003] reconnect 1 + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [007] Opened files as expected [003] reconnect 2 + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [007] Opened files as expected [003] reconnect 3 + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [007] Opened files as expected done! diff --git a/ext/mysql/tests/mysql_affected_rows.phpt b/ext/mysql/tests/mysql_affected_rows.phpt index 145e1f5c0b..2449ac416e 100644 --- a/ext/mysql/tests/mysql_affected_rows.phpt +++ b/ext/mysql/tests/mysql_affected_rows.phpt @@ -122,4 +122,5 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_client_encoding.phpt b/ext/mysql/tests/mysql_client_encoding.phpt index 8aa67a03ac..5b21765ddb 100644 --- a/ext/mysql/tests/mysql_client_encoding.phpt +++ b/ext/mysql/tests/mysql_client_encoding.phpt @@ -67,4 +67,5 @@ if (false !== ($tmp = @mysql_client_encoding($link))) print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_close.phpt b/ext/mysql/tests/mysql_close.phpt index 8f305ba780..e676511961 100644 --- a/ext/mysql/tests/mysql_close.phpt +++ b/ext/mysql/tests/mysql_close.phpt @@ -36,4 +36,5 @@ if (false !== ($tmp = @mysql_query("SELECT 1", $link))) print "done!\n"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_connect.phpt b/ext/mysql/tests/mysql_connect.phpt index 7158248040..2b73092375 100644 --- a/ext/mysql/tests/mysql_connect.phpt +++ b/ext/mysql/tests/mysql_connect.phpt @@ -104,5 +104,25 @@ if (!ini_get('sql.safe_mode')) { print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_connect(): Access denied for user '%s'@'%s' (using password: YES) in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_constants.phpt b/ext/mysql/tests/mysql_constants.phpt index 1346100209..e68774503c 100644 --- a/ext/mysql/tests/mysql_constants.phpt +++ b/ext/mysql/tests/mysql_constants.phpt @@ -62,4 +62,5 @@ if (!empty($expected_constants)) { print "done!"; ?> --EXPECTF-- -done!
\ No newline at end of file +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d +done! diff --git a/ext/mysql/tests/mysql_create_db.phpt b/ext/mysql/tests/mysql_create_db.phpt index bc91964f50..0b6d58a09e 100644 --- a/ext/mysql/tests/mysql_create_db.phpt +++ b/ext/mysql/tests/mysql_create_db.phpt @@ -53,4 +53,7 @@ if (!mysql_query("DROP DATABASE IF EXISTS mysqlcreatedb", $link)) mysql_close($link); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_data_seek.phpt b/ext/mysql/tests/mysql_data_seek.phpt index 46a0f86bde..72d3e63274 100644 --- a/ext/mysql/tests/mysql_data_seek.phpt +++ b/ext/mysql/tests/mysql_data_seek.phpt @@ -67,6 +67,8 @@ print "done!\n"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_data_seek(): Offset 4 is invalid for MySQL result index %d (or the query data is unbuffered) in %s on line %d Warning: mysql_data_seek(): Offset -1 is invalid for MySQL result index %d (or the query data is unbuffered) in %s on line %d diff --git a/ext/mysql/tests/mysql_db_name.phpt b/ext/mysql/tests/mysql_db_name.phpt index b7f9042209..92878e994d 100644 --- a/ext/mysql/tests/mysql_db_name.phpt +++ b/ext/mysql/tests/mysql_db_name.phpt @@ -58,6 +58,8 @@ mysql_close($link); print "done!\n"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_db_name(): Unable to jump to row -1 on MySQL result index %d in %s on line %d Warning: mysql_db_name(): Unable to jump to row %d on MySQL result index %d in %s on line %d diff --git a/ext/mysql/tests/mysql_db_query.phpt b/ext/mysql/tests/mysql_db_query.phpt index bb837dd6c0..291fbfaac6 100644 --- a/ext/mysql/tests/mysql_db_query.phpt +++ b/ext/mysql/tests/mysql_db_query.phpt @@ -62,4 +62,5 @@ print "done!\n"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_deprecated_api.phpt b/ext/mysql/tests/mysql_deprecated_api.phpt index d54307ca0e..ebf72375cf 100644 --- a/ext/mysql/tests/mysql_deprecated_api.phpt +++ b/ext/mysql/tests/mysql_deprecated_api.phpt @@ -75,4 +75,5 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- -done!
\ No newline at end of file +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d +done! diff --git a/ext/mysql/tests/mysql_drop_db.phpt b/ext/mysql/tests/mysql_drop_db.phpt index bd729e7ab8..3281b8a333 100644 --- a/ext/mysql/tests/mysql_drop_db.phpt +++ b/ext/mysql/tests/mysql_drop_db.phpt @@ -52,4 +52,5 @@ if (!mysql_query("DROP DATABASE IF EXISTS mysqldropdb", $link)) mysql_close($link); ?> --EXPECTF-- -done!
\ No newline at end of file +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d +done! diff --git a/ext/mysql/tests/mysql_errno.phpt b/ext/mysql/tests/mysql_errno.phpt index 8cfa7bd33b..c9c2956290 100644 --- a/ext/mysql/tests/mysql_errno.phpt +++ b/ext/mysql/tests/mysql_errno.phpt @@ -55,6 +55,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d int(0) int(%d) diff --git a/ext/mysql/tests/mysql_error.phpt b/ext/mysql/tests/mysql_error.phpt index aae4480174..a2cf7e0034 100644 --- a/ext/mysql/tests/mysql_error.phpt +++ b/ext/mysql/tests/mysql_error.phpt @@ -62,6 +62,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_error(): %d is not a valid MySQL-Link resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_fetch_array.phpt b/ext/mysql/tests/mysql_fetch_array.phpt index 362cf99ddc..8ccefd0242 100644 --- a/ext/mysql/tests/mysql_fetch_array.phpt +++ b/ext/mysql/tests/mysql_fetch_array.phpt @@ -281,6 +281,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [005] array(4) { [0]=> diff --git a/ext/mysql/tests/mysql_fetch_assoc.phpt b/ext/mysql/tests/mysql_fetch_assoc.phpt index 3c5ca79b2d..048613a6be 100644 --- a/ext/mysql/tests/mysql_fetch_assoc.phpt +++ b/ext/mysql/tests/mysql_fetch_assoc.phpt @@ -63,6 +63,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [005] array(2) { [%u|b%"id"]=> @@ -87,6 +88,8 @@ array(5) { } Warning: mysql_fetch_assoc(): %d is not a valid MySQL result resource in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [010] array(5) { [%u|b%"id"]=> diff --git a/ext/mysql/tests/mysql_fetch_field.phpt b/ext/mysql/tests/mysql_fetch_field.phpt index ef03279087..85c1fd6f7e 100644 --- a/ext/mysql/tests/mysql_fetch_field.phpt +++ b/ext/mysql/tests/mysql_fetch_field.phpt @@ -156,6 +156,7 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d object(stdClass)#%d (13) { [%u|b%"name"]=> %unicode|string%(2) "ID" diff --git a/ext/mysql/tests/mysql_fetch_lengths.phpt b/ext/mysql/tests/mysql_fetch_lengths.phpt index 4793e2649b..f0fbbb7bb8 100644 --- a/ext/mysql/tests/mysql_fetch_lengths.phpt +++ b/ext/mysql/tests/mysql_fetch_lengths.phpt @@ -39,6 +39,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d array(2) { [0]=> int(1) diff --git a/ext/mysql/tests/mysql_fetch_object.phpt b/ext/mysql/tests/mysql_fetch_object.phpt index c11631e04c..666d0ee821 100644 --- a/ext/mysql/tests/mysql_fetch_object.phpt +++ b/ext/mysql/tests/mysql_fetch_object.phpt @@ -82,6 +82,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d object(stdClass)#%d (2) { [%u|b%"ID"]=> %unicode|string%(1) "1" diff --git a/ext/mysql/tests/mysql_fetch_row.phpt b/ext/mysql/tests/mysql_fetch_row.phpt index 8d6b9585be..0ed932e2c0 100644 --- a/ext/mysql/tests/mysql_fetch_row.phpt +++ b/ext/mysql/tests/mysql_fetch_row.phpt @@ -41,6 +41,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [004] array(2) { [0]=> @@ -53,4 +54,4 @@ bool(false) Warning: mysql_fetch_row(): %d is not a valid MySQL result resource in %s on line %d bool(false) -done!
\ No newline at end of file +done! diff --git a/ext/mysql/tests/mysql_field_flags.phpt b/ext/mysql/tests/mysql_field_flags.phpt index e07e041d2a..7f1b366d5c 100644 --- a/ext/mysql/tests/mysql_field_flags.phpt +++ b/ext/mysql/tests/mysql_field_flags.phpt @@ -144,6 +144,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_field_flags() expects exactly 2 parameters, 1 given in %s on line %d Warning: mysql_field_flags(): Field -1 is invalid for MySQL result index %d in %s on line %d diff --git a/ext/mysql/tests/mysql_field_len.phpt b/ext/mysql/tests/mysql_field_len.phpt index a740c62439..119d352164 100644 --- a/ext/mysql/tests/mysql_field_len.phpt +++ b/ext/mysql/tests/mysql_field_len.phpt @@ -47,6 +47,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_field_len() expects exactly 2 parameters, 1 given in %s on line %d Warning: mysql_field_len(): Field -1 is invalid for MySQL result index %d in %s on line %d diff --git a/ext/mysql/tests/mysql_field_name.phpt b/ext/mysql/tests/mysql_field_name.phpt index c87ac188f7..85f6c42d93 100644 --- a/ext/mysql/tests/mysql_field_name.phpt +++ b/ext/mysql/tests/mysql_field_name.phpt @@ -46,6 +46,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_field_name() expects exactly 2 parameters, 1 given in %s on line %d Warning: mysql_field_name(): Field -1 is invalid for MySQL result index %d in %s on line %d diff --git a/ext/mysql/tests/mysql_field_seek.phpt b/ext/mysql/tests/mysql_field_seek.phpt index 7e8b313c87..8487493a88 100644 --- a/ext/mysql/tests/mysql_field_seek.phpt +++ b/ext/mysql/tests/mysql_field_seek.phpt @@ -44,6 +44,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_field_seek(): Field -1 is invalid for MySQL result index %d in %s on line %d bool(false) object(stdClass)#%d (13) { diff --git a/ext/mysql/tests/mysql_field_table.phpt b/ext/mysql/tests/mysql_field_table.phpt index 707d1df987..826651a855 100644 --- a/ext/mysql/tests/mysql_field_table.phpt +++ b/ext/mysql/tests/mysql_field_table.phpt @@ -46,6 +46,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_field_table() expects exactly 2 parameters, 1 given in %s on line %d Warning: mysql_field_table(): Field -1 is invalid for MySQL result index %d in %s on line %d diff --git a/ext/mysql/tests/mysql_field_type.phpt b/ext/mysql/tests/mysql_field_type.phpt index c737b4e3f2..c767cab6f1 100644 --- a/ext/mysql/tests/mysql_field_type.phpt +++ b/ext/mysql/tests/mysql_field_type.phpt @@ -46,6 +46,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_field_type() expects exactly 2 parameters, 1 given in %s on line %d Warning: mysql_field_type(): Field -1 is invalid for MySQL result index %d in %s on line %d diff --git a/ext/mysql/tests/mysql_free_result.phpt b/ext/mysql/tests/mysql_free_result.phpt index fe132d8c2d..90498bd59a 100644 --- a/ext/mysql/tests/mysql_free_result.phpt +++ b/ext/mysql/tests/mysql_free_result.phpt @@ -44,6 +44,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d bool(true) Warning: mysql_free_result(): %d is not a valid MySQL result resource in %s on line %d diff --git a/ext/mysql/tests/mysql_get_host_info.phpt b/ext/mysql/tests/mysql_get_host_info.phpt index 443910c319..4b21ddbb41 100644 --- a/ext/mysql/tests/mysql_get_host_info.phpt +++ b/ext/mysql/tests/mysql_get_host_info.phpt @@ -41,4 +41,5 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_get_proto_info.phpt b/ext/mysql/tests/mysql_get_proto_info.phpt index 043fb62043..3e1481121e 100644 --- a/ext/mysql/tests/mysql_get_proto_info.phpt +++ b/ext/mysql/tests/mysql_get_proto_info.phpt @@ -31,4 +31,5 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_get_server_info.phpt b/ext/mysql/tests/mysql_get_server_info.phpt index e806335e29..ad192e4722 100644 --- a/ext/mysql/tests/mysql_get_server_info.phpt +++ b/ext/mysql/tests/mysql_get_server_info.phpt @@ -36,4 +36,5 @@ if (NULL !== ($tmp = @mysql_get_server_info('too many', 'just too many'))) print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_info.phpt b/ext/mysql/tests/mysql_info.phpt index 464578c8a5..c478679042 100644 --- a/ext/mysql/tests/mysql_info.phpt +++ b/ext/mysql/tests/mysql_info.phpt @@ -70,4 +70,5 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- -done!
\ No newline at end of file +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d +done! diff --git a/ext/mysql/tests/mysql_insert_id.phpt b/ext/mysql/tests/mysql_insert_id.phpt index 460d9f3f4d..b69a96ae9b 100644 --- a/ext/mysql/tests/mysql_insert_id.phpt +++ b/ext/mysql/tests/mysql_insert_id.phpt @@ -66,6 +66,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_insert_id(): %d is not a valid MySQL-Link resource in %s on line %d bool(false) done! diff --git a/ext/mysql/tests/mysql_list_dbs.phpt b/ext/mysql/tests/mysql_list_dbs.phpt index 054e02ef98..402161aa63 100644 --- a/ext/mysql/tests/mysql_list_dbs.phpt +++ b/ext/mysql/tests/mysql_list_dbs.phpt @@ -51,4 +51,5 @@ print "done!\n"; require_once("clean_table.inc"); ?> --EXPECTF-- -done!
\ No newline at end of file +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d +done! diff --git a/ext/mysql/tests/mysql_list_fields.phpt b/ext/mysql/tests/mysql_list_fields.phpt index e0b3fd5e39..259a94a399 100644 --- a/ext/mysql/tests/mysql_list_fields.phpt +++ b/ext/mysql/tests/mysql_list_fields.phpt @@ -64,6 +64,7 @@ if (!mysql_query("DROP TABLE IF EXISTS test2", $link)) mysql_close($link); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [006] [%d] %s bool(false) Field Offset 0 diff --git a/ext/mysql/tests/mysql_list_processes.phpt b/ext/mysql/tests/mysql_list_processes.phpt index b0c71ad1b4..7838a6f98a 100644 --- a/ext/mysql/tests/mysql_list_processes.phpt +++ b/ext/mysql/tests/mysql_list_processes.phpt @@ -49,4 +49,5 @@ mysql_close($link); print "done!\n"; ?> --EXPECTF-- -done!
\ No newline at end of file +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d +done! diff --git a/ext/mysql/tests/mysql_list_tables.phpt b/ext/mysql/tests/mysql_list_tables.phpt index cf0b1a636d..3b753ae37a 100644 --- a/ext/mysql/tests/mysql_list_tables.phpt +++ b/ext/mysql/tests/mysql_list_tables.phpt @@ -82,4 +82,5 @@ print "done!\n"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_max_links.phpt b/ext/mysql/tests/mysql_max_links.phpt index 52ecd0ac08..32096c426e 100644 --- a/ext/mysql/tests/mysql_max_links.phpt +++ b/ext/mysql/tests/mysql_max_links.phpt @@ -54,9 +54,19 @@ mysql_close($links[1]); print "done!\n"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_connect(): Too many open links (2) in %s on line %s [030] Cannot connect using host '%s', user '%s', password '****', [0] 0 +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_connect(): Too many open links (2) in %s on line %s [060] Cannot connect using host '%s', user '%s', password '****', [0] 0 array(3) { @@ -67,4 +77,4 @@ array(3) { [2]=> bool(false) } -done!
\ No newline at end of file +done! diff --git a/ext/mysql/tests/mysql_max_persistent.phpt b/ext/mysql/tests/mysql_max_persistent.phpt index ac35cd178b..36f2266665 100644 --- a/ext/mysql/tests/mysql_max_persistent.phpt +++ b/ext/mysql/tests/mysql_max_persistent.phpt @@ -90,10 +90,16 @@ if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) { mysql_close($link); ?> --EXPECTF-- +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_pconnect(): Too many open persistent links (1) in %s on line %d [020] Cannot connect using host '%s', user '%s', password '****', [0] 0 + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d array(1) { [0]=> resource(%d) of type (mysql link persistent) } -done!
\ No newline at end of file +done! diff --git a/ext/mysql/tests/mysql_mysqlnd_read_timeout_long.phpt b/ext/mysql/tests/mysql_mysqlnd_read_timeout_long.phpt index d54cb50708..2c67e64878 100644 --- a/ext/mysql/tests/mysql_mysqlnd_read_timeout_long.phpt +++ b/ext/mysql/tests/mysql_mysqlnd_read_timeout_long.phpt @@ -30,8 +30,9 @@ max_execution_time=12 print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d array(1) { [%u|b%"SLEEP(6)"]=> %unicode|string%(1) "0" } -done!
\ No newline at end of file +done! diff --git a/ext/mysql/tests/mysql_num_fields.phpt b/ext/mysql/tests/mysql_num_fields.phpt index 0dad5f771d..4621dc91f8 100644 --- a/ext/mysql/tests/mysql_num_fields.phpt +++ b/ext/mysql/tests/mysql_num_fields.phpt @@ -52,5 +52,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_num_fields(): %d is not a valid MySQL result resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_num_rows.phpt b/ext/mysql/tests/mysql_num_rows.phpt index 0f538c4a2b..5a803d41f9 100644 --- a/ext/mysql/tests/mysql_num_rows.phpt +++ b/ext/mysql/tests/mysql_num_rows.phpt @@ -79,6 +79,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in %s on line %d Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in %s on line %d diff --git a/ext/mysql/tests/mysql_pconn_disable.phpt b/ext/mysql/tests/mysql_pconn_disable.phpt index 532e2e5788..6997e5970f 100644 --- a/ext/mysql/tests/mysql_pconn_disable.phpt +++ b/ext/mysql/tests/mysql_pconn_disable.phpt @@ -49,6 +49,13 @@ mysql.max_links=2 require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [001] Can connect to the server. [002] Can fetch data using persistent connection! Data = '1' -done!
\ No newline at end of file + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d +done! diff --git a/ext/mysql/tests/mysql_pconn_kill.phpt b/ext/mysql/tests/mysql_pconn_kill.phpt index efef421604..eb1feb7b85 100644 --- a/ext/mysql/tests/mysql_pconn_kill.phpt +++ b/ext/mysql/tests/mysql_pconn_kill.phpt @@ -106,5 +106,12 @@ mysql.max_persistent=2 require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d bool(true) + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_pconn_max_links.phpt b/ext/mysql/tests/mysql_pconn_max_links.phpt index 3eca0e534a..ced94b3dbf 100644 --- a/ext/mysql/tests/mysql_pconn_max_links.phpt +++ b/ext/mysql/tests/mysql_pconn_max_links.phpt @@ -191,12 +191,17 @@ $host = substr($row['_user'], strrpos($row['_user'], "@") + 1, strlen($row['_use mysql_close($link); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d array(2) { [%u|b%"id"]=> %unicode|string%(1) "1" [%u|b%"label"]=> %unicode|string%(1) "a" } + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d array(2) { [%u|b%"id"]=> %unicode|string%(1) "1" diff --git a/ext/mysql/tests/mysql_pconn_reuse.phpt b/ext/mysql/tests/mysql_pconn_reuse.phpt index ffa5f75f1b..26b4ca5f49 100644 --- a/ext/mysql/tests/mysql_pconn_reuse.phpt +++ b/ext/mysql/tests/mysql_pconn_reuse.phpt @@ -59,8 +59,17 @@ mysql.max_links=2 print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [001] Can connect to the server. [002] Can fetch data using persistent connection! Data = '1' +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_connect(): Too many open links (2) in %s on line %d -done!
\ No newline at end of file +done! diff --git a/ext/mysql/tests/mysql_pconnect.phpt b/ext/mysql/tests/mysql_pconnect.phpt index 5a7db93ab3..ec28d2ea8a 100644 --- a/ext/mysql/tests/mysql_pconnect.phpt +++ b/ext/mysql/tests/mysql_pconnect.phpt @@ -81,5 +81,17 @@ mysql.allow_persistent=1 print "done!"; ?> --EXPECTF-- +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_pconnect(): Access denied for user '%s'@'%s' (using password: YES) in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_ping.phpt b/ext/mysql/tests/mysql_ping.phpt index edf18c4391..0308df3396 100644 --- a/ext/mysql/tests/mysql_ping.phpt +++ b/ext/mysql/tests/mysql_ping.phpt @@ -42,6 +42,7 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d bool(true) bool(true) bool(true) diff --git a/ext/mysql/tests/mysql_query.phpt b/ext/mysql/tests/mysql_query.phpt index a5978a6c11..01b14ee284 100644 --- a/ext/mysql/tests/mysql_query.phpt +++ b/ext/mysql/tests/mysql_query.phpt @@ -113,6 +113,7 @@ if (!mysql_query('DROP TABLE IF EXISTS test', $link)) { mysql_close($link); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d array(1) { [%u|b%"valid"]=> %unicode|string%(30) "this is sql but with semicolon" diff --git a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt index aa15f5ca12..c2cb41e026 100644 --- a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt +++ b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt @@ -111,6 +111,9 @@ unlink("./simple.csv"); print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d [006] [1148] %s [007] [0] '' [008] LOAD DATA not run? diff --git a/ext/mysql/tests/mysql_real_escape_string.phpt b/ext/mysql/tests/mysql_real_escape_string.phpt index 2789ad276c..4fdedf7b37 100644 --- a/ext/mysql/tests/mysql_real_escape_string.phpt +++ b/ext/mysql/tests/mysql_real_escape_string.phpt @@ -33,6 +33,7 @@ assert($tmp === mysql_real_escape_string("foo" . chr(0) . "bar")); print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d %unicode|string%(31) "Am I a unicode string in PHP 6?" %unicode|string%(2) "\\" %unicode|string%(2) "\"" diff --git a/ext/mysql/tests/mysql_reflection_extension.phpt b/ext/mysql/tests/mysql_reflection_extension.phpt new file mode 100644 index 0000000000..169036cd54 --- /dev/null +++ b/ext/mysql/tests/mysql_reflection_extension.phpt @@ -0,0 +1,105 @@ +--TEST-- +ReflectionExtension basics to check API +--SKIPIF-- +<?php +require_once('skipif.inc'); +?> +--FILE-- +<?php + $r = new ReflectionExtension("mysql"); + + printf("Name: %s\n", $r->name); + printf("Version: %s\n", $r->getVersion()); + $classes = $r->getClasses(); + if (!empty($classes)) { + printf("[002] Expecting no class\n"); + asort($classes); + var_dump($classes); + } + + $ignore = array(); + + $functions = $r->getFunctions(); + asort($functions); + printf("Functions:\n"); + foreach ($functions as $func) { + if (isset($ignore[$func->name])) { + unset($ignore[$func->name]); + } else { + printf(" %s\n", $func->name); + } + } + if (!empty($ignore)) { + printf("Dumping version dependent and missing functions\n"); + var_dump($ignore); + } + + + print "done!"; +?> +--EXPECTF-- +Name: mysql +Version: 1.0 +Functions: + mysql + mysql_affected_rows + mysql_client_encoding + mysql_close + mysql_connect + mysql_data_seek + mysql_db_name + mysql_db_query + mysql_dbname + mysql_errno + mysql_error + mysql_escape_string + mysql_fetch_array + mysql_fetch_assoc + mysql_fetch_field + mysql_fetch_lengths + mysql_fetch_object + mysql_fetch_row + mysql_field_flags + mysql_field_len + mysql_field_name + mysql_field_seek + mysql_field_table + mysql_field_type + mysql_fieldflags + mysql_fieldlen + mysql_fieldname + mysql_fieldtable + mysql_fieldtype + mysql_free_result + mysql_freeresult + mysql_get_client_info + mysql_get_host_info + mysql_get_proto_info + mysql_get_server_info + mysql_info + mysql_insert_id + mysql_list_dbs + mysql_list_fields + mysql_list_processes + mysql_list_tables + mysql_listdbs + mysql_listfields + mysql_listtables + mysql_num_fields + mysql_num_rows + mysql_numfields + mysql_numrows + mysql_pconnect + mysql_ping + mysql_query + mysql_real_escape_string + mysql_result + mysql_select_db + mysql_selectdb + mysql_set_charset + mysql_stat + mysql_table_name + mysql_tablename + mysql_thread_id + mysql_unbuffered_query +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_reflection_functions.phpt b/ext/mysql/tests/mysql_reflection_functions.phpt new file mode 100644 index 0000000000..4f2710d806 --- /dev/null +++ b/ext/mysql/tests/mysql_reflection_functions.phpt @@ -0,0 +1,387 @@ +--TEST-- +ReflectionFunction to check API +--SKIPIF-- +<?php +require_once('skipif.inc'); +?> +--FILE-- +<?php + $r = new ReflectionExtension("mysql"); + + $ignore = array(); + + $functions = $r->getFunctions(); + asort($functions); + printf("Functions:\n"); + foreach ($functions as $func) { + if (isset($ignore[$func->name])) + continue; + + printf(" %s\n", $func->name); + $rf = new ReflectionFunction($func->name); + printf(" Deprecated: %s\n", $rf->isDeprecated() ? "yes" : "no"); + printf(" Accepted parameters: %d\n", $rf->getNumberOfParameters()); + printf(" Required parameters: %d\n", $rf->getNumberOfRequiredParameters()); + foreach( $rf->getParameters() as $param ) { + printf(" %s\n", $param); + } + } + + print "done!"; +?> +--EXPECTF-- +Functions: + mysql + Deprecated: yes + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $database_name ] + Parameter #1 [ <required> $query ] + Parameter #2 [ <optional> $link_identifier ] + mysql_affected_rows + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_client_encoding + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_close + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_connect + Deprecated: no + Accepted parameters: 5 + Required parameters: 0 + Parameter #0 [ <optional> $hostname ] + Parameter #1 [ <optional> $username ] + Parameter #2 [ <optional> $password ] + Parameter #3 [ <optional> $new ] + Parameter #4 [ <optional> $flags ] + mysql_data_seek + Deprecated: no + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $row_number ] + mysql_db_name + Deprecated: no + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $row ] + Parameter #2 [ <optional> $field ] + mysql_db_query + Deprecated: yes + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $database_name ] + Parameter #1 [ <required> $query ] + Parameter #2 [ <optional> $link_identifier ] + mysql_dbname + Deprecated: yes + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $row ] + Parameter #2 [ <optional> $field ] + mysql_errno + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_error + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_escape_string + Deprecated: no + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $string ] + mysql_fetch_array + Deprecated: no + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $result_type ] + mysql_fetch_assoc + Deprecated: no + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_fetch_field + Deprecated: no + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $field_offset ] + mysql_fetch_lengths + Deprecated: no + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_fetch_object + Deprecated: no + Accepted parameters: 3 + Required parameters: 1 + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $class_name ] + Parameter #2 [ <optional> $ctor_params ] + mysql_fetch_row + Deprecated: no + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_field_flags + Deprecated: no + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_field_len + Deprecated: no + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_field_name + Deprecated: no + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_index ] + mysql_field_seek + Deprecated: no + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_field_table + Deprecated: no + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_field_type + Deprecated: no + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_fieldflags + Deprecated: yes + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_fieldlen + Deprecated: yes + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_fieldname + Deprecated: yes + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_index ] + mysql_fieldtable + Deprecated: yes + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_fieldtype + Deprecated: yes + Accepted parameters: 2 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $field_offset ] + mysql_free_result + Deprecated: no + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_freeresult + Deprecated: yes + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_get_client_info + Deprecated: no + Accepted parameters: 0 + Required parameters: 0 + mysql_get_host_info + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_get_proto_info + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_get_server_info + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_info + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_insert_id + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_list_dbs + Deprecated: yes + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_list_fields + Deprecated: no + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $database_name ] + Parameter #1 [ <required> $table_name ] + Parameter #2 [ <optional> $link_identifier ] + mysql_list_processes + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_list_tables + Deprecated: yes + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $database_name ] + Parameter #1 [ <optional> $link_identifier ] + mysql_listdbs + Deprecated: yes + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_listfields + Deprecated: yes + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $database_name ] + Parameter #1 [ <required> $table_name ] + Parameter #2 [ <optional> $link_identifier ] + mysql_listtables + Deprecated: yes + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $database_name ] + Parameter #1 [ <optional> $link_identifier ] + mysql_num_fields + Deprecated: no + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_num_rows + Deprecated: no + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_numfields + Deprecated: yes + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_numrows + Deprecated: yes + Accepted parameters: 1 + Required parameters: 1 + Parameter #0 [ <required> $result ] + mysql_pconnect + Deprecated: no + Accepted parameters: 4 + Required parameters: 0 + Parameter #0 [ <optional> $hostname ] + Parameter #1 [ <optional> $username ] + Parameter #2 [ <optional> $password ] + Parameter #3 [ <optional> $flags ] + mysql_ping + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_query + Deprecated: no + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $query ] + Parameter #1 [ <optional> $link_identifier ] + mysql_real_escape_string + Deprecated: no + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $string ] + Parameter #1 [ <optional> $link_identifier ] + mysql_result + Deprecated: no + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $row ] + Parameter #2 [ <optional> $field ] + mysql_select_db + Deprecated: no + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $database_name ] + Parameter #1 [ <optional> $link_identifier ] + mysql_selectdb + Deprecated: yes + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $database_name ] + Parameter #1 [ <optional> $link_identifier ] + mysql_set_charset + Deprecated: no + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $charset_name ] + Parameter #1 [ <optional> $link_identifier ] + mysql_stat + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_table_name + Deprecated: no + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $row ] + Parameter #2 [ <optional> $field ] + mysql_tablename + Deprecated: no + Accepted parameters: 3 + Required parameters: 2 + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $row ] + Parameter #2 [ <optional> $field ] + mysql_thread_id + Deprecated: no + Accepted parameters: 1 + Required parameters: 0 + Parameter #0 [ <optional> $link_identifier ] + mysql_unbuffered_query + Deprecated: no + Accepted parameters: 2 + Required parameters: 1 + Parameter #0 [ <required> $query ] + Parameter #1 [ <optional> $link_identifier ] +done!
\ No newline at end of file diff --git a/ext/mysql/tests/mysql_result.phpt b/ext/mysql/tests/mysql_result.phpt index 2c7c618547..0a58b9b883 100644 --- a/ext/mysql/tests/mysql_result.phpt +++ b/ext/mysql/tests/mysql_result.phpt @@ -65,6 +65,8 @@ print "done!"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_result(): Unable to jump to row -1 on MySQL result index %d in %s on line %d bool(false) diff --git a/ext/mysql/tests/mysql_select_db.phpt b/ext/mysql/tests/mysql_select_db.phpt index 211e34222e..e9bc99aa73 100644 --- a/ext/mysql/tests/mysql_select_db.phpt +++ b/ext/mysql/tests/mysql_select_db.phpt @@ -66,6 +66,7 @@ if (false !== ($tmp = mysql_select_db($db, $link))) print "done!\n"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d %unicode|string%(%d) "%s" bool(false) diff --git a/ext/mysql/tests/mysql_set_charset.phpt b/ext/mysql/tests/mysql_set_charset.phpt index 953323b49c..a0bccd8c31 100644 --- a/ext/mysql/tests/mysql_set_charset.phpt +++ b/ext/mysql/tests/mysql_set_charset.phpt @@ -58,4 +58,5 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done! diff --git a/ext/mysql/tests/mysql_stat.phpt b/ext/mysql/tests/mysql_stat.phpt index 30a840a2a1..d6a34df581 100644 --- a/ext/mysql/tests/mysql_stat.phpt +++ b/ext/mysql/tests/mysql_stat.phpt @@ -44,5 +44,7 @@ if (false !== ($tmp = mysql_stat($link))) print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_stat(): %d is not a valid MySQL-Link resource in %s on line %d done! diff --git a/ext/mysql/tests/mysql_tablename.phpt b/ext/mysql/tests/mysql_tablename.phpt index 2415e4fda0..4bbe54d443 100644 --- a/ext/mysql/tests/mysql_tablename.phpt +++ b/ext/mysql/tests/mysql_tablename.phpt @@ -42,6 +42,8 @@ mysql_close($link); print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_tablename() expects at least 2 parameters, 1 given in %s on line %d Warning: mysql_tablename(): Unable to jump to row -1 on MySQL result index %d in %s on line %d diff --git a/ext/mysql/tests/mysql_thread_id.phpt b/ext/mysql/tests/mysql_thread_id.phpt index b05bb3ed1c..aa95d31944 100644 --- a/ext/mysql/tests/mysql_thread_id.phpt +++ b/ext/mysql/tests/mysql_thread_id.phpt @@ -35,5 +35,7 @@ if (false !== ($tmp = mysql_thread_id($link))) print "done!"; ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d + Warning: mysql_thread_id(): %d is not a valid MySQL-Link resource in %s on line %d -done!
\ No newline at end of file +done! diff --git a/ext/mysql/tests/mysql_trace_mode.phpt b/ext/mysql/tests/mysql_trace_mode.phpt index 2b6c61d27b..7655975d70 100644 --- a/ext/mysql/tests/mysql_trace_mode.phpt +++ b/ext/mysql/tests/mysql_trace_mode.phpt @@ -29,6 +29,7 @@ print "done!\n"; require_once("clean_table.inc"); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d I don\'t mind character sets, do I?\n Warning: mysql_query(): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BOGUS_SQL' at line 1 in %s on line %d done! diff --git a/ext/mysql/tests/mysql_unbuffered_query.phpt b/ext/mysql/tests/mysql_unbuffered_query.phpt index ad9b4fbc52..8754b58b59 100644 --- a/ext/mysql/tests/mysql_unbuffered_query.phpt +++ b/ext/mysql/tests/mysql_unbuffered_query.phpt @@ -107,6 +107,7 @@ if (!mysql_query('DROP TABLE IF EXISTS test', $link)) { mysql_close($link); ?> --EXPECTF-- +Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d array(1) { [%u|b%"valid"]=> %unicode|string%(30) "this is sql but with semicolon" |