summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2015-06-19 21:31:16 +0300
committerSergei Petrunia <psergey@askmonty.org>2015-06-20 01:24:06 +0300
commitf33173d19e7ff25c7b185b23172e248ee5df7b4c (patch)
tree4af95c2c281f6bef7fac377b0c8ee24caf81c545 /sql/sql_delete.cc
parent12d9fe14bea38eaa2ff0f5edeea22d4c7a5debed (diff)
downloadmariadb-git-f33173d19e7ff25c7b185b23172e248ee5df7b4c.tar.gz
MDEV-8282: crash in filesort() with simple ordered delete
Handle the case where the optimizer decides to use handler->delete_all_rows(), but then this call returns HA_ERR_UNSUPPORTED and execution switches to regular row-by-row deletion.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index e3610a8f919..ac4aa40d55b 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -370,6 +370,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
goto cleanup;
}
/* Handler didn't support fast delete; Delete rows one by one */
+ query_plan.cancel_delete_all_rows();
}
if (conds)
{