Browse Source

No more test failure for libmysql, http://news.php.net/php.internals/55210

pull/7/head
Ulf Wendel 15 years ago
parent
commit
ac90fb4287
  1. 12
      ext/mysqli/tests/mysqli_stmt_num_rows.phpt

12
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 {

Loading…
Cancel
Save