summaryrefslogtreecommitdiff
path: root/sql/filesort.cc
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-07-19 11:03:52 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-07-19 11:03:52 +0200
commit4b2378a1484ec3aa9be43f585c231c402eacf806 (patch)
treea1625076e06207efabbacb575121b6d04a393404 /sql/filesort.cc
parent0b83096be5c7d2362779916c5edaae28f35482dd (diff)
downloadmariadb-git-4b2378a1484ec3aa9be43f585c231c402eacf806.tar.gz
Bug #54734 assert in Diagnostics_area::set_ok_status
This assert checks that the server does not try to send OK to the client if there has been some error during processing. This is done to make sure that the error is in fact sent to the client. The problem was that view errors during processing of WHERE conditions in UPDATE statements where not detected by the update code. It therefore tried to send OK to the client, triggering the assert. The bug was only noticeable in debug builds. This patch fixes the problem by making sure that the update code checks for errors during condition processing and acts accordingly.
Diffstat (limited to 'sql/filesort.cc')
-rw-r--r--sql/filesort.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 7b584b39516..021cbdd2aad 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -514,6 +514,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
volatile THD::killed_state *killed= &thd->killed;
handler *file;
MY_BITMAP *save_read_set, *save_write_set;
+ bool skip_record;
DBUG_ENTER("find_all_keys");
DBUG_PRINT("info",("using: %s",
(select ? select->quick ? "ranges" : "where":
@@ -606,7 +607,8 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
}
if (error == 0)
param->examined_rows++;
- if (error == 0 && (!select || select->skip_record() == 0))
+ if (!error && (!select ||
+ (!select->skip_record(thd, &skip_record) && !skip_record)))
{
if (idx == param->keys)
{