uw Mon, 21 Sep 2009 10:06:13 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=288516
Log: Fixing mysqli_result_references_mysqlnd.php Changed paths: U php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt U php/php-src/trunk/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt =================================================================== --- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt 2009-09-21 09:52:19 UTC (rev 288515) +++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt 2009-09-21 10:06:13 UTC (rev 288516) @@ -9,6 +9,9 @@ require_once('connect.inc'); if (!$IS_MYSQLND) die("skip Test for mysqlnd only"); + +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1)) + die("skip (TODO) PHP 6.0 has a difference debug_zval_dump output format"); ?> <?php require_once('skipifemb.inc'); ?> --FILE-- @@ -30,6 +33,8 @@ $references[$idx]['id_ref'] = &$row['id']; $references[$idx++]['id_copy'] = $row['id']; } + + debug_zval_dump($references); mysqli_free_result($res); if (!(mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id ASC LIMIT 2")) || @@ -52,7 +57,7 @@ print "done!"; ?> --EXPECTF-- -array(2) refcount(2){ +array(1) refcount(2){ [0]=> array(4) refcount(1){ [%u|b%"row_ref"]=> @@ -69,6 +74,24 @@ [%u|b%"id_copy"]=> %unicode|string%(1) "1" refcount(1) } +} +array(2) refcount(2){ + [0]=> + array(4) refcount(1){ + [%u|b%"row_ref"]=> + &NULL refcount(2) + [%u|b%"row_copy"]=> + array(2) refcount(1){ + [%u|b%"id"]=> + %unicode|string%(1) "1" refcount(1) + [%u|b%"label"]=> + %unicode|string%(1) "a" refcount(1) + } + [%u|b%"id_ref"]=> + %unicode|string%(1) "1" refcount(1) + [%u|b%"id_copy"]=> + %unicode|string%(1) "1" refcount(1) + } [1]=> array(5) refcount(1){ [%u|b%"row_ref"]=> @@ -76,14 +99,14 @@ [%u|b%"id"]=> &%unicode|string%(1) "2" refcount(2) [%u|b%"label"]=> - %unicode|string%(1) "b" refcount(3) + %unicode|string%(1) "b" refcount(2) } [%u|b%"row_copy"]=> array(2) refcount(1){ [%u|b%"id"]=> - %unicode|string%(1) "2" refcount(2) + %unicode|string%(1) "2" refcount(1) [%u|b%"label"]=> - %unicode|string%(1) "b" refcount(3) + %unicode|string%(1) "b" refcount(2) } [%u|b%"id_ref"]=> &%unicode|string%(1) "2" refcount(2) Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt =================================================================== --- php/php-src/trunk/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt 2009-09-21 09:52:19 UTC (rev 288515) +++ php/php-src/trunk/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt 2009-09-21 10:06:13 UTC (rev 288516) @@ -9,6 +9,9 @@ require_once('connect.inc'); if (!$IS_MYSQLND) die("skip Test for mysqlnd only"); + +if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1)) + die("skip (TODO) PHP 6.0 has a difference debug_zval_dump output format"); ?> <?php require_once('skipifemb.inc'); ?> --FILE-- @@ -30,6 +33,8 @@ $references[$idx]['id_ref'] = &$row['id']; $references[$idx++]['id_copy'] = $row['id']; } + + debug_zval_dump($references); mysqli_free_result($res); if (!(mysqli_real_query($link, "SELECT id, label FROM test ORDER BY id ASC LIMIT 2")) || @@ -52,7 +57,7 @@ print "done!"; ?> --EXPECTF-- -array(2) refcount(2){ +array(1) refcount(2){ [0]=> array(4) refcount(1){ [%u|b%"row_ref"]=> @@ -69,6 +74,24 @@ [%u|b%"id_copy"]=> %unicode|string%(1) "1" refcount(1) } +} +array(2) refcount(2){ + [0]=> + array(4) refcount(1){ + [%u|b%"row_ref"]=> + &NULL refcount(2) + [%u|b%"row_copy"]=> + array(2) refcount(1){ + [%u|b%"id"]=> + %unicode|string%(1) "1" refcount(1) + [%u|b%"label"]=> + %unicode|string%(1) "a" refcount(1) + } + [%u|b%"id_ref"]=> + %unicode|string%(1) "1" refcount(1) + [%u|b%"id_copy"]=> + %unicode|string%(1) "1" refcount(1) + } [1]=> array(5) refcount(1){ [%u|b%"row_ref"]=> @@ -76,14 +99,14 @@ [%u|b%"id"]=> &%unicode|string%(1) "2" refcount(2) [%u|b%"label"]=> - %unicode|string%(1) "b" refcount(3) + %unicode|string%(1) "b" refcount(2) } [%u|b%"row_copy"]=> array(2) refcount(1){ [%u|b%"id"]=> - %unicode|string%(1) "2" refcount(2) + %unicode|string%(1) "2" refcount(1) [%u|b%"label"]=> - %unicode|string%(1) "b" refcount(3) + %unicode|string%(1) "b" refcount(2) } [%u|b%"id_ref"]=> &%unicode|string%(1) "2" refcount(2)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php