1--TEST-- 2mysqli fetch long char/text 3--EXTENSIONS-- 4mysqli 5--SKIPIF-- 6<?php 7require_once dirname(__DIR__) . "/test_setup/test_helpers.inc"; 8mysqli_check_skip_test(); 9?> 10--FILE-- 11<?php 12require_once dirname(__DIR__) . "/test_setup/test_helpers.inc"; 13 14 $link = default_mysqli_connect(); 15 16 mysqli_query($link, "CREATE TABLE test_bind_fetch_char_long(c1 char(10), c2 text) ENGINE=" . get_default_db_engine()); 17 18 $a = str_repeat("A1", 32000); 19 20 mysqli_query($link, "INSERT INTO test_bind_fetch_char_long VALUES ('1234567890', '$a')"); 21 22 $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch_char_long"); 23 mysqli_stmt_bind_result($stmt, $c1, $c2); 24 mysqli_stmt_execute($stmt); 25 mysqli_stmt_fetch($stmt); 26 27 $test[] = $c1; 28 $test[] = ($a == $c2) ? "32K String ok" : "32K String failed"; 29 30 var_dump($test); 31 32 mysqli_stmt_fetch($stmt); 33 34 mysqli_stmt_close($stmt); 35 mysqli_close($link); 36 print "done!"; 37?> 38--CLEAN-- 39<?php 40require_once dirname(__DIR__) . "/test_setup/test_helpers.inc"; 41tear_down_table_on_default_connection('test_bind_fetch_char_long'); 42?> 43--EXPECT-- 44array(2) { 45 [0]=> 46 string(10) "1234567890" 47 [1]=> 48 string(13) "32K String ok" 49} 50done! 51