]> granicus.if.org Git - php/commitdiff
Fixing test. There is nothing we can do about the MySQL Client Library allocate huge...
authorUlf Wendel <uw@php.net>
Tue, 22 Sep 2009 07:11:50 +0000 (07:11 +0000)
committerUlf Wendel <uw@php.net>
Tue, 22 Sep 2009 07:11:50 +0000 (07:11 +0000)
ext/mysqli/tests/mysqli_stmt_bind_result.phpt

index 00750ee7d450e442284d3a3a71225bd23856b51e..f5756740e03b12a879edce1ea38b61625cf34544 100644 (file)
@@ -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);