From: Ulf Wendel Date: Mon, 19 Oct 2009 16:07:10 +0000 (+0000) Subject: mysqlnd is a bit more verbose than libmysql - silence mysqlnd here for easier compari... X-Git-Tag: php-5.4.0alpha1~191^2~2497 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82bb99e12db870c2eb543d0dbfbcdd16e2bbdbaf;p=php mysqlnd is a bit more verbose than libmysql - silence mysqlnd here for easier comparison of test results. --- diff --git a/ext/mysqli/tests/mysqli_no_reconnect.phpt b/ext/mysqli/tests/mysqli_no_reconnect.phpt index aa7b1c3b51..0fbc1ffbbd 100644 --- a/ext/mysqli/tests/mysqli_no_reconnect.phpt +++ b/ext/mysqli/tests/mysqli_no_reconnect.phpt @@ -78,8 +78,19 @@ mysqli.reconnect=0 mysqli_connect_errno(), mysqli_connect_error()); $thread_id_timeout = mysqli_thread_id($link); - if (!mysqli_query($link, sprintf('KILL %d', $thread_id_timeout))) - printf("[013] Cannot KILL timeout connection, [%d] %s\n", mysqli_errno($link2), mysqli_error($link2)); + if ($IS_MYSQLND) { + /* + mysqlnd is a bit more verbose than libmysql. mysqlnd should print: + Warning: mysqli_query(): MySQL server has gone away in %s on line %d + + Warning: mysqli_query(): Error reading result set's header in %d on line %d + */ + if (!@mysqli_query($link, sprintf('KILL %d', $thread_id_timeout))) + printf("[013] Cannot KILL timeout connection, [%d] %s\n", mysqli_errno($link2), mysqli_error($link2)); + } else { + if (!mysqli_query($link, sprintf('KILL %d', $thread_id_timeout))) + printf("[013] Cannot KILL timeout connection, [%d] %s\n", mysqli_errno($link2), mysqli_error($link2)); + } // Give the server a second to really kill the other thread... sleep(1);