List:Commits« Previous MessageNext Message »
From:ahristov Date:April 1 2008 11:35am
Subject:PHP mysqlnd svn commit: r1363 - in trunk: php5/ext/mysqli php6/ext/mysqli tests/ext/mysqli
View as plain text  
Author: ahristov
Date: 2008-04-01 11:35:07 +0200 (Tue, 01 Apr 2008)
New Revision: 1363

Modified:
   trunk/php5/ext/mysqli/mysqli_nonapi.c
   trunk/php6/ext/mysqli/mysqli_nonapi.c
   trunk/tests/ext/mysqli/mysqli_stmt_datatype_change.phpt
Log:
Commit changes I forgot to commit last week


Modified: trunk/php5/ext/mysqli/mysqli_nonapi.c
===================================================================
--- trunk/php5/ext/mysqli/mysqli_nonapi.c	2008-03-20 18:11:03 UTC (rev 1362)
+++ trunk/php5/ext/mysqli/mysqli_nonapi.c	2008-04-01 09:35:07 UTC (rev 1363)
@@ -925,11 +925,11 @@
 	add_property_string(return_value, "charset", (name) ? (char *)name : "", 1);
 	add_property_string(return_value, "collation",(collation) ? (char *)collation : "", 1);
 	add_property_string(return_value, "dir", (dir) ? (char *)dir : "", 1);
-	add_property_string(return_value, "comment", (comment) ? (char *)comment : "", 1);
 	add_property_long(return_value, "min_length", minlength);
 	add_property_long(return_value, "max_length", maxlength);
 	add_property_long(return_value, "number", number);
 	add_property_long(return_value, "state", state);
+	add_property_string(return_value, "comment", (comment) ? (char *)comment : "", 1);
 }
 /* }}} */
 #endif

Modified: trunk/php6/ext/mysqli/mysqli_nonapi.c
===================================================================
--- trunk/php6/ext/mysqli/mysqli_nonapi.c	2008-03-20 18:11:03 UTC (rev 1362)
+++ trunk/php6/ext/mysqli/mysqli_nonapi.c	2008-04-01 09:35:07 UTC (rev 1363)
@@ -946,17 +946,20 @@
 		add_property_utf8_string(return_value, "charset", (name) ? (char *)name : "", 1);
 		add_property_utf8_string(return_value, "collation", (collation) ? (char *)collation :
"", 1);
 		add_property_utf8_string(return_value, "dir", (dir) ? (char *)dir : "", 1);
-		add_property_utf8_string(return_value, "comment", (comment) ? (char *)comment : "", 1);
 	} else {
 		add_property_string(return_value, "charset", (name) ? (char *)name : "", 1);
 		add_property_string(return_value, "collation",(collation) ? (char *)collation : "", 1);
 		add_property_string(return_value, "dir", (dir) ? (char *)dir : "", 1);
-		add_property_string(return_value, "comment", (comment) ? (char *)comment : "", 1);
 	}
 	add_property_long(return_value, "min_length", minlength);
 	add_property_long(return_value, "max_length", maxlength);
 	add_property_long(return_value, "number", number);
 	add_property_long(return_value, "state", state);
+	if (UG(unicode)) {
+		add_property_utf8_string(return_value, "comment", (comment) ? (char *)comment : "", 1);
+	} else {
+		add_property_string(return_value, "comment", (comment) ? (char *)comment : "", 1);
+	}
 }
 /* }}} */
 #endif

Modified: trunk/tests/ext/mysqli/mysqli_stmt_datatype_change.phpt
===================================================================
--- trunk/tests/ext/mysqli/mysqli_stmt_datatype_change.phpt	2008-03-20 18:11:03 UTC (rev
1362)
+++ trunk/tests/ext/mysqli/mysqli_stmt_datatype_change.phpt	2008-04-01 09:35:07 UTC (rev
1363)
@@ -1,5 +1,5 @@
 --TEST--
-mysqli_stmt_bind_param() - playing with references
+Playing with datatype change between prepare and execute
 --SKIPIF--
 <?php
 require_once('skipif.inc');
@@ -11,16 +11,23 @@
 	include "connect.inc";
 	require('table.inc');
 
-	$c1 = new mysqli("localhost", "root", "");
-	$c2 = new mysqli("localhost", "root", "");
+	if (!$c1 = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+		printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s,
port=%s, socket=%s\n",
+			$host, $user, $db, $port, $socket);
+		exit(1);
+	}
+	if (!$c2 = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+		printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s,
port=%s, socket=%s\n",
+			$host, $user, $db, $port, $socket);
+		exit(1);
+	}
 
-	$c1->query("use test");
-	$c2->query("use test");
+	$c1->query("use $db");
+	$c2->query("use $db");
 	$c1->query("drop table if exists type_change");
 	$c1->query("create table type_change(a int, b char(10))");
 	$c1->query("insert into type_change values (1, 'one'), (2, 'two')"); 
 	$s1 = $c1->prepare("select a from type_change order by a");
-	var_dump($s1);
 	var_dump($s1->execute(), $s1->bind_result($col1));
 	echo "---- Row 1\n";
 	var_dump($s1->fetch());
@@ -50,26 +57,6 @@
 	echo "done!";
 ?>
 --EXPECTF--
-object(mysqli_stmt)#%d (%d) {
-  ["affected_rows"]=>
-  int(0)
-  ["insert_id"]=>
-  int(0)
-  ["num_rows"]=>
-  int(0)
-  ["param_count"]=>
-  int(0)
-  ["field_count"]=>
-  int(1)
-  ["errno"]=>
-  int(0)
-  ["error"]=>
-  string(0) ""
-  ["sqlstate"]=>
-  string(5) "00000"
-  ["id"]=>
-  int(1)
-}
 bool(true)
 bool(true)
 ---- Row 1
@@ -96,26 +83,6 @@
 ----
 done!
 --UEXPECTF--
-object(mysqli_stmt)#%d (%d) {
-  [u"affected_rows"]=>
-  int(0)
-  [u"insert_id"]=>
-  int(0)
-  [u"num_rows"]=>
-  int(0)
-  [u"param_count"]=>
-  int(0)
-  [u"field_count"]=>
-  int(1)
-  [u"errno"]=>
-  int(0)
-  [u"error"]=>
-  unicode(0) ""
-  [u"sqlstate"]=>
-  unicode(5) "00000"
-  [u"id"]=>
-  int(1)
-}
 bool(true)
 bool(true)
 ---- Row 1

Thread
PHP mysqlnd svn commit: r1363 - in trunk: php5/ext/mysqli php6/ext/mysqli tests/ext/mysqliahristov1 Apr