List:Commits« Previous MessageNext Message »
From:uwendel Date:July 18 2007 8:37am
Subject:PHP mysqlnd svn commit: r780 - trunk/tests/ext/mysqli
View as plain text  
Author: uwendel
Date: 2007-07-18 10:37:52 +0200 (Wed, 18 Jul 2007)
New Revision: 780

Modified:
   trunk/tests/ext/mysqli/mysqli_fetch_assoc.phpt
   trunk/tests/ext/mysqli/mysqli_fetch_assoc_no_alias_utf8.phpt
   trunk/tests/ext/mysqli/mysqli_fetch_assoc_oo.phpt
   trunk/tests/ext/mysqli/mysqli_fetch_field_direct.phpt
   trunk/tests/ext/mysqli/mysqli_fetch_field_direct_oo.phpt
Log:
Should be Space2Tab only


Modified: trunk/tests/ext/mysqli/mysqli_fetch_assoc.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_fetch_assoc.phpt	2007-07-17 19:20:28 UTC (rev 779)
+++ trunk/tests/ext/mysqli/mysqli_fetch_assoc.phpt	2007-07-18 08:37:52 UTC (rev 780)
@@ -5,46 +5,46 @@
 <?php require_once('skipifemb.inc'); ?>
 --FILE--
 <?php
-    include "connect.inc";
-   
-    $tmp    = NULL;   
-    $link   = NULL;    
-    
-    // Note: no SQL type tests, internally the same function gets used as for
mysqli_fetch_array() which does a lot of SQL type test
-    
-    if (!is_null($tmp = @mysqli_fetch_assoc()))
-        printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-        
-    if (!is_null($tmp = @mysqli_fetch_assoc($link)))
-        printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+	include "connect.inc";
 
-    require('table.inc');    
-    if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) {
-        printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
-    
-    print "[005]\n";
-    var_dump(mysqli_fetch_assoc($res));
-    
-    print "[006]\n";
-    var_dump(mysqli_fetch_assoc($res));    
-    
-    mysqli_free_result($res);
-    
-    if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS a, 3 AS c, 4 AS C, NULL AS d,
true AS e")) {
-        printf("[007] Cannot run query, [%d] %s\n", mysqli_errno($link),
mysqli_error($link));
-    }
-    print "[008]\n";
-    var_dump(mysqli_fetch_assoc($res));
+	$tmp    = NULL;
+	$link   = NULL;
 
