diff options
author | Kristofer Pettersson <kristofer.pettersson@sun.com> | 2009-07-29 22:07:08 +0200 |
---|---|---|
committer | Kristofer Pettersson <kristofer.pettersson@sun.com> | 2009-07-29 22:07:08 +0200 |
commit | d480b64f5bece952455318a58cd410c5ff02344b (patch) | |
tree | 5b1e05b2c4937be9524d4cae2be1ae9517d5be95 /sql/protocol.h | |
parent | b8a69f4f6f40ccee3e930e2a48b0412ccffba7b0 (diff) | |
download | mariadb-git-d480b64f5bece952455318a58cd410c5ff02344b.tar.gz |
Bug#44521 Executing a stored procedure as a prepared statement can sometimes cause
an assertion in a debug build.
The reason is that the C API doesn't support multiple result sets for prepared
statements and attempting to execute a stored routine which returns multiple result
sets sometimes lead to a network error. The network error sets the diagnostic area
prematurely which later leads to the assert when an attempt is made to set a second
server state.
This patch fixes the issue by changing the scope of the error code returned by
sp_instr_stmt::execute() to include any error which happened during the execution.
To assure that Diagnostic_area::is_sent really mean that the message was sent all
network related functions are checked for return status.
Diffstat (limited to 'sql/protocol.h')
-rw-r--r-- | sql/protocol.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/protocol.h b/sql/protocol.h index a4770e9b6e3..251ba6fbc33 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -173,7 +173,7 @@ public: }; void send_warning(THD *thd, uint sql_errno, const char *err=0); -void net_send_error(THD *thd, uint sql_errno=0, const char *err=0); +bool net_send_error(THD *thd, uint sql_errno=0, const char *err=0); void net_end_statement(THD *thd); bool send_old_password_request(THD *thd); uchar *net_store_data(uchar *to,const uchar *from, size_t length); |