uw                                       Wed, 23 Nov 2011 16:47:22 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=319718

Log:
Fix test

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_kill.phpt
    U   php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_kill.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_kill.phpt

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_kill.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_kill.phpt      
2011-11-23 16:38:50 UTC (rev 319717)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_kill.phpt      
2011-11-23 16:47:22 UTC (rev 319718)
@@ -44,28 +44,31 @@
                if ($link->info != 'Records: 6  Duplicates: 0  Warnings: 0') {
                        printf("[008] mysqlnd used to be more verbose and used 
to support SELECT");
                }
+               if ($link->stat != NULL) {
+                       printf("[009] NULL expected because of error.\n");
+               }
        } else {
                if ($link->info != NULL) {
-                       printf("[008] Time for wonders - libmysql has started 
to support SELECT, change test");
+                       printf("[010] Time for wonders - libmysql has started 
to support SELECT, change test");
                }
        }

        mysqli_close($link);

        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, 
$socket))
-               printf("[009] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());
+               printf("[011] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());

        mysqli_kill($link, -1);
        if ((!$res = mysqli_query($link, "SELECT id FROM test LIMIT 1")) ||
                (!$tmp = mysqli_fetch_assoc($res))) {
-               printf("[010] Connection should not be gone, [%d] %s\n", 
mysqli_errno($link), mysqli_error($link));
+               printf("[012] Connection should not be gone, [%d] %s\n", 
mysqli_errno($link), mysqli_error($link));
        }
        var_dump($tmp);
        mysqli_free_result($res);
        mysqli_close($link);

        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, 
$socket))
-               printf("[011] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());
+               printf("[013] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());

        mysqli_change_user($link, "This might work if you accept anonymous 
users in your setup", "password", $db);      mysqli_kill($link, -1);

@@ -108,6 +111,8 @@
   %unicode|string%(%d) "%s"
   [%u|b%"server_version"]=>
   int(%d)
+  ["stat"]=>
+  %s
   [%u|b%"sqlstate"]=>
   %unicode|string%(5) "HY000"
   [%u|b%"protocol_version"]=>
@@ -125,4 +130,4 @@
 }

 Warning: mysqli_kill(): processid should have positive value in %s on line %d
-done!
\ No newline at end of file
+done!

Modified: php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_kill.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_kill.phpt      
2011-11-23 16:38:50 UTC (rev 319717)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_kill.phpt      
2011-11-23 16:47:22 UTC (rev 319718)
@@ -42,30 +42,33 @@
        var_dump($link);
        if ($IS_MYSQLND) {
                if ($link->info != 'Records: 6  Duplicates: 0  Warnings: 0') {
-                       printf("[008] mysqlnd used to be more verbose and used 
to support SELECT");
+                       printf("[008] mysqlnd used to be more verbose and used 
to support SELECT\n");
                }
+               if ($link->stat != NULL) {
+                       printf("[009] NULL expected because of error.\n");
+               }
        } else {
                if ($link->info != NULL) {
-                       printf("[008] Time for wonders - libmysql has started 
to support SELECT, change test");
+                       printf("[008] Time for wonders - libmysql has started 
to support SELECT, change test\n");
                }
        }

        mysqli_close($link);

        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, 
$socket))
-               printf("[009] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());
+               printf("[010] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());

        mysqli_kill($link, -1);
        if ((!$res = mysqli_query($link, "SELECT id FROM test LIMIT 1")) ||
                (!$tmp = mysqli_fetch_assoc($res))) {
-               printf("[010] Connection should not be gone, [%d] %s\n", 
mysqli_errno($link), mysqli_error($link));
+               printf("[011] Connection should not be gone, [%d] %s\n", 
mysqli_errno($link), mysqli_error($link));
        }
        var_dump($tmp);
        mysqli_free_result($res);
        mysqli_close($link);

        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, 
$socket))
-               printf("[011] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());
+               printf("[012] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());

        mysqli_change_user($link, "This might work if you accept anonymous 
users in your setup", "password", $db);      mysqli_kill($link, -1);

@@ -121,7 +124,7 @@
   [%u|b%"server_version"]=>
   int(%d)
   [%u|b%"stat"]=>
-  NULL
+  %s
   [%u|b%"sqlstate"]=>
   %unicode|string%(5) "HY000"
   [%u|b%"protocol_version"]=>

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_kill.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_kill.phpt 2011-11-23 16:38:50 UTC 
(rev 319717)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_kill.phpt 2011-11-23 16:47:22 UTC 
(rev 319718)
@@ -42,30 +42,33 @@
        var_dump($link);
        if ($IS_MYSQLND) {
                if ($link->info != 'Records: 6  Duplicates: 0  Warnings: 0') {
-                       printf("[008] mysqlnd used to be more verbose and used 
to support SELECT");
+                       printf("[008] mysqlnd used to be more verbose and used 
to support SELECT\n");
                }
+               if ($link->stat != NULL) {
+                       printf("[009] NULL expected because of error.\n");
+               }
        } else {
                if ($link->info != NULL) {
-                       printf("[008] Time for wonders - libmysql has started 
to support SELECT, change test");
+                       printf("[008] Time for wonders - libmysql has started 
to support SELECT, change test\n");
                }
        }

        mysqli_close($link);

        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, 
$socket))
-               printf("[009] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());
+               printf("[010] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());

        mysqli_kill($link, -1);
        if ((!$res = mysqli_query($link, "SELECT id FROM test LIMIT 1")) ||
                (!$tmp = mysqli_fetch_assoc($res))) {
-               printf("[010] Connection should not be gone, [%d] %s\n", 
mysqli_errno($link), mysqli_error($link));
+               printf("[011] Connection should not be gone, [%d] %s\n", 
mysqli_errno($link), mysqli_error($link));
        }
        var_dump($tmp);
        mysqli_free_result($res);
        mysqli_close($link);

        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, 
$socket))
-               printf("[011] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());
+               printf("[012] Cannot connect, [%d] %s\n", 
mysqli_connect_errno(), mysqli_connect_error());

        mysqli_change_user($link, "This might work if you accept anonymous 
users in your setup", "password", $db);      mysqli_kill($link, -1);

@@ -121,7 +124,7 @@
   [%u|b%"server_version"]=>
   int(%d)
   [%u|b%"stat"]=>
-  NULL
+  %s
   [%u|b%"sqlstate"]=>
   %unicode|string%(5) "HY000"
   [%u|b%"protocol_version"]=>

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to