summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2010-07-05 13:59:34 +0200
committerJon Olav Hauglid <jon.hauglid@sun.com>2010-07-05 13:59:34 +0200
commitecfd9958a19d76250f5cb611eaace7b4caa1ad7c (patch)
tree58258c0c364af1a76f474e25a417cfc673759944 /sql/sql_handler.cc
parent635ccedbbc1f970e465d140cdf4cdd2cba141c8e (diff)
downloadmariadb-git-ecfd9958a19d76250f5cb611eaace7b4caa1ad7c.tar.gz
Bug #54401 assert in Diagnostics_area::set_eof_status , HANDLER
This assert checks that the server does not try to send EOF to the client if there has been some error during processing. This to make sure that the error is in fact sent to the client. The problem was that any errors during processing of WHERE conditions in HANDLER ... READ statements where not detected by the handler code. The handler code therefore still tried to send EOF to the client, triggering the assert. The bug was only noticeable in debug builds. This patch fixes the problem by making sure that the handler code checks for errors during condition processing and acts accordingly.
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index d6f2a472e05..e49da2b0423 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -747,7 +747,11 @@ retry:
goto ok;
}
if (cond && !cond->val_int())
+ {
+ if (thd->is_error())
+ goto err;
continue;
+ }
if (num_rows >= offset_limit_cnt)
{
protocol->prepare_for_resend();