summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorDmitry Shulga <Dmitry.Shulga@Sun.COM>2010-09-07 14:49:47 +0700
committerDmitry Shulga <Dmitry.Shulga@Sun.COM>2010-09-07 14:49:47 +0700
commit000c50afe6c2918d48384b691fbab1d865fee77a (patch)
tree13e2fa2dab8126ba7103855f85741127f7059707 /libmysql
parent88f91315c4611efddb2e5f4fbade3d571347e369 (diff)
parentd2d4fdb23f6b38ff6718a35120043627582ee836 (diff)
downloadmariadb-git-000c50afe6c2918d48384b691fbab1d865fee77a.tar.gz
Auto-merge from mysql-5.1-bugteam.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 550b1b7b107..231b6e2ef76 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -2118,6 +2118,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);
}
@@ -2256,7 +2258,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,
@@ -4448,7 +4450,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);