summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-09-01 19:41:38 -0700
committerIgor Babaev <igor@askmonty.org>2012-09-01 19:41:38 -0700
commitbc644de9a9d1126fbcbc67e90fe24cfa24147092 (patch)
tree3ffc476aa75c6bf0471acc8e9eb0c20492c3936f /sql/sql_delete.cc
parent1999be8d4e9d721243c51b04c76ba11ad1e9fa56 (diff)
parenta6b88f1431238152643e41979ce10b9bbdac2a82 (diff)
downloadmariadb-git-bc644de9a9d1126fbcbc67e90fe24cfa24147092.tar.gz
Merge MDEV-415 -> 10.0-base.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 81e3dca50ae..5dff27b2f89 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -244,6 +244,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
uint length= 0;
SORT_FIELD *sortorder;
ha_rows examined_rows;
+ ha_rows found_rows;
table->update_const_key_parts(conds);
order= simple_remove_const(order, conds);
@@ -264,9 +265,10 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
MYF(MY_FAE | MY_ZEROFILL));
if (!(sortorder= make_unireg_sortorder(order, &length, NULL)) ||
- (table->sort.found_records = filesort(thd, table, sortorder, length,
- select, HA_POS_ERROR, 1,
- &examined_rows))
+ (table->sort.found_records= filesort(thd, table, sortorder, length,
+ select, HA_POS_ERROR,
+ true,
+ &examined_rows, &found_rows))
== HA_POS_ERROR)
{
delete select;