Deprecate ext/mysql.
authorAdam Harvey <aharvey@php.net>
Mon, 10 Dec 2012 14:12:09 +0000 (22:12 +0800)
committerAdam Harvey <aharvey@php.net>
Mon, 10 Dec 2012 14:12:09 +0000 (22:12 +0800)
Per https://wiki.php.net/rfc/mysql_deprecation, connecting to a MySQL database
via ext/mysql now generates an E_DEPRECATED error. This commit includes the
minimal EXPECTF updates required for the test suite to pass: it may be
preferable to refactor some of the tests to suppress deprecation errors in
situations where no other error is expected from mysql_[p]connect(), but I'm
not enough of a MySQL expert to want to get my hands that dirty in a long
standing test suite.

68 files changed:
NEWS
UPGRADING
ext/mysql/php_mysql.c
ext/mysql/tests/001.phpt
ext/mysql/tests/002.phpt
ext/mysql/tests/003.phpt
ext/mysql/tests/bug47438.phpt
ext/mysql/tests/bug48754.phpt
ext/mysql/tests/bug51242.phpt
ext/mysql/tests/bug53649.phpt
ext/mysql/tests/bug55473.phpt
ext/mysql/tests/mysql_affected_rows.phpt
ext/mysql/tests/mysql_client_encoding.phpt
ext/mysql/tests/mysql_close.phpt
ext/mysql/tests/mysql_connect.phpt
ext/mysql/tests/mysql_constants.phpt
ext/mysql/tests/mysql_create_db.phpt
ext/mysql/tests/mysql_data_seek.phpt
ext/mysql/tests/mysql_db_name.phpt
ext/mysql/tests/mysql_db_query.phpt
ext/mysql/tests/mysql_deprecated_api.phpt
ext/mysql/tests/mysql_drop_db.phpt
ext/mysql/tests/mysql_errno.phpt
ext/mysql/tests/mysql_error.phpt
ext/mysql/tests/mysql_fetch_array.phpt
ext/mysql/tests/mysql_fetch_assoc.phpt
ext/mysql/tests/mysql_fetch_field.phpt
ext/mysql/tests/mysql_fetch_lengths.phpt
ext/mysql/tests/mysql_fetch_object.phpt
ext/mysql/tests/mysql_fetch_row.phpt
ext/mysql/tests/mysql_field_flags.phpt
ext/mysql/tests/mysql_field_len.phpt
ext/mysql/tests/mysql_field_name.phpt
ext/mysql/tests/mysql_field_seek.phpt
ext/mysql/tests/mysql_field_table.phpt
ext/mysql/tests/mysql_field_type.phpt
ext/mysql/tests/mysql_free_result.phpt
ext/mysql/tests/mysql_get_host_info.phpt
ext/mysql/tests/mysql_get_proto_info.phpt
ext/mysql/tests/mysql_get_server_info.phpt
ext/mysql/tests/mysql_info.phpt
ext/mysql/tests/mysql_insert_id.phpt
ext/mysql/tests/mysql_list_dbs.phpt
ext/mysql/tests/mysql_list_fields.phpt
ext/mysql/tests/mysql_list_processes.phpt
ext/mysql/tests/mysql_list_tables.phpt
ext/mysql/tests/mysql_max_links.phpt
ext/mysql/tests/mysql_max_persistent.phpt
ext/mysql/tests/mysql_mysqlnd_read_timeout_long.phpt
ext/mysql/tests/mysql_num_fields.phpt
ext/mysql/tests/mysql_num_rows.phpt
ext/mysql/tests/mysql_pconn_disable.phpt
ext/mysql/tests/mysql_pconn_kill.phpt
ext/mysql/tests/mysql_pconn_max_links.phpt
ext/mysql/tests/mysql_pconn_reuse.phpt
ext/mysql/tests/mysql_pconnect.phpt
ext/mysql/tests/mysql_ping.phpt
ext/mysql/tests/mysql_query.phpt
ext/mysql/tests/mysql_query_load_data_openbasedir.phpt
ext/mysql/tests/mysql_real_escape_string.phpt
ext/mysql/tests/mysql_result.phpt
ext/mysql/tests/mysql_select_db.phpt
ext/mysql/tests/mysql_set_charset.phpt
ext/mysql/tests/mysql_stat.phpt
ext/mysql/tests/mysql_tablename.phpt
ext/mysql/tests/mysql_thread_id.phpt
ext/mysql/tests/mysql_trace_mode.phpt
ext/mysql/tests/mysql_unbuffered_query.phpt

