PHP mysqlnd svn commit: r700 - trunk/tests/ext/mysqli
Author: ahristov
Date: 2007-07-10 20:16:20 +0200 (Tue, 10 Jul 2007)
New Revision: 700
Modified:
trunk/tests/ext/mysqli/mysqli_stmt_get_result.phpt
trunk/tests/ext/mysqli/mysqli_stmt_get_result_metadata_fetch_field.phpt
Log:
Test fixes. Now we pass these 2
Modified: trunk/tests/ext/mysqli/mysqli_stmt_get_result.phpt
- trunk/tests/ext/mysqli/mysqli_stmt_get_result.phpt 2007-07-10 17:06:07 UTC (rev 699)
+++ trunk/tests/ext/mysqli/mysqli_stmt_get_result.phpt 2007-07-10 18:16:20 UTC (rev 700)
@@ -159,7 +159,7 @@
Warning: mysqli_stmt_get_result(): invalid object or resource mysqli_stmt
in %s on line %d
-[038] [0] []
+[038] [2014] [Commands out of sync; you can't run this command now]
[039] [0] []
array(2) {
["id"]=>
@@ -185,7 +185,7 @@
Warning: mysqli_stmt_get_result(): invalid object or resource mysqli_stmt
in %s on line %d
-[038] [0] []
+[038] [2014] [Commands out of sync; you can't run this command now]
[039] [0] []
array(2) {
[%s"id"]=>
@@ -201,4 +201,4 @@
}
Warning: mysqli_stmt_fetch(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
Modified: trunk/tests/ext/mysqli/mysqli_stmt_get_result_metadata_fetch_field.phpt
- trunk/tests/ext/mysqli/mysqli_stmt_get_result_metadata_fetch_field.phpt 2007-07-10 17:06:07 UTC (rev 699)
+++ trunk/tests/ext/mysqli/mysqli_stmt_get_result_metadata_fetch_field.phpt 2007-07-10 18:16:20 UTC (rev 700)
@@ -8,31 +8,31 @@
<?php
include "connect.inc";
require('table.inc');
-
- if (!($stmt = mysqli_stmt_init($link)) ||
- !mysqli_stmt_prepare($stmt, "SELECT id, label, id + 1 as _id, concat(label, '_') _label FROM test ORDER BY id ASC LIMIT 3") ||
- !mysqli_stmt_execute($stmt))
- printf("[006] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
-
- if (!is_object($res = mysqli_stmt_get_result($stmt)) || 'mysqli_result' != get_class($res)) {
- printf("[007] Expecting object/mysqli_result got %s/%s, [%d] %s\n",
- gettype($res), $res, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
- }
- if (!is_object($res_meta = mysqli_stmt_result_metadata($stmt)) ||
- 'mysqli_result' != get_class($res_meta)) {
- printf("[008] Expecting object/mysqli_result got %s/%s, [%d] %s\n",
- gettype($res), $res, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
- }
-
- $fields = array();
- while ($info = $res->fetch_field())
- var_dump($info);
-
- mysqli_stmt_close($stmt);
- mysqli_close($link);
- print "done!\n";
-
+ if (!($stmt = mysqli_stmt_init($link)) ||
+ !mysqli_stmt_prepare($stmt, "SELECT id, label, id + 1 as _id, concat(label, '_') ___label FROM test ORDER BY id ASC LIMIT 3") ||
+ !mysqli_stmt_execute($stmt))
+ printf("[006] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+
+ if (!is_object($res = mysqli_stmt_get_result($stmt)) || 'mysqli_result' != get_class($res)) {
+ printf("[007] Expecting object/mysqli_result got %s/%s, [%d] %s\n",
+ gettype($res), $res, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+ }
+
+ if (!is_object($res_meta = mysqli_stmt_result_metadata($stmt)) ||
+ 'mysqli_result' != get_class($res_meta)) {
+ printf("[008] Expecting object/mysqli_result got %s/%s, [%d] %s\n",
+ gettype($res), $res, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
+ }
+
+ $fields = array();
+ while ($info = $res->fetch_field()) {
+ var_dump($info);
+ }
+
+ mysqli_stmt_close($stmt);
+ mysqli_close($link);
+ print "done!\n";
?>
--EXPECTF--
object(stdClass)#%d (11) {
@@ -83,6 +83,54 @@
["decimals"]=>
int(0)
}
+object(stdClass)#%d (11) {
+ ["name"]=>
+ string(3) "_id"
+ ["orgname"]=>
+ string(0) ""
+ ["table"]=>
+ string(0) ""
+ ["orgtable"]=>
+ string(0) ""
+ ["def"]=>
+ string(0) ""
+ ["max_length"]=>
+ int(0)
+ ["length"]=>
+ int(12)
+ ["charsetnr"]=>
+ int(63)
+ ["flags"]=>
+ int(32897)
+ ["type"]=>
+ int(8)
+ ["decimals"]=>
+ int(0)
+}
+object(stdClass)#%d (11) {
+ ["name"]=>
+ string(8) "___label"
+ ["orgname"]=>
+ string(0) ""
+ ["table"]=>
+ string(0) ""
+ ["orgtable"]=>
+ string(0) ""
+ ["def"]=>
+ string(0) ""
+ ["max_length"]=>
+ int(2)
+ ["length"]=>
+ int(2)
+ ["charsetnr"]=>
+ int(8)
+ ["flags"]=>
+ int(0)
+ ["type"]=>
+ int(253)
+ ["decimals"]=>
+ int(31)
+}
done!
--UEXPECTF--
object(stdClass)#%d (11) {
@@ -133,4 +181,52 @@
[u"decimals"]=>
int(0)
}
-done!
\ No newline at end of file
+object(stdClass)#%d (11) {
+ [u"name"]=>
+ unicode(3) "_id"
+ [u"orgname"]=>
+ unicode(0) ""
+ [u"table"]=>
+ unicode(0) ""
+ [u"orgtable"]=>
+ unicode(0) ""
+ [u"def"]=>
+ unicode(0) ""
+ [u"max_length"]=>
+ int(0)
+ [u"length"]=>
+ int(12)
+ [u"charsetnr"]=>
+ int(63)
+ [u"flags"]=>
+ int(32897)
+ [u"type"]=>
+ int(8)
+ [u"decimals"]=>
+ int(0)
+}
+object(stdClass)#%d (11) {
+ [u"name"]=>
+ unicode(8) "___label"
+ [u"orgname"]=>
+ unicode(0) ""
+ [u"table"]=>
+ unicode(0) ""
+ [u"orgtable"]=>
+ unicode(0) ""
+ [u"def"]=>
+ unicode(0) ""
+ [u"max_length"]=>
+ int(2)
+ [u"length"]=>
+ int(6)
+ [u"charsetnr"]=>
+ int(33)
+ [u"flags"]=>
+ int(0)
+ [u"type"]=>
+ int(253)
+ [u"decimals"]=>
+ int(31)
+}
+done!
--
MySQL Code Commits Mailing List
For list archives:
http://lists.mysql.com/commits
To unsubscribe:
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Tue Jul 10 14:16:24 2007
This archive was generated by hypermail 2.1.8
: Mon Jul 16 2007 - 05:11:58 EDT
|