summaryrefslogtreecommitdiff
path: root/libmysql/libmysql.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-11-23 23:39:59 +0200
committerMichael Widenius <monty@askmonty.org>2010-11-23 23:39:59 +0200
commitb52020221e8b4e58d1bc6dd5a5a6f065a6a3a083 (patch)
tree6068b9d90b4127b1c3608e29913fa82bf1a1f20e /libmysql/libmysql.c
parent7840965db9460e2117c163f3db83aaa247c65203 (diff)
parent498ee6bd19eabc85dcbd9abebc9cf6aeb79d1985 (diff)
downloadmariadb-git-b52020221e8b4e58d1bc6dd5a5a6f065a6a3a083.tar.gz
Merge with MySQL 5.1.52
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r--libmysql/libmysql.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 222916bfa06..7f2b6fc137f 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -2516,6 +2516,8 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
+ else if (mysql->status == MYSQL_STATUS_GET_RESULT)
+ stmt->mysql->status= MYSQL_STATUS_STATEMENT_GET_RESULT;
DBUG_RETURN(0);
}
@@ -2654,7 +2656,7 @@ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row)
set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
return 1;
}
- if (mysql->status != MYSQL_STATUS_GET_RESULT)
+ if (mysql->status != MYSQL_STATUS_STATEMENT_GET_RESULT)
{
set_stmt_error(stmt, stmt->unbuffered_fetch_cancelled ?
CR_FETCH_CANCELED : CR_COMMANDS_OUT_OF_SYNC,
@@ -4860,7 +4862,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
DBUG_RETURN(1);
}
}
- else if (mysql->status != MYSQL_STATUS_GET_RESULT)
+ else if (mysql->status != MYSQL_STATUS_STATEMENT_GET_RESULT)
{
set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate, NULL);
DBUG_RETURN(1);