diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-10-04 15:42:16 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-10-04 15:42:16 +0300 |
commit | dd2e3db48fce43f6249e1c23b3cf0f5057b41d4e (patch) | |
tree | 0b41fbab5c8e486500b5c53bbe818e62f6f583f2 /libmysql | |
parent | 99039957feba6543c7d52b6dcfc5b9f349ee0047 (diff) | |
parent | 774a5778d5db1062c26bd55d02a09c5d98a74525 (diff) | |
download | mariadb-git-dd2e3db48fce43f6249e1c23b3cf0f5057b41d4e.tar.gz |
merge
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index c90af040c5f..e9327d770fb 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2057,6 +2057,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); } @@ -2195,7 +2197,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, @@ -4387,7 +4389,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); @@ -4811,6 +4813,9 @@ int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt) DBUG_RETURN(rc); } + if (mysql->status == MYSQL_STATUS_GET_RESULT) + mysql->status= MYSQL_STATUS_STATEMENT_GET_RESULT; + stmt->state= MYSQL_STMT_EXECUTE_DONE; stmt->bind_result_done= FALSE; |