List:Commits« Previous MessageNext Message »
From:uwendel Date:April 9 2008 7:48pm
Subject:PHP mysqlnd svn commit: r1411 - trunk/php5/ext/pdo_mysqlnd
View as plain text  
Author: uwendel
Date: 2008-04-09 21:48:27 +0200 (Wed, 09 Apr 2008)
New Revision: 1411

Modified:
   trunk/php5/ext/pdo_mysqlnd/mysql_statement.c
Log:
This should fix Mantis #361. For some commands the number of result set column is not know
prior to execution.


Modified: trunk/php5/ext/pdo_mysqlnd/mysql_statement.c
===================================================================
--- trunk/php5/ext/pdo_mysqlnd/mysql_statement.c	2008-04-09 13:20:38 UTC (rev 1410)
+++ trunk/php5/ext/pdo_mysqlnd/mysql_statement.c	2008-04-09 19:48:27 UTC (rev 1411)
@@ -114,8 +114,14 @@
 			return 0;
 		}
 
+		if (mysql_stmt_execute(S->stmt)) {
+			pdo_mysql_error_stmt(stmt);
+			return 0;
+		}
+
 #if PDO_USE_MYSQLND
 		{
+			/* for SHOW/DESCRIBE and others the column/field count is not available before execute
*/
 			unsigned int i;
 
 			stmt->column_count = S->stmt->field_count;
@@ -127,11 +133,6 @@
 		}
 #endif
 
-		if (mysql_stmt_execute(S->stmt)) {
-			pdo_mysql_error_stmt(stmt);
-			return 0;
-		}
-
 #	if PDO_USE_MYSQLND
 		S->result = mysqlnd_stmt_result_metadata(S->stmt);
 		if (S->result) {

Thread
PHP mysqlnd svn commit: r1411 - trunk/php5/ext/pdo_mysqlnduwendel9 Apr