diff --git a/NEWS b/NEWS
index 98d54b28016a1218c333351e48d4613fd7e1fda0..ce5f08cc0bd6ea2725bdd08b86968e68dc21ed51 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -163,6 +163,11 @@ PHP                                                                        NEWS
   . mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw
     E_DEPRECATED. (GoogleGuy)
 
+- MySQL
+  . This extension is now deprecated, and deprecation warnings will be generated
+    when connections are established to databases via mysql_connect(),
+    mysql_pconnect(), or through implicit connection. (Adam)
+
 - MySQLi
   . Dropped support for LOAD DATA LOCAL INFILE handlers when using libmysql.
     Known for stability problems. (Andrey)
index b01a399697b39263680c77cfebd26b0f8a485397..f65e8687049ca3e5c6a744a448887b3be48e7f15 100755 (executable)
--- a/UPGRADING
+++ b/UPGRADING
@@ -85,6 +85,10 @@ PHP 5.5 UPGRADE NOTES
 3. Deprecated Functionality
 ========================================
 
+- The original MySQL extension is now deprecated, and will generate deprecation
+  warnings when connecting to a database through mysql_connect(),
+  mysql_pconnect() or by establishing an implicit connection. Use MySQLi or PDO
+  instead.
 - The preg_replace /e modifier is now deprecated.  Use
   preg_replace_callback instead.
   (https://wiki.php.net/rfc/remove_preg_replace_eval_modifier)
index f1aab94f8a2e2742ba8256280fca6bb6ce1b3a45..dc7f108b5d76a9fbb4a3172309904fb5e7c31ef4 100644 (file)
@@ -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,
index 72b6614771e1abab95392b0c280e53b0c56d44cf..8782fd125271a940f0a1c31219c3de44e3e34d72 100644 (file)
@@ -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!
index 8355c5f11ea29f51b6c2311c33cedc9155ebfa4f..8f53f4d724f6aff37e30df8f58f1c26422930224 100644 (file)
@@ -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)
index 2d0b68b9f8c1c884712145273d7826429f531a7d..365abc20e99a74e0b67f9be9bed1da87f2727397 100644 (file)
@@ -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"]=>
index 11f0ff33b85522ea44be872c2222773dcf0afe71..fa7b3e6a2bdff6108f51e4673aeb1b0264acfd2e 100644 (file)
@@ -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
index fb322f4615716b1b14d0ce64f9f92d0db1eb0aac..b461db3320637399fd50bdfe07fd9c9a5f0da475 100644 (file)
@@ -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)
index 9b62cdb4cd473df5300c1d8afce7efc6966b0fca..6801d3021f3dda9c460a9f0453bdaca4a465a91c 100644 (file)
@@ -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)
index 70bf9bed3630b4277b11bd5f34904348e75138b6..7ccdf08e5f46f983553fd5e22315258266a03c95 100644 (file)
@@ -67,5 +67,6 @@ mysql_close($link);
 \r
 unlink('bug53649.data');\r
 ?>\r
---EXPECT--\r
-done
\ No newline at end of file
+--EXPECTF--\r
+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\r
+done\r
index df584bdef9ca3a3610397da886ef6306182e9a82..1cc2dc928251c095339230cc6cf1484211c64e79 100644 (file)
@@ -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!
\ No newline at end of file
+done!
index 145e1f5c0b95a9a27d11797b5430fedcb4bbd0a6..2449ac416e2a397b14966949673bafcfbfb247c4 100644 (file)
@@ -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!
index 8aa67a03ac0b0f1ce120f35976a625d1c1dacefa..5b21765ddb29ac7b5e671bd02de15a7d55e5a9c3 100644 (file)
@@ -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!
index 8f305ba7801a7cf483f663d1e2806f1adfadfb1e..e676511961c25073b18581dcb03cd904669a50d2 100644 (file)
@@ -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!
index 715824804076d9d1179fc82429f666c262cf1904..2b73092375da8e6c36c7d6627fd6dedf4e675129 100644 (file)
@@ -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!
index 13461002095533f7dbf4147ada1ba645f0f11f44..e68774503c18e1d75be889d1ec3fde54b99404cf 100644 (file)
@@ -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!
index bc91964f5032dbd6ec82c783c4b2a93d1ed8a03a..0b6d58a09e74573323697691d074b4c2ba482be9 100644 (file)
@@ -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!
index 46a0f86bdeaf7033b35cfa2fa9bd5e47abe677f1..72d3e6327405fdef5e88dcae0ccc506e0ec215bb 100644 (file)
@@ -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
index b7f9042209f3d0bfb2aca1358226436f37521457..92878e994dc1c6217b21c0762ec2cf0d73fbfe90 100644 (file)
@@ -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
index bb837dd6c01dc4eb1a0666ace934469c5a63f577..291fbfaac61d3dc4aa81f1322b8ddc8b5c633b55 100644 (file)
@@ -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!
index d54307ca0eff59bf34ddf568ee5f71be66ddd92e..ebf72375cf6263139db12562d913e7010a1defd6 100644 (file)
@@ -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!
index bd729e7ab85ac783a4fc91bb0389c25e9b506050..3281b8a333f0f0f6e2b043d0525d99ab4dcc873f 100644 (file)
@@ -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!
index 8cfa7bd33bfd0c1f285b386583ffa47b84c1da84..c9c2956290bf6293848bad0a5e6e9a95e15ab3b9 100644 (file)
@@ -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)
 
index aae4480174f73bf1341ce7a35e7cd07d754e6436..a2cf7e003430ae5385c0b225511d10b591141eec 100644 (file)
@@ -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!
index 362cf99ddc6727cb7e40dd449466555b6c28f728..8ccefd024269403421de1773c9fd244e9a419822 100644 (file)
@@ -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]=>
index 3c5ca79b2d93dc70718f64304ed107b173deb42d..048613a6be402c04f2841fa762d6d968ab87b9d9 100644 (file)
@@ -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"]=>
index ef03279087154a71473c2cb87fddac32d474c66d..85c1fd6f7ef0ed769fdaa910b53657f2115b90ae 100644 (file)
@@ -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"
index 4793e2649bae0202c2d74d2fd0311e3f6859568f..f0fbbb7bb875fb2b9f39dadd57f8a836f893f91d 100644 (file)
@@ -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)
index c11631e04cac6c06cd2fb2c166c02460201aa99c..666d0ee821a0a9b9ef67c4d55ba08e12d329630e 100644 (file)
@@ -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"
index 8d6b9585beea259c115a99e0dd3386eb9526786f..0ed932e2c082a73595ab69a2bf05fcfd21fbab77 100644 (file)
@@ -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!
index e07e041d2a38b21b48950eeb19aa81670c52f8c8..7f1b366d5cb1b07361733081678df29f3f4627a9 100644 (file)
@@ -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
index a740c62439dd17dfa314f92e8029b649e4087bac..119d3521646c9db4d70863d86e566fc91f685543 100644 (file)
@@ -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
index c87ac188f75467f368b366fa01113967aa8a2d6e..85f6c42d93affc19998679df4a0817ec992fc695 100644 (file)
@@ -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
index 7e8b313c879e70de9fb34d57f387213c283e06cb..8487493a8809346b142362b65c9ed7f1f23e485c 100644 (file)
@@ -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) {
index 707d1df987ee2287444d69d8590f7cfdf1aaab50..826651a855d034836313d54f148dba930b55089b 100644 (file)
@@ -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
index c737b4e3f2c68061e6e5819cd18d1780f522cf03..c767cab6f14bd76f2d9455c753dae83bd114622b 100644 (file)
@@ -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
index fe132d8c2d3c53d6ad4c60587adda7548c073d65..90498bd59a276272dd4a21e4142589594561080c 100644 (file)
@@ -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
index 443910c319041d27834a1868d1499e4679de35db..4b21ddbb41ef9c0cb46f61fa4c6784e657650e4b 100644 (file)
@@ -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!
index 043fb62043a804912fb94048290ae233cb4ed48d..3e1481121e104fcadd3aa461a3bf298e1ce3e937 100644 (file)
@@ -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!
index e806335e29c1178b6aeb6d69caa738088fd3bd67..ad192e4722cf8629217bd4fff72686d9b7dafc9e 100644 (file)
@@ -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!
index 464578c8a568a4e31405ced3faa1591918335007..c4786790424048feb62dde3725cfbca8b55c8d2c 100644 (file)
@@ -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!
index 460d9f3f4d6b6dd12d4c2f65ab827fa84bcfc883..b69a96ae9ba38b19342d2f057b2309f768125d73 100644 (file)
@@ -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!
index 054e02ef98066038905dc16fb9149baf96fd2388..402161aa63366b6bc1a099a791033bc8f72cb75d 100644 (file)
@@ -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!
index e0b3fd5e39368a1ecd0225e70b67be8b22a13482..259a94a39963ebcf7de24c35a25a575d7021ce7f 100644 (file)
@@ -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
index b0c71ad1b41d3860a6a46ddb1a501408a4eece51..7838a6f98adc9d08f5601185b089805186385cf4 100644 (file)
@@ -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!
index cf0b1a636d40c400c110a75e74cbe3d70c29b68b..3b753ae37ab4403fe24563daa97e30412f0b506b 100644 (file)
@@ -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!
index 52ecd0ac08336ed5c12c39d4da2585bf245598fb..32096c426e34b81348e9daf459fd30c91d6bae0a 100644 (file)
@@ -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!
index ac35cd178badd9cefa891522eeecfcf04a1d927e..36f2266665de20eff08e9eefdeae4482622246df 100644 (file)
@@ -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!
index d54cb50708b0135bf8b58601dff29ae84339af54..2c67e64878d61e5ad0f6715feaf263d0798aa46d 100644 (file)
@@ -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!
index 0dad5f771d075230250b6f93bea2b73647923d9d..4621dc91f83c0dfc4468bdb7f8a450774d6b6f1b 100644 (file)
@@ -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!
index 0f538c4a2b16d54225ab21f17f8e950cf453bcb0..5a803d41f91661450cf093ff803bf8c84e0f5648 100644 (file)
@@ -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
index 532e2e5788555a2ff742c18eceaa33849ecfb1ae..6997e5970f56b343397192988cf8858cc8fb039a 100644 (file)
@@ -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!
index efef4216045ee9e567a0c0f8fc8d47cfed1e46cb..eb1feb7b85622f81fb08c71184f1504909584ed8 100644 (file)
@@ -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!
index 3eca0e534a833d0370544b9fd40d41ab2f0db0bf..ced94b3dbf5e842e1f5816cd51198e5bcdace31f 100644 (file)
@@ -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"
index ffa5f75f1ba18c276519cc062b4e352acae165e4..26b4ca5f49dab344373fb4c9122bfc3731c454b1 100644 (file)
@@ -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!
index 5a7db93ab304455a2f9af55c6c1489db7e8c43ae..ec28d2ea8a27e9a3165917129eae5f35274b5017 100644 (file)
@@ -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!
index edf18c4391a6e2aed509bc19128e27e0e0afed1f..0308df3396f65126ca63e8bda67e9c74d820ec1f 100644 (file)
@@ -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)
index a5978a6c11817dc1c79e0e929b7ab1429939c22c..01b14ee28452c45ea66bee6420a5bf7b48fc1bf8 100644 (file)
@@ -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"
index aa15f5ca126125c169d8aa6425d6b05287da31c8..c2cb41e0260f009e95270aa978a3608649d215cf 100644 (file)
@@ -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?
index 2789ad276c71c6ef0052ca42958568d4c3914823..4fdedf7b37389a9f75db4946c0c7351ca9555d60 100644 (file)
@@ -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) "\""
index 2c7c618547e66c8b3fdde62c891c6c7bfd11abf5..0a58b9b88340acf03fc25d97d4de96cd62fc9b1f 100644 (file)
@@ -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)
 
index 211e34222ea166610ff0b4d27068c555cf9b0bb6..e9bc99aa736d997459b626b496c931147501ce38 100644 (file)
@@ -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)
 
index 953323b49c39d4ff7799c3b3ae19065f32c67be5..a0bccd8c31ad6f2b8885b6d24cd6ae9bddb011f8 100644 (file)
@@ -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!
index 30a840a2a15dba0a1230627888cc973b3d69a90c..d6a34df581add9602f67ca0c9d88737df4426236 100644 (file)
@@ -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!
index 2415e4fda0f0072d48818c53e89f602a52b70a24..4bbe54d443c3e49e6e45b47082ee1d86597601fe 100644 (file)
@@ -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
index b05bb3ed1c01a50c5ab0466dc166259645beb818..aa95d319449a2f75afa1abfe29a9a7f98ef9340d 100644 (file)
@@ -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!
index 2b6c61d27bb1ba728d340fb4e436c2961fd80b62..7655975d70c6552b452d1a670c8bcd10101626a8 100644 (file)
@@ -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!
index ad9b4fbc5240a20ea2fcadade15b793ccec12327..8754b58b5906935debd6c96c1263f5cd35b5170e 100644 (file)
@@ -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"