-    mysqli_free_result($res);
-    
-    if (NULL !== ($tmp = mysqli_fetch_assoc($res)))
-        printf("[008] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-    
-    mysqli_close($link);    
-       
-    print "done!";
+	// Note: no SQL type tests, internally the same function gets used as for
mysqli_fetch_array() which does a lot of SQL type test
+
+	if (!is_null($tmp = @mysqli_fetch_assoc()))
+		printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	if (!is_null($tmp = @mysqli_fetch_assoc($link)))
+		printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	require('table.inc');
+	if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) {
+		printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
+
+	print "[005]\n";
+	var_dump(mysqli_fetch_assoc($res));
+
+	print "[006]\n";
+	var_dump(mysqli_fetch_assoc($res));
+
+	mysqli_free_result($res);
+
+	if (!$res = mysqli_query($link, "SELECT 1 AS a, 2 AS a, 3 AS c, 4 AS C, NULL AS d, true
AS e")) {
+		printf("[007] Cannot run query, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
+	print "[008]\n";
+	var_dump(mysqli_fetch_assoc($res));
+
+	mysqli_free_result($res);
+
+	if (NULL !== ($tmp = mysqli_fetch_assoc($res)))
+		printf("[008] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	mysqli_close($link);
+
+	print "done!";
 ?>
 --EXPECTF--
 [005]
@@ -97,4 +97,4 @@
 }
 
 Warning: mysqli_fetch_assoc(): Couldn't fetch mysqli_result in %s on line %d
-done!
+done!
\ No newline at end of file

Modified: trunk/tests/ext/mysqli/mysqli_fetch_assoc_no_alias_utf8.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_fetch_assoc_no_alias_utf8.phpt	2007-07-17 19:20:28 UTC
(rev 779)
+++ trunk/tests/ext/mysqli/mysqli_fetch_assoc_no_alias_utf8.phpt	2007-07-18 08:37:52 UTC
(rev 780)
@@ -1,84 +1,82 @@
 --TEST--
 mysqli_fetch_assoc() - utf8
 --SKIPIF--
-<?php 
-    require_once('skipif.inc'); 
-    require_once('skipifemb.inc');
-    require('connect.inc');
+<?php
+	require_once('skipif.inc');
+	require_once('skipifemb.inc');
+	require('connect.inc');
 
-    if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
-        die("skip Cannot connect to server to check charsets");
+	if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+		die("skip Cannot connect to server to check charsets");
 
-    if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'UTF8'"))
-        die("skip Cannot run SHOW CHARACTER SET to check charsets");
+	if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'UTF8'"))
+		die("skip Cannot run SHOW CHARACTER SET to check charsets");
 
-    if (!$tmp = mysqli_fetch_assoc($res))
-        die("skip Looks like UTF8 is not available on the server");
+	if (!$tmp = mysqli_fetch_assoc($res))
+		die("skip Looks like UTF8 is not available on the server");
 
-    if (strtolower($tmp['Charset']) !== 'utf8')
-        die("skip Not sure if UTF8 is available, cancelling the test");
+	if (strtolower($tmp['Charset']) !== 'utf8')
+		die("skip Not sure if UTF8 is available, cancelling the test");
 
-    mysqli_free_result($res);
+	mysqli_free_result($res);
 
-    if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'UCS2'"))
-        die("skip Cannot run SHOW CHARACTER SET to check charsets");
+	if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'UCS2'"))
+		die("skip Cannot run SHOW CHARACTER SET to check charsets");
 
-    if (!$tmp = mysqli_fetch_assoc($res))
-        die("skip Looks like UCS2 is not available on the server");
+	if (!$tmp = mysqli_fetch_assoc($res))
+		die("skip Looks like UCS2 is not available on the server");
 
-    if (strtolower($tmp['Charset']) !== 'ucs2')
-        die("skip Not sure if UCS2 is available, cancelling the test");
+	if (strtolower($tmp['Charset']) !== 'ucs2')
+		die("skip Not sure if UCS2 is available, cancelling the test");
 
-    mysqli_free_result($res);
-    mysqli_close($link);
+	mysqli_free_result($res);
+	mysqli_close($link);
 ?>
-<?php require_once('skipifemb.inc'); ?>
 --FILE--
 <?php
-    include "connect.inc";    
-    require('table.inc');    
+	include "connect.inc";
+	require('table.inc');
 
-    /* some cyrillic (utf8) comes here */
-    if (!$res = mysqli_query($link, "SET NAMES UTF8")) {
-        printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
+	/* some cyrillic (utf8) comes here */
+	if (!$res = mysqli_query($link, "SET NAMES UTF8")) {
+		printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
 
-    if (!$res = mysqli_query($link, "SELECT 1 AS 'Андрей Христов', 2 AS
'Улф Вендел', 3 AS 'Георг Рихтер'")) {
-        printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
-    print "[003]\n";
-    var_dump(mysqli_fetch_assoc($res));
-    mysqli_free_result($res);
+	if (!$res = mysqli_query($link, "SELECT 1 AS 'Андрей Христов', 2 AS 'Улф
Вендел', 3 AS 'Георг Рихтер'")) {
+		printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
+	print "[003]\n";
+	var_dump(mysqli_fetch_assoc($res));
+	mysqli_free_result($res);
 
-    if (!$res = mysqli_query($link, "CREATE TABLE автори_на_mysqlnd (id integer
not null auto_increment primary key, име varchar(20) character set ucs2,
фамилия varchar(20) character set utf8)")) {
-        printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
-    if (!$res = mysqli_query($link, "INSERT INTO автори_на_mysqlnd (име,
фамилия) VALUES ('Андрей', 'Христов'), ('Георг',
'Рихтер'), ('Улф','Вендел')")) {
-        printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
-    if (!$res = mysqli_query($link, "INSERT INTO автори_на_mysqlnd (име,
фамилия) VALUES ('Andrey', 'Hristov'), ('Georg', 'Richter'), ('Ulf','Wendel')")) {
-        printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
-    if (!$res = mysqli_query($link, "INSERT INTO автори_на_mysqlnd (име,
фамилия) VALUES ('安德烈', 'Hristov'), ('格奥尔', 'Richter'),
('乌尔夫','Wendel')")) {
-        printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
+	if (!$res = mysqli_query($link, "CREATE TABLE автори_на_mysqlnd (id integer not
null auto_increment primary key, име varchar(20) character set ucs2, фамилия
varchar(20) character set utf8)")) {
+		printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
+	if (!$res = mysqli_query($link, "INSERT INTO автори_на_mysqlnd (име,
фамилия) VALUES ('Андрей', 'Христов'), ('Георг',
'Рихтер'), ('Улф','Вендел')")) {
+		printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
+	if (!$res = mysqli_query($link, "INSERT INTO автори_на_mysqlnd (име,
фамилия) VALUES ('Andrey', 'Hristov'), ('Georg', 'Richter'), ('Ulf','Wendel')")) {
+		printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
+	if (!$res = mysqli_query($link, "INSERT INTO автори_на_mysqlnd (име,
фамилия) VALUES ('安德烈', 'Hristov'), ('格奥尔', 'Richter'),
('乌尔夫','Wendel')")) {
+		printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
 
-    if (!$res = mysqli_query($link, "SELECT id, име, фамилия FROM
автори_на_mysqlnd ORDER BY фамилия, име")) {
-        printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
-    print "[009]\n";
-    while ($row = mysqli_fetch_assoc($res)) {
-        var_dump($row);
-    }
-    mysqli_free_result($res);
- 
-   if (!$res = mysqli_query($link, "DROP TABLE автори_на_mysqlnd")) {
-        printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
+	if (!$res = mysqli_query($link, "SELECT id, име, фамилия FROM
автори_на_mysqlnd ORDER BY фамилия, име")) {
+		printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
+	print "[009]\n";
+	while ($row = mysqli_fetch_assoc($res)) {
+		var_dump($row);
+	}
+	mysqli_free_result($res);
 
-    mysqli_close($link);
+	if (!$res = mysqli_query($link, "DROP TABLE автори_на_mysqlnd")) {
+		printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
 
-    print "done!";
+	mysqli_close($link);
+	print "done!";
 ?>
 --EXPECTF--
 [003]

Modified: trunk/tests/ext/mysqli/mysqli_fetch_assoc_oo.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_fetch_assoc_oo.phpt	2007-07-17 19:20:28 UTC (rev 779)
+++ trunk/tests/ext/mysqli/mysqli_fetch_assoc_oo.phpt	2007-07-18 08:37:52 UTC (rev 780)
@@ -5,51 +5,51 @@
 <?php require_once('skipifemb.inc'); ?>
 --FILE--
 <?php
-    include "connect.inc";
-   
-    $tmp    = NULL;   
-    $link   = NULL;    
-    
-    // Note: no SQL type tests, internally the same function gets used as for
mysqli_fetch_array() which does a lot of SQL type test
-    $mysqli = new mysqli();    
-    $res = @new mysqli_result($mysqli);
-    if (!is_null($tmp = @$res->fetch_assoc()))
-        printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);   
+	include "connect.inc";
 
-    require('table.inc');    
-    if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
-        printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***,
dbname=%s, port=%s, socket=%s\n",
-            $host, $user, $db, $port, $socket);
-            
-    if (!is_null($tmp = @$res->fetch_assoc($link)))
-        printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-            
-    if (!$res = $mysqli->query("SELECT id, label FROM test ORDER BY id LIMIT 1")) {
-        printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
-    }
-    
-    print "[005]\n";
-    var_dump($res->fetch_assoc());
-    
-    print "[006]\n";
-    var_dump($res->fetch_assoc());    
-    
-    $res->free_result();
-    
-    if (!$res = $mysqli->query("SELECT 1 AS a, 2 AS a, 3 AS c, 4 AS C, NULL AS d, true
AS e")) {
-        printf("[007] Cannot run query, [%d] %s\n", $mysqli->errno,
$mysqli->error);
-    }
-    print "[008]\n";
-    var_dump($res->fetch_assoc());
+	$tmp    = NULL;
+	$link   = NULL;
 
-    $res->free_result();
-    
-    if (NULL !== ($tmp = $res->fetch_assoc()))
-        printf("[008] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-    
-    mysqli_close($link);    
-       
-    print "done!";
+	// Note: no SQL type tests, internally the same function gets used as for
mysqli_fetch_array() which does a lot of SQL type test
+	$mysqli = new mysqli();
+	$res = @new mysqli_result($mysqli);
+	if (!is_null($tmp = @$res->fetch_assoc()))
+		printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	require('table.inc');
+	if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
+		printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***,
dbname=%s, port=%s, socket=%s\n",
+			$host, $user, $db, $port, $socket);
+
+	if (!is_null($tmp = @$res->fetch_assoc($link)))
+		printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	if (!$res = $mysqli->query("SELECT id, label FROM test ORDER BY id LIMIT 1")) {
+		printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error);
+	}
+
+	print "[005]\n";
+	var_dump($res->fetch_assoc());
+
+	print "[006]\n";
+	var_dump($res->fetch_assoc());
+
+	$res->free_result();
+
+	if (!$res = $mysqli->query("SELECT 1 AS a, 2 AS a, 3 AS c, 4 AS C, NULL AS d, true AS
e")) {
+		printf("[007] Cannot run query, [%d] %s\n", $mysqli->errno, $mysqli->error);
+	}
+	print "[008]\n";
+	var_dump($res->fetch_assoc());
+
+	$res->free_result();
+
+	if (NULL !== ($tmp = $res->fetch_assoc()))
+		printf("[008] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	mysqli_close($link);
+
+	print "done!";
 ?>
 --EXPECTF--
 [005]
@@ -102,4 +102,4 @@
 }
 
 Warning: mysqli_result::fetch_assoc(): Couldn't fetch mysqli_result in %s on line %d
-done!
+done!
\ No newline at end of file

Modified: trunk/tests/ext/mysqli/mysqli_fetch_field_direct.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_fetch_field_direct.phpt	2007-07-17 19:20:28 UTC (rev
779)
+++ trunk/tests/ext/mysqli/mysqli_fetch_field_direct.phpt	2007-07-18 08:37:52 UTC (rev
780)
@@ -5,37 +5,37 @@
 <?php require_once('skipifemb.inc'); ?>
 --FILE--
 <?php
-    include "connect.inc";
+	include "connect.inc";
 
-    $tmp    = NULL;
-    $link   = NULL;
+	$tmp    = NULL;
+	$link   = NULL;
 
-    if (!is_null($tmp = @mysqli_fetch_field_direct()))
-        printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+	if (!is_null($tmp = @mysqli_fetch_field_direct()))
+		printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
-    if (!is_null($tmp = @mysqli_fetch_field_direct($link)))
-        printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+	if (!is_null($tmp = @mysqli_fetch_field_direct($link)))
+		printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
-    if (!is_null($tmp = @mysqli_fetch_field_direct($link, $link)))
-        printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+	if (!is_null($tmp = @mysqli_fetch_field_direct($link, $link)))
+		printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
-    require('table.inc');
+	require('table.inc');
 
-    if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id
LIMIT 1")) {
-        printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
+	if (!$res = mysqli_query($link, "SELECT id AS ID, label FROM test AS TEST ORDER BY id
LIMIT 1")) {
+		printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
 
-    var_dump(mysqli_fetch_field_direct($res, -1));
-    var_dump(mysqli_fetch_field_direct($res, 0));
-    var_dump(mysqli_fetch_field_direct($res, 2));
+	var_dump(mysqli_fetch_field_direct($res, -1));
+	var_dump(mysqli_fetch_field_direct($res, 0));
+	var_dump(mysqli_fetch_field_direct($res, 2));
 
-    mysqli_free_result($res);
-    
-    if (NULL !== ($tmp = mysqli_fetch_field_direct($res, 0)))
-        printf("Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-    
-    mysqli_close($link);
-    print "done!";
+	mysqli_free_result($res);
+
+	if (NULL !== ($tmp = mysqli_fetch_field_direct($res, 0)))
+		printf("Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	mysqli_close($link);
+	print "done!";
 ?>
 --EXPECTF--
 Warning: mysqli_fetch_field_direct(): Field offset is invalid for resultset in %s on line
%d
@@ -102,4 +102,4 @@
 bool(false)
 
 Warning: mysqli_fetch_field_direct(): Couldn't fetch mysqli_result in %s on line %d
-done!
+done!
\ No newline at end of file

Modified: trunk/tests/ext/mysqli/mysqli_fetch_field_direct_oo.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_fetch_field_direct_oo.phpt	2007-07-17 19:20:28 UTC (rev
779)
+++ trunk/tests/ext/mysqli/mysqli_fetch_field_direct_oo.phpt	2007-07-18 08:37:52 UTC (rev
780)
@@ -5,46 +5,46 @@
 <?php require_once('skipifemb.inc'); ?>
 --FILE--
 <?php
-    include "connect.inc";
+	include "connect.inc";
 
-    $tmp    = NULL;
-    $link   = NULL;
-    
-    $mysqli = new mysqli();    
-    $res = @new mysqli_result($mysqli);
-    if (!is_null($tmp = @$res->fetch_field_direct()))
-        printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);    
+	$tmp    = NULL;
+	$link   = NULL;
 
-    require('table.inc');
-    
-    if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
-        printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***,
dbname=%s, port=%s, socket=%s\n",
-            $host, $user, $db, $port, $socket);
+	$mysqli = new mysqli();
+	$res = @new mysqli_result($mysqli);
+	if (!is_null($tmp = @$res->fetch_field_direct()))
+		printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
 
-    if (!$res = $mysqli->query("SELECT id AS ID, label FROM test AS TEST ORDER BY id
LIMIT 1")) {
-        printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    }
-    
-    if (!is_null($tmp = @$res->fetch_field_direct()))
-        printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);    
-    
-    if (!is_null($tmp = @$res->fetch_field_direct($link)))
-        printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+	require('table.inc');
 
-    if (!is_null($tmp = @$res->fetch_field_direct($link, $link)))
-        printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+	if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
+		printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***,
dbname=%s, port=%s, socket=%s\n",
+			$host, $user, $db, $port, $socket);
 
-    var_dump($res->fetch_field_direct(-1));
-    var_dump($res->fetch_field_direct(0));
-    var_dump($res->fetch_field_direct(2));
+	if (!$res = $mysqli->query("SELECT id AS ID, label FROM test AS TEST ORDER BY id
LIMIT 1")) {
+		printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+	}
 
-    $res->free_result();
-    
-    if (NULL !== ($tmp = $res->fetch_field_direct(0)))
-        printf("[007] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-    
-    $mysqli->close();
-    print "done!";
+	if (!is_null($tmp = @$res->fetch_field_direct()))
+		printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	if (!is_null($tmp = @$res->fetch_field_direct($link)))
+		printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	if (!is_null($tmp = @$res->fetch_field_direct($link, $link)))
+		printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	var_dump($res->fetch_field_direct(-1));
+	var_dump($res->fetch_field_direct(0));
+	var_dump($res->fetch_field_direct(2));
+
+	$res->free_result();
+
+	if (NULL !== ($tmp = $res->fetch_field_direct(0)))
+		printf("[007] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+	$mysqli->close();
+	print "done!";
 ?>
 --EXPECTF--
 Warning: mysqli_result::fetch_field_direct(): Field offset is invalid for resultset in %s
on line %d
@@ -111,4 +111,4 @@
 bool(false)
 
 Warning: mysqli_result::fetch_field_direct(): Couldn't fetch mysqli_result in %s on line
%d
-done!
+done!
\ No newline at end of file

Thread
PHP mysqlnd svn commit: r780 - trunk/tests/ext/mysqliuwendel18 Jul