From: Ulf Wendel Date: Tue, 22 Sep 2009 07:11:50 +0000 (+0000) Subject: Fixing test. There is nothing we can do about the MySQL Client Library allocate huge... X-Git-Tag: php-5.4.0alpha1~191^2~2620 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f532a81aea155d0dd397fa985bfceb1e6a5b4b46;p=php Fixing test. There is nothing we can do about the MySQL Client Library allocate huge 4GB buffers for some SQL types. --- diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt index 00750ee7d4..f5756740e0 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt @@ -282,8 +282,12 @@ require_once('skipifconnectfailure.inc'); 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);