summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Wendel <uw@php.net>2011-09-05 16:24:40 +0000
committerUlf Wendel <uw@php.net>2011-09-05 16:24:40 +0000
commit797ac9ad3e8011948b5760513bc19445ba3a184f (patch)
tree7015fcbbd185d084784c97b955a4a89430605461
parent5308ed60f3f2ceb60deefe68a3adc846fea6308b (diff)
downloadphp-git-797ac9ad3e8011948b5760513bc19445ba3a184f.tar.gz
No more test failure for libmysql, http://news.php.net/php.internals/55210
-rw-r--r--ext/mysqli/tests/mysqli_stmt_num_rows.phpt12
1 files changed, 11 insertions, 1 deletions
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 {