summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/mysql_statement.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-07-20 03:38:33 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-07-20 03:38:33 +0000
commit97e8c6f4a98a2074aa2261f6e64f983277e3b2ac (patch)
tree259c9dcdded49ea9c404a311a0b107bfed37e610 /ext/pdo_mysql/mysql_statement.c
parent79f3cb9856abe0537f3fbd6004c7e2ed82aaeb84 (diff)
downloadphp-git-97e8c6f4a98a2074aa2261f6e64f983277e3b2ac.tar.gz
Proper handling for databases that need to pre-calculate length of large
columns, which is not normally done for performance reasons.
Diffstat (limited to 'ext/pdo_mysql/mysql_statement.c')
-rwxr-xr-xext/pdo_mysql/mysql_statement.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
index 8947c27be4..5680e09981 100755
--- a/ext/pdo_mysql/mysql_statement.c
+++ b/ext/pdo_mysql/mysql_statement.c
@@ -93,8 +93,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 && stmt->column_count > 0) {
+ if (S->max_length == 1 && !S->result) {
my_bool on = 1;
mysql_stmt_attr_set(S->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &on);
}