svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_num_rows.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
trunk/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
| From: | Ulf Wendel | Date: | Mon, 05 Sep 2011 16:24:40 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_num_rows.phpt branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_num_rows.phpt trunk/ext/mysqli/tests/mysqli_stmt_num_rows.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-66233@lists.php.net to get a copy of this message | ||
uw Mon, 05 Sep 2011 16:24:40 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=316190
Log:
No more test failure for libmysql, http://news.php.net/php.internals/55210
Changed paths:
U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
U php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_num_rows.phpt 2011-09-05 15:37:58 UTC
(rev 316189)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_num_rows.phpt 2011-09-05 16:24:40 UTC
(rev 316190)
@@ -82,7 +82,17 @@
$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 {
Modified: php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_num_rows.phpt 2011-09-05 15:37:58 UTC
(rev 316189)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/tests/mysqli_stmt_num_rows.phpt 2011-09-05 16:24:40 UTC
(rev 316190)
@@ -82,7 +82,17 @@
$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 {
Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_num_rows.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_num_rows.phpt 2011-09-05 15:37:58 UTC (rev
316189)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_num_rows.phpt 2011-09-05 16:24:40 UTC (rev
316190)
@@ -82,7 +82,17 @@
$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 {