summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-11-19 15:52:14 +0100
committerSergei Golubchik <serg@mariadb.org>2015-11-19 15:52:14 +0100
commitbeded7d9c9592ca8fdfc367f7c64f89c35995c44 (patch)
treea215a54ed5043bb17fe7d69a69439e05b21682d5 /sql/sql_delete.cc
parentaf71da5d2f90c82b2357e808640003907c488bc2 (diff)
parent2553f143fdeb9068eb02a8fda58750c24071f5ef (diff)
downloadmariadb-git-beded7d9c9592ca8fdfc367f7c64f89c35995c44.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 8995684b8f6..f49a053918b 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -529,17 +529,18 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
free_underlaid_joins(thd, select_lex);
DBUG_RETURN(TRUE);
}
+
if (query_plan.index == MAX_KEY || (select && select->quick))
+ error= init_read_record(&info, thd, table, select, 1, 1, FALSE);
+ else
+ error= init_read_record_idx(&info, thd, table, 1, query_plan.index,
+ reverse);
+ if (error)
{
- if (init_read_record(&info, thd, table, select, 1, 1, FALSE))
- {
- delete select;
- free_underlaid_joins(thd, select_lex);
- DBUG_RETURN(TRUE);
- }
+ delete select;
+ free_underlaid_joins(thd, select_lex);
+ DBUG_RETURN(TRUE);
}
- else
- init_read_record_idx(&info, thd, table, 1, query_plan.index, reverse);
init_ftfuncs(thd, select_lex, 1);
THD_STAGE_INFO(thd, stage_updating);