diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-07-20 02:36:34 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-07-20 02:36:34 +0000 |
commit | 9438584d76a6ac7d3bef3535511d3251c6a0ada6 (patch) | |
tree | 9855d01b0215a51e57499d5cb8c93e1b20ea8320 /ext/pdo_mysql/mysql_statement.c | |
parent | 1e1d2e2b0d791a2c925b374f9a63bc3e5a8c9570 (diff) | |
download | php-git-9438584d76a6ac7d3bef3535511d3251c6a0ada6.tar.gz |
Only set attribute if result set contains some columns.
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
-rwxr-xr-x | ext/pdo_mysql/mysql_statement.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 452ac67e53..8947c27be4 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -94,7 +94,7 @@ static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) /* if buffered, pre-fetch all the data */ if (H->buffered) { /* if we have bound the buffers don't set the attribute again */ - if (!S->result) { + if (!S->result && stmt->column_count > 0) { my_bool on = 1; mysql_stmt_attr_set(S->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &on); } |