Author: jschlueter
Date: 2008-04-04 13:32:09 +0200 (Fri, 04 Apr 2008)
New Revision: 1385
Modified:
trunk/php5/ext/pdo_mysqlnd/mysql_statement.c
Log:
- Some more result free'ing and fetch buffered data
Modified: trunk/php5/ext/pdo_mysqlnd/mysql_statement.c
===================================================================
--- trunk/php5/ext/pdo_mysqlnd/mysql_statement.c 2008-04-04 11:02:57 UTC (rev 1384)
+++ trunk/php5/ext/pdo_mysqlnd/mysql_statement.c 2008-04-04 11:32:09 UTC (rev 1385)
@@ -76,7 +76,7 @@
efree(S->out_length);
}
#endif
-#if HAVE_MYSQL_NEXT_RESULT
+#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND
if (S->H->server) {
while (mysql_more_results(S->H->server)) {
MYSQL_RES *res;
@@ -113,6 +113,7 @@
#if PDO_USE_MYSQLND
{
unsigned int i;
+
stmt->column_count = S->stmt->field_count;
S->result_bind = (MYSQLND_RESULT_BIND*)safe_emalloc(stmt->column_count,
sizeof(MYSQLND_RESULT_BIND), 0);
for (i = 0; i < stmt->column_count; i++) {
@@ -132,6 +133,11 @@
if (S->result) {
/* TODO: implement mysql_fetch_fields in mysqlnd instead of directly accesing it's
data structures */
S->fields = S->result->meta->fields;
+
+ /* if buffered, pre-fetch all the data */
+ if (H->buffered) {
+ mysql_stmt_store_result(S->stmt);
+ }
}
# else
if (!S->result) {
| Thread |
|---|
| • PHP mysqlnd svn commit: r1385 - trunk/php5/ext/pdo_mysqlnd | jschlueter | 4 Apr |