summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_statement.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
-rwxr-xr-xext/pdo_mysql/mysql_statement.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 074e9fbb2..f4a501f80 100755
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mysql_statement.c 294543 2010-02-04 20:28:55Z johannes $ */
+/* $Id: mysql_statement.c 299574 2010-05-21 11:09:28Z andrey $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -111,7 +111,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
#endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */
#if PDO_USE_MYSQLND
if (!S->stmt && S->current_data) {
- free(S->current_data);
+ mnd_free(S->current_data);
}
#endif /* PDO_USE_MYSQLND */
@@ -264,7 +264,7 @@ static int pdo_mysql_stmt_execute_prepared_mysqlnd(pdo_stmt_t *stmt TSRMLS_DC) /
}
/* for SHOW/DESCRIBE and others the column/field count is not available before execute */
- stmt->column_count = S->stmt->field_count;
+ stmt->column_count = mysql_stmt_field_count(S->stmt);
for (i = 0; i < stmt->column_count; i++) {
mysqlnd_stmt_bind_one_result(S->stmt, i);
}
@@ -376,7 +376,7 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
/* for SHOW/DESCRIBE and others the column/field count is not available before execute */
int i;
- stmt->column_count = S->stmt->field_count;
+ stmt->column_count = mysql_stmt_field_count(S->stmt);
for (i = 0; i < stmt->column_count; i++) {
mysqlnd_stmt_bind_one_result(S->stmt, i);
}
@@ -652,7 +652,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt,
}
#if PDO_USE_MYSQLND
if (!S->stmt && S->current_data) {
- free(S->current_data);
+ mnd_free(S->current_data);
}
#endif /* PDO_USE_MYSQLND */
@@ -745,8 +745,8 @@ static int pdo_mysql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsig
}
#if PDO_USE_MYSQLND
if (S->stmt) {
- Z_ADDREF_P(S->stmt->result_bind[colno].zv);
- *ptr = (char*)&S->stmt->result_bind[colno].zv;
+ Z_ADDREF_P(S->stmt->data->result_bind[colno].zv);
+ *ptr = (char*)&S->stmt->data->result_bind[colno].zv;
*len = sizeof(zval);
PDO_DBG_RETURN(1);
}