uw              Thu Jul  2 10:05:37 2009 UTC

  Added files:                 (Branch: PHP_5_3)
    /php-src/ext/mysql/tests    clean_table.inc 

  Modified files:              
    /php-src/ext/mysql/tests    002.phpt 003.phpt bug47438.phpt 
                                mysql_affected_rows.phpt 
                                mysql_create_db.phpt mysql_data_seek.phpt 
                                mysql_db_query.phpt mysql_drop_db.phpt 
                                mysql_errno.phpt mysql_error.phpt 
                                mysql_fetch_array.phpt 
                                mysql_fetch_assoc.phpt 
                                mysql_fetch_field.phpt 
                                mysql_fetch_lengths.phpt 
                                mysql_fetch_object.phpt 
                                mysql_fetch_row.phpt 
                                mysql_field_flags.phpt 
                                mysql_field_len.phpt mysql_field_name.phpt 
                                mysql_field_seek.phpt 
                                mysql_field_table.phpt 
                                mysql_field_type.phpt 
                                mysql_free_result.phpt 
                                mysql_get_host_info.phpt 
                                mysql_get_proto_info.phpt 
                                mysql_get_server_info.phpt mysql_info.phpt 
                                mysql_insert_id.phpt mysql_list_dbs.phpt 
                                mysql_list_fields.phpt 
                                mysql_list_tables.phpt 
                                mysql_max_persistent.phpt 
                                mysql_num_fields.phpt mysql_num_rows.phpt 
                                mysql_pconn_disable.phpt 
                                mysql_pconn_kill.phpt 
                                mysql_pconn_max_links.phpt mysql_ping.phpt 
                                mysql_query.phpt mysql_result.phpt 
                                mysql_trace_mode.phpt 
                                mysql_unbuffered_query.phpt 
  Log:
  MFH. Adding CLEAN sections, fixing some SKIPIF sections. Cool new 
run-tests.php, Zoe (and other) - its a great help to detect stinky SKIPIF and 
CLEAN
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/002.phpt?r1=1.1.8.3&r2=1.1.8.4&diff_format=u
Index: php-src/ext/mysql/tests/002.phpt
diff -u php-src/ext/mysql/tests/002.phpt:1.1.8.3 
php-src/ext/mysql/tests/002.phpt:1.1.8.4
--- php-src/ext/mysql/tests/002.phpt:1.1.8.3    Wed Jul  1 15:33:31 2009
+++ php-src/ext/mysql/tests/002.phpt    Thu Jul  2 10:05:36 2009
@@ -32,6 +32,10 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 resource(%d) of type (mysql link)
 bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/003.phpt?r1=1.1.8.3&r2=1.1.8.4&diff_format=u
Index: php-src/ext/mysql/tests/003.phpt
diff -u php-src/ext/mysql/tests/003.phpt:1.1.8.3 
php-src/ext/mysql/tests/003.phpt:1.1.8.4
--- php-src/ext/mysql/tests/003.phpt:1.1.8.3    Wed Jul  1 15:33:31 2009
+++ php-src/ext/mysql/tests/003.phpt    Thu Jul  2 10:05:36 2009
@@ -52,6 +52,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 ==stdClass==
 object(stdClass)#%d (1) {
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/bug47438.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u
Index: php-src/ext/mysql/tests/bug47438.phpt
diff -u php-src/ext/mysql/tests/bug47438.phpt:1.1.2.3 
php-src/ext/mysql/tests/bug47438.phpt:1.1.2.4
--- php-src/ext/mysql/tests/bug47438.phpt:1.1.2.3       Thu Feb 19 12:13:50 2009
+++ php-src/ext/mysql/tests/bug47438.phpt       Thu Jul  2 10:05:36 2009
@@ -16,7 +16,7 @@
 mysql_select_db($db, $link);
 mysql_query("DROP TABLE IF EXISTS test_47438", $link);
 mysql_query("CREATE TABLE test_47438 (a INT, b INT, c INT)", $link);
