From: Ulf Wendel Date: Mon, 5 Sep 2011 16:24:40 +0000 (+0000) Subject: No more test failure for libmysql, http://news.php.net/php.internals/55210 X-Git-Tag: php-5.3.9RC1~227 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6e15cc51783a1d104287fe6a8f105a108d37a4f;p=php No more test failure for libmysql, http://news.php.net/php.internals/55210 --- diff --git a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt index af81ca4e8a..a1f5e89c7a 100644 --- a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt +++ b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt @@ -82,7 +82,17 @@ require_once('skipifconnectfailure.inc'); $i++; } while (mysqli_stmt_fetch($stmt)); - if (7 !== ($tmp = mysqli_stmt_num_rows($stmt))) + /* NOTE to users + Behaviour with libmysql is UNDEFINED, see http://news.php.net/php.internals/55210 + Because it is undefined it is allowed to the mysqlnd DEVELOPER to implement + any behaviour they like, including the one checked for in this test. + What the test does is cover an implementation detail of the mysqlnd library. + This implementation detail may, at any time, change without prior notice. + On the contrary, the mysqlnd way is a reasonable one and, maybe, one fine + day, after Klingons visited earh, becomes the official one. Meanwhile do + not rely on it. + */ + if ($IS_MYSQLND && (7 !== ($tmp = mysqli_stmt_num_rows($stmt)))) printf("[54] Expecting int/7, got %s/%s\n", gettype($tmp), $tmp); } else {