uw Tue, 22 Sep 2009 07:11:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=288548
Log:
Fixing test. There is nothing we can do about the MySQL Client Library allocate
huge 4GB buffers for some SQL types.
Changed paths:
U
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
U php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
Modified:
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
2009-09-22 06:59:04 UTC (rev 288547)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
2009-09-22 07:11:50 UTC (rev 288548)
@@ -282,8 +282,12 @@
func_mysqli_stmt_bind_result($link, $engine, "b", "MEDIUMTEXT", "",
1640, $hint_str_or_unicode);
/* Is this one related? http://bugs.php.net/bug.php?id=35759 */
- func_mysqli_stmt_bind_result($link, $engine, "b", "LONGBLOB", "", 1660);
- func_mysqli_stmt_bind_result($link, $engine, "b", "LONGTEXT", "", 1680,
$hint_str_or_unicode);
+ if (($IS_MYSQLND) || (!$IS_MYSQLND && (ini_get('memory_limit') >
4294967296))) {
+ /* NOTE: the MySQL Client Library - not mysqlnd - will allocate
+ a hugge max_length(type) = 4GB bind buffer */
+ func_mysqli_stmt_bind_result($link, $engine, "b", "LONGBLOB",
"", 1660);
+ func_mysqli_stmt_bind_result($link, $engine, "b", "LONGTEXT",
"", 1680, $hint_str_or_unicode);
+ }
func_mysqli_stmt_bind_result($link, $engine, "s", "ENUM('a', 'b')",
"a", 1700, $hint_str_or_unicode);
func_mysqli_stmt_bind_result($link, $engine, "s", "ENUM('a', 'b')",
NULL, 1720, $hint_str_or_unicode);
Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
2009-09-22 06:59:04 UTC (rev 288547)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_stmt_bind_result.phpt
2009-09-22 07:11:50 UTC (rev 288548)
@@ -282,8 +282,12 @@
func_mysqli_stmt_bind_result($link, $engine, "b", "MEDIUMTEXT", "",
1640, $hint_str_or_unicode);
/* Is this one related? http://bugs.php.net/bug.php?id=35759 */
- func_mysqli_stmt_bind_result($link, $engine, "b", "LONGBLOB", "", 1660);
- func_mysqli_stmt_bind_result($link, $engine, "b", "LONGTEXT", "", 1680,
$hint_str_or_unicode);
+ if (($IS_MYSQLND) || (!$IS_MYSQLND && (ini_get('memory_limit') >
4294967296))) {
+ /* NOTE: the MySQL Client Library - not mysqlnd - will allocate
+ a hugge max_length(type) = 4GB bind buffer */
+ func_mysqli_stmt_bind_result($link, $engine, "b", "LONGBLOB",
"", 1660);
+ func_mysqli_stmt_bind_result($link, $engine, "b", "LONGTEXT",
"", 1680, $hint_str_or_unicode);
+ }
func_mysqli_stmt_bind_result($link, $engine, "s", "ENUM('a', 'b')",
"a", 1700, $hint_str_or_unicode);
func_mysqli_stmt_bind_result($link, $engine, "s", "ENUM('a', 'b')",
NULL, 1720, $hint_str_or_unicode);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php