-mysql_query("INSERT INTO test_47438 VALUES (10, 11, 12), (20, 21, 22)", 
$link); 
+mysql_query("INSERT INTO test_47438 VALUES (10, 11, 12), (20, 21, 22)", $link);
 $result = mysql_query("SELECT * FROM test_47438", $link);
 mysql_field_seek($result, 1);
 
@@ -32,6 +32,20 @@
 mysql_query("DROP TABLE IF EXISTS test_47438", $link);
 
 ?>
+--CLEAN--
+<?php
+require_once('connect.inc');
+
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket))
+        printf("[c001] Cannot connect to the server using host=%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
+                $host, $user, $db, $port, $socket);
+
+if (!mysql_select_db($db, $link) ||
+       !mysql_query("DROP TABLE IF EXISTS test_47438", $link))
+       printf("[c002] [%d] %s\n", mysql_errno($link), mysql_error($link));
+
+mysql_close($link);
+?>
 --EXPECT--
 0.a
 1.b
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_affected_rows.phpt?r1=1.3.2.4&r2=1.3.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_affected_rows.phpt
diff -u php-src/ext/mysql/tests/mysql_affected_rows.phpt:1.3.2.4 
php-src/ext/mysql/tests/mysql_affected_rows.phpt:1.3.2.5
--- php-src/ext/mysql/tests/mysql_affected_rows.phpt:1.3.2.4    Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_affected_rows.phpt    Thu Jul  2 10:05:37 2009
@@ -116,5 +116,9 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_create_db.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u
Index: php-src/ext/mysql/tests/mysql_create_db.phpt
diff -u php-src/ext/mysql/tests/mysql_create_db.phpt:1.2.2.2 
php-src/ext/mysql/tests/mysql_create_db.phpt:1.2.2.3
--- php-src/ext/mysql/tests/mysql_create_db.phpt:1.2.2.2        Wed Oct 10 
09:51:45 2007
+++ php-src/ext/mysql/tests/mysql_create_db.phpt        Thu Jul  2 10:05:37 2009
@@ -40,5 +40,17 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once('connect.inc');
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket))
+       printf("[c001] Cannot connect to the server using host=%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
+               $host, $user, $db, $port, $socket);
+
+if (!mysql_query("DROP DATABASE IF EXISTS mysqlcreatedb", $link))
+       printf("[c002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+mysql_close($link);
+?>
 --EXPECTF--
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_data_seek.phpt?r1=1.2.2.4&r2=1.2.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_data_seek.phpt
diff -u php-src/ext/mysql/tests/mysql_data_seek.phpt:1.2.2.4 
php-src/ext/mysql/tests/mysql_data_seek.phpt:1.2.2.5
--- php-src/ext/mysql/tests/mysql_data_seek.phpt:1.2.2.4        Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_data_seek.phpt        Thu Jul  2 10:05:37 2009
@@ -62,6 +62,10 @@
 
 print "done!\n";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_data_seek(): Offset 4 is invalid for MySQL result index %d (or 
the query data is unbuffered) in %s on line %d
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_db_query.phpt?r1=1.2.2.4&r2=1.2.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_db_query.phpt
diff -u php-src/ext/mysql/tests/mysql_db_query.phpt:1.2.2.4 
php-src/ext/mysql/tests/mysql_db_query.phpt:1.2.2.5
--- php-src/ext/mysql/tests/mysql_db_query.phpt:1.2.2.4 Wed Mar 25 10:27:38 2009
+++ php-src/ext/mysql/tests/mysql_db_query.phpt Thu Jul  2 10:05:37 2009
@@ -57,5 +57,9 @@
 
 print "done!\n";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_drop_db.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u
Index: php-src/ext/mysql/tests/mysql_drop_db.phpt
diff -u php-src/ext/mysql/tests/mysql_drop_db.phpt:1.2.2.2 
php-src/ext/mysql/tests/mysql_drop_db.phpt:1.2.2.3
--- php-src/ext/mysql/tests/mysql_drop_db.phpt:1.2.2.2  Wed Oct 10 09:53:34 2007
+++ php-src/ext/mysql/tests/mysql_drop_db.phpt  Thu Jul  2 10:05:37 2009
@@ -39,5 +39,17 @@
 
 print "done!\n";
 ?>
+--CLEAN--
+<?php
+require_once('connect.inc');
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket))
+       printf("[c001] Cannot connect to the server using host=%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
+               $host, $user, $db, $port, $socket);
+
+if (!mysql_query("DROP DATABASE IF EXISTS mysqldropdb", $link))
+       printf("[c002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+mysql_close($link);
+?>
 --EXPECTF--
 done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_errno.phpt?r1=1.3.2.4&r2=1.3.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_errno.phpt
diff -u php-src/ext/mysql/tests/mysql_errno.phpt:1.3.2.4 
php-src/ext/mysql/tests/mysql_errno.phpt:1.3.2.5
--- php-src/ext/mysql/tests/mysql_errno.phpt:1.3.2.4    Fri Nov 28 20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_errno.phpt    Thu Jul  2 10:05:37 2009
@@ -50,6 +50,10 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 int(0)
 int(%d)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_error.phpt?r1=1.2.2.4&r2=1.2.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_error.phpt
diff -u php-src/ext/mysql/tests/mysql_error.phpt:1.2.2.4 
php-src/ext/mysql/tests/mysql_error.phpt:1.2.2.5
--- php-src/ext/mysql/tests/mysql_error.phpt:1.2.2.4    Fri Nov 28 20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_error.phpt    Thu Jul  2 10:05:37 2009
@@ -57,6 +57,10 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_error(): %d is not a valid MySQL-Link resource in %s on line %d
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_fetch_array.phpt?r1=1.3.2.5&r2=1.3.2.6&diff_format=u
Index: php-src/ext/mysql/tests/mysql_fetch_array.phpt
diff -u php-src/ext/mysql/tests/mysql_fetch_array.phpt:1.3.2.5 
php-src/ext/mysql/tests/mysql_fetch_array.phpt:1.3.2.6
--- php-src/ext/mysql/tests/mysql_fetch_array.phpt:1.3.2.5      Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_fetch_array.phpt      Thu Jul  2 10:05:37 2009
@@ -277,6 +277,10 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 [005]
 array(4) {
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_fetch_assoc.phpt?r1=1.3.2.4&r2=1.3.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_fetch_assoc.phpt
diff -u php-src/ext/mysql/tests/mysql_fetch_assoc.phpt:1.3.2.4 
php-src/ext/mysql/tests/mysql_fetch_assoc.phpt:1.3.2.5
--- php-src/ext/mysql/tests/mysql_fetch_assoc.phpt:1.3.2.4      Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_fetch_assoc.phpt      Thu Jul  2 10:05:37 2009
@@ -58,6 +58,10 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 [005]
 array(2) {
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_fetch_field.phpt?r1=1.4.2.4&r2=1.4.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_fetch_field.phpt
diff -u php-src/ext/mysql/tests/mysql_fetch_field.phpt:1.4.2.4 
php-src/ext/mysql/tests/mysql_fetch_field.phpt:1.4.2.5
--- php-src/ext/mysql/tests/mysql_fetch_field.phpt:1.4.2.4      Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_fetch_field.phpt      Thu Jul  2 10:05:37 2009
@@ -133,6 +133,10 @@
        mysql_close($link);
        print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 object(stdClass)#%d (13) {
   [%u|b%"name"]=>
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_fetch_lengths.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_fetch_lengths.phpt
diff -u php-src/ext/mysql/tests/mysql_fetch_lengths.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_fetch_lengths.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_fetch_lengths.phpt:1.3.2.3    Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_fetch_lengths.phpt    Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_fetch_lengths()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -34,6 +34,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 array(2) {
   [0]=>
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_fetch_object.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_fetch_object.phpt
diff -u php-src/ext/mysql/tests/mysql_fetch_object.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_fetch_object.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_fetch_object.phpt:1.3.2.3     Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_fetch_object.phpt     Thu Jul  2 10:05:37 2009
@@ -77,6 +77,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 object(stdClass)#%d (2) {
   [%u|b%"ID"]=>
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_fetch_row.phpt?r1=1.3.2.5&r2=1.3.2.6&diff_format=u
Index: php-src/ext/mysql/tests/mysql_fetch_row.phpt
diff -u php-src/ext/mysql/tests/mysql_fetch_row.phpt:1.3.2.5 
php-src/ext/mysql/tests/mysql_fetch_row.phpt:1.3.2.6
--- php-src/ext/mysql/tests/mysql_fetch_row.phpt:1.3.2.5        Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_fetch_row.phpt        Thu Jul  2 10:05:37 2009
@@ -36,6 +36,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 [004]
 array(2) {
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_field_flags.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_field_flags.phpt
diff -u php-src/ext/mysql/tests/mysql_field_flags.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_field_flags.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_field_flags.phpt:1.3.2.3      Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_field_flags.phpt      Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_field_flags()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -135,6 +135,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_field_flags() expects exactly 2 parameters, 1 given in %s on 
line %d
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_field_len.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_field_len.phpt
diff -u php-src/ext/mysql/tests/mysql_field_len.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_field_len.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_field_len.phpt:1.3.2.3        Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_field_len.phpt        Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_field_len()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -42,6 +42,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_field_len() expects exactly 2 parameters, 1 given in %s on line 
%d
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_field_name.phpt?r1=1.3.2.4&r2=1.3.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_field_name.phpt
diff -u php-src/ext/mysql/tests/mysql_field_name.phpt:1.3.2.4 
php-src/ext/mysql/tests/mysql_field_name.phpt:1.3.2.5
--- php-src/ext/mysql/tests/mysql_field_name.phpt:1.3.2.4       Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_field_name.phpt       Thu Jul  2 10:05:37 2009
@@ -41,6 +41,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_field_name() expects exactly 2 parameters, 1 given in %s on 
line %d
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_field_seek.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_field_seek.phpt
diff -u php-src/ext/mysql/tests/mysql_field_seek.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_field_seek.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_field_seek.phpt:1.3.2.3       Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_field_seek.phpt       Thu Jul  2 10:05:37 2009
@@ -39,6 +39,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_field_seek(): Field -1 is invalid for MySQL result index %d in 
%s on line %d
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_field_table.phpt?r1=1.3.2.4&r2=1.3.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_field_table.phpt
diff -u php-src/ext/mysql/tests/mysql_field_table.phpt:1.3.2.4 
php-src/ext/mysql/tests/mysql_field_table.phpt:1.3.2.5
--- php-src/ext/mysql/tests/mysql_field_table.phpt:1.3.2.4      Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_field_table.phpt      Thu Jul  2 10:05:37 2009
@@ -41,6 +41,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_field_table() expects exactly 2 parameters, 1 given in %s on 
line %d
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_field_type.phpt?r1=1.3.2.4&r2=1.3.2.5&diff_format=u
Index: php-src/ext/mysql/tests/mysql_field_type.phpt
diff -u php-src/ext/mysql/tests/mysql_field_type.phpt:1.3.2.4 
php-src/ext/mysql/tests/mysql_field_type.phpt:1.3.2.5
--- php-src/ext/mysql/tests/mysql_field_type.phpt:1.3.2.4       Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_field_type.phpt       Thu Jul  2 10:05:37 2009
@@ -41,6 +41,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_field_type() expects exactly 2 parameters, 1 given in %s on 
line %d
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_free_result.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_free_result.phpt
diff -u php-src/ext/mysql/tests/mysql_free_result.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_free_result.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_free_result.phpt:1.3.2.3      Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_free_result.phpt      Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_free_result()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -39,6 +39,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 bool(true)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_get_host_info.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_get_host_info.phpt
diff -u php-src/ext/mysql/tests/mysql_get_host_info.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_get_host_info.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_get_host_info.phpt:1.3.2.3    Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_get_host_info.phpt    Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_get_host_info()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -36,5 +36,9 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_get_proto_info.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_get_proto_info.phpt
diff -u php-src/ext/mysql/tests/mysql_get_proto_info.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_get_proto_info.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_get_proto_info.phpt:1.3.2.3   Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_get_proto_info.phpt   Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_get_proto_info()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -26,5 +26,9 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_get_server_info.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_get_server_info.phpt
diff -u php-src/ext/mysql/tests/mysql_get_server_info.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_get_server_info.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_get_server_info.phpt:1.3.2.3  Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_get_server_info.phpt  Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_get_server_info()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_info.phpt?r1=1.3.2.2&r2=1.3.2.3&diff_format=u
Index: php-src/ext/mysql/tests/mysql_info.phpt
diff -u php-src/ext/mysql/tests/mysql_info.phpt:1.3.2.2 
php-src/ext/mysql/tests/mysql_info.phpt:1.3.2.3
--- php-src/ext/mysql/tests/mysql_info.phpt:1.3.2.2     Wed Oct 10 09:53:34 2007
+++ php-src/ext/mysql/tests/mysql_info.phpt     Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_info()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -65,5 +65,9 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_insert_id.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_insert_id.phpt
diff -u php-src/ext/mysql/tests/mysql_insert_id.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_insert_id.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_insert_id.phpt:1.3.2.3        Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_insert_id.phpt        Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_insert_id()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -60,6 +60,10 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_insert_id(): %d is not a valid MySQL-Link resource in %s on 
line %d
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_list_dbs.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_list_dbs.phpt
diff -u php-src/ext/mysql/tests/mysql_list_dbs.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_list_dbs.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_list_dbs.phpt:1.3.2.3 Fri Nov 28 20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_list_dbs.phpt Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_list_dbs()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -46,5 +46,9 @@
 
 print "done!\n";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_list_fields.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_list_fields.phpt
diff -u php-src/ext/mysql/tests/mysql_list_fields.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_list_fields.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_list_fields.phpt:1.3.2.3      Thu Jul  2 
07:42:48 2009
+++ php-src/ext/mysql/tests/mysql_list_fields.phpt      Thu Jul  2 10:05:37 2009
@@ -41,5 +41,20 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once('connect.inc');
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket))
+       printf("[c001] Cannot connect to the server using host=%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
+               $host, $user, $db, $port, $socket);
+
+if (!mysql_query("DROP TABLE IF EXISTS test", $link))
+       printf("[c002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+if (!mysql_query("DROP TABLE IF EXISTS test2", $link))
+       printf("[c002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+
+mysql_close($link);
+?>
 --EXPECTF--
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_list_tables.phpt?r1=1.2.2.3&r2=1.2.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_list_tables.phpt
diff -u php-src/ext/mysql/tests/mysql_list_tables.phpt:1.2.2.3 
php-src/ext/mysql/tests/mysql_list_tables.phpt:1.2.2.4
--- php-src/ext/mysql/tests/mysql_list_tables.phpt:1.2.2.3      Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_list_tables.phpt      Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_list_tables()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -77,5 +77,9 @@
 
 print "done!\n";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_max_persistent.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/mysql/tests/mysql_max_persistent.phpt
diff -u php-src/ext/mysql/tests/mysql_max_persistent.phpt:1.1.2.2 
php-src/ext/mysql/tests/mysql_max_persistent.phpt:1.1.2.3
--- php-src/ext/mysql/tests/mysql_max_persistent.phpt:1.1.2.2   Fri Oct 12 
11:57:18 2007
+++ php-src/ext/mysql/tests/mysql_max_persistent.phpt   Thu Jul  2 10:05:37 2009
@@ -4,15 +4,9 @@
 <?php
 require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
-require_once('connect.inc');
-
-$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket);
-if (!$link)
-       die("skip Cannot connect to MySQL");
+require_once('table.inc');
 
-mysql_close($link);
-
-mysqli_query('DROP USER pcontest', $link);
+mysql_query('DROP USER pcontest', $link);
 if (!mysql_query('CREATE USER pcontest IDENTIFIED BY "pcontest"', $link)) {
        printf("skip Cannot create second DB user [%d] %s", mysql_errno($link), 
mysql_error($link));
        mysql_close($link);
@@ -81,6 +75,20 @@
 mysql_close($links[0]);
 print "done!\n";
 ?>
+--CLEAN--
+<?php
+// connect + select_db
+require_once("connect.inc");
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
+       printf("[c001] Cannot connect to the server using host=%s/%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
+         $host, $myhost, $user, $db, $port, $socket);
+}
+
+...@mysql_query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest', $link);
+...@mysql_query('DROP USER pcontest', $link);
+
+mysql_close($link);
+?>
 --EXPECTF--
 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
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_num_fields.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_num_fields.phpt
diff -u php-src/ext/mysql/tests/mysql_num_fields.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_num_fields.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_num_fields.phpt:1.3.2.3       Fri Nov 28 
20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_num_fields.phpt       Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_num_fields()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -47,6 +47,10 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_num_fields(): %d is not a valid MySQL result resource in %s on 
line %d
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_num_rows.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_num_rows.phpt
diff -u php-src/ext/mysql/tests/mysql_num_rows.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_num_rows.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_num_rows.phpt:1.3.2.3 Fri Nov 28 20:23:49 2008
+++ php-src/ext/mysql/tests/mysql_num_rows.phpt Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_num_rows()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -57,6 +57,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in 
%s on line %d
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_pconn_disable.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/mysql/tests/mysql_pconn_disable.phpt
diff -u php-src/ext/mysql/tests/mysql_pconn_disable.phpt:1.1.2.1 
php-src/ext/mysql/tests/mysql_pconn_disable.phpt:1.1.2.2
--- php-src/ext/mysql/tests/mysql_pconn_disable.phpt:1.1.2.1    Wed Oct 10 
09:55:28 2007
+++ php-src/ext/mysql/tests/mysql_pconn_disable.phpt    Thu Jul  2 10:05:37 2009
@@ -52,6 +52,10 @@
 
        print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 [001] Can connect to the server.
 [002] Can fetch data using persistent connection! Data = '1'
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_pconn_kill.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/mysql/tests/mysql_pconn_kill.phpt
diff -u php-src/ext/mysql/tests/mysql_pconn_kill.phpt:1.1.2.1 
php-src/ext/mysql/tests/mysql_pconn_kill.phpt:1.1.2.2
--- php-src/ext/mysql/tests/mysql_pconn_kill.phpt:1.1.2.1       Wed Oct 10 
09:55:28 2007
+++ php-src/ext/mysql/tests/mysql_pconn_kill.phpt       Thu Jul  2 10:05:37 2009
@@ -1,7 +1,7 @@
 --TEST--
 mysql_pconnect() - killing persitent connection
 --SKIPIF--
-<?php 
+<?php
 require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
@@ -24,7 +24,7 @@
                printf("[001] Cannot connect to the server using host=%s/%s, 
user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $myhost, $user, $db, $port, $socket);
        mysql_select_db($db, $plink);
-                       
+
        $pthread_id = mysql_thread_id($plink);
        $thread_id = mysql_thread_id($link);
 
@@ -40,8 +40,8 @@
                printf("[003] Cannot find regular connection thread in process 
list, [%d] %s\n", mysql_errno($link), mysql_error($link));
        if (!isset($processlist[$pthread_id]))
                printf("[004] Cannot find persistent connection thread in 
process list, [%d] %s\n", mysql_errno($link), mysql_error($link));
-               
-       if (!mysql_query(sprintf("KILL %d", $pthread_id), $link)) 
+
+       if (!mysql_query(sprintf("KILL %d", $pthread_id), $link))
                printf("[005] Cannot kill persistent connection thread, [%d] 
%s\n", mysql_errno($link), mysql_error($link));
 
        while (1) {
@@ -64,7 +64,7 @@
 
        mysql_close($plink);
 
-       if (!($plink = mysql_pconnect($myhost, $user, $passwd))) 
+       if (!($plink = mysql_pconnect($myhost, $user, $passwd)))
                printf("[009] Cannot create new persistent connection, [%d] 
%s\n", mysql_errno(), mysql_error());
        mysql_select_db($db, $plink);
 
@@ -82,7 +82,7 @@
                printf("[012] Cannot connect to the server using host=%s/%s, 
user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $myhost, $user, $db, $port, $socket);
        mysql_select_db($db, $link2);
-       if (!mysql_query(sprintf("KILL %d", $thread_id), $link2)) 
+       if (!mysql_query(sprintf("KILL %d", $thread_id), $link2))
                printf("[013] Cannot kill regular connection thread, [%d] 
%s\n", mysql_errno($link2), mysql_error($link2));
 
        if (!($link = mysql_connect($myhost, $user, $passwd, true)))
@@ -101,6 +101,10 @@
        mysql_close($link2);
        print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 bool(true)
 done!
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_pconn_max_links.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/mysql/tests/mysql_pconn_max_links.phpt
diff -u php-src/ext/mysql/tests/mysql_pconn_max_links.phpt:1.1.2.2 
php-src/ext/mysql/tests/mysql_pconn_max_links.phpt:1.1.2.3
--- php-src/ext/mysql/tests/mysql_pconn_max_links.phpt:1.1.2.2  Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_pconn_max_links.phpt  Thu Jul  2 10:05:37 2009
@@ -4,7 +4,7 @@
 <?php
        require_once('skipif.inc');
        require_once('skipifconnectfailure.inc');
-       require_once('connect.inc');
+       require_once('table.inc');
 
        if ($socket)
                $host = sprintf("%s:%s", $host, $socket);
@@ -139,6 +139,20 @@
        mysql_close($link);
        print "done!";
 ?>
+--CLEAN--
+<?php
+// connect + select_db
+require_once("connect.inc");
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
+       printf("[c001] Cannot connect to the server using host=%s/%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
+         $host, $myhost, $user, $db, $port, $socket);
+}
+
+...@mysql_query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest', $link);
+...@mysql_query('DROP USER pcontest', $link);
+
+mysql_close($link);
+?>
 --EXPECTF--
 array(2) {
   [%u|b%"id"]=>
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_ping.phpt?r1=1.3.2.2&r2=1.3.2.3&diff_format=u
Index: php-src/ext/mysql/tests/mysql_ping.phpt
diff -u php-src/ext/mysql/tests/mysql_ping.phpt:1.3.2.2 
php-src/ext/mysql/tests/mysql_ping.phpt:1.3.2.3
--- php-src/ext/mysql/tests/mysql_ping.phpt:1.3.2.2     Wed Oct 10 09:55:28 2007
+++ php-src/ext/mysql/tests/mysql_ping.phpt     Thu Jul  2 10:05:37 2009
@@ -1,8 +1,8 @@
 --TEST--
 mysql_ping()
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -37,6 +37,10 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 bool(true)
 bool(true)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_query.phpt?r1=1.4.2.3&r2=1.4.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_query.phpt
diff -u php-src/ext/mysql/tests/mysql_query.phpt:1.4.2.3 
php-src/ext/mysql/tests/mysql_query.phpt:1.4.2.4
--- php-src/ext/mysql/tests/mysql_query.phpt:1.4.2.3    Wed Jul  1 15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_query.phpt    Thu Jul  2 10:05:37 2009
@@ -92,6 +92,26 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once('connect.inc');
+
+// connect + select_db
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
+       printf("[clean] Cannot connect to the server using host=%s/%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
+         $host, $myhost, $user, $db, $port, $socket);
+}
+
+if (!mysql_query('DROP TABLE IF EXISTS test', $link)) {
+       printf("[clean] Failed to drop test table: [%d] %s\n", 
mysql_errno($link), mysql_error($link));
+}
+
+/* MySQL server may not support this - ignore errors */
+...@mysql_query('DROP PROCEDURE IF EXISTS p', $link);
+...@mysql_query('DROP FUNCTION IF EXISTS f', $link);
+
+mysql_close($link);
+?>
 --EXPECTF--
 array(1) {
   [%u|b%"valid"]=>
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_result.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_result.phpt
diff -u php-src/ext/mysql/tests/mysql_result.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_result.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_result.phpt:1.3.2.3   Wed Jul  1 15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_result.phpt   Thu Jul  2 10:05:37 2009
@@ -60,6 +60,10 @@
 mysql_close($link);
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Warning: mysql_result(): Unable to jump to row -1 on MySQL result index %d in 
%s on line %d
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_trace_mode.phpt?r1=1.1.2.5&r2=1.1.2.6&diff_format=u
Index: php-src/ext/mysql/tests/mysql_trace_mode.phpt
diff -u php-src/ext/mysql/tests/mysql_trace_mode.phpt:1.1.2.5 
php-src/ext/mysql/tests/mysql_trace_mode.phpt:1.1.2.6
--- php-src/ext/mysql/tests/mysql_trace_mode.phpt:1.1.2.5       Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_trace_mode.phpt       Thu Jul  2 10:05:37 2009
@@ -10,12 +10,11 @@
 error_reporting=E_ALL | E_NOTICE | E_STRICT
 --FILE--
 <?php
-require_once('connect.inc');
 require_once('table.inc');
 
 $res1 = mysql_query('SELECT id FROM test', $link);
 
-if (!$res2 = mysql_db_query('test', 'SELECT id FROM test', $link))
+if (!$res2 = mysql_db_query($db, 'SELECT id FROM test', $link))
        printf("[001] [%d] %s\n", mysql_errno($link), mysql_error($link));
 mysql_free_result($res2);
 print mysql_escape_string("I don't mind character sets, do I?\n");
@@ -25,6 +24,10 @@
 
 print "done!\n";
 ?>
+--CLEAN--
+<?php
+require_once("clean_table.inc");
+?>
 --EXPECTF--
 Deprecated: mysql_db_query(): %s
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_unbuffered_query.phpt?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: php-src/ext/mysql/tests/mysql_unbuffered_query.phpt
diff -u php-src/ext/mysql/tests/mysql_unbuffered_query.phpt:1.3.2.3 
php-src/ext/mysql/tests/mysql_unbuffered_query.phpt:1.3.2.4
--- php-src/ext/mysql/tests/mysql_unbuffered_query.phpt:1.3.2.3 Wed Jul  1 
15:33:31 2009
+++ php-src/ext/mysql/tests/mysql_unbuffered_query.phpt Thu Jul  2 10:05:37 2009
@@ -86,6 +86,26 @@
 
 print "done!";
 ?>
+--CLEAN--
+<?php
+require_once('connect.inc');
+
+// connect + select_db
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
+       printf("[clean] Cannot connect to the server using host=%s/%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
+         $host, $myhost, $user, $db, $port, $socket);
+}
+
+if (!mysql_query('DROP TABLE IF EXISTS test', $link)) {
+       printf("[clean] Failed to drop test table: [%d] %s\n", 
mysql_errno($link), mysql_error($link));
+}
+
+/* MySQL server may not support this - ignore errors */
+...@mysql_query('DROP PROCEDURE IF EXISTS p', $link);
+...@mysql_query('DROP FUNCTION IF EXISTS f', $link);
+
+mysql_close($link);
+?>
 --EXPECTF--
 array(1) {
   [%u|b%"valid"]=>

http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/clean_table.inc?view=markup&rev=1.1
Index: php-src/ext/mysql/tests/clean_table.inc
+++ php-src/ext/mysql/tests/clean_table.inc
<?PHP
require_once('connect.inc');

// connect + select_db
if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
        printf("[clean] Cannot connect to the server using host=%s/%s, user=%s, 
passwd=***, dbname=%s, port=%s, socket=%s\n",
          $host, $myhost, $user, $db, $port, $socket);
}

if (!mysql_query('DROP TABLE IF EXISTS test', $link)) {
        printf("[clean] Failed to drop test table: [%d] %s\n", 
mysql_errno($link), mysql_error($link));
}

mysql_close($link);
?>
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to