summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2010-05-14 15:36:27 +0400
committerGleb Shchepa <gshchepa@mysql.com>2010-05-14 15:36:27 +0400
commit9cbb009b2ea4bffbf450d1b540d04387fbe9865b (patch)
tree912f393970ed1f540fe9eb834b12123672619e3e /sql/sql_delete.cc
parentfeb03a82f22349bdef2c931cf712eb4ac90046b4 (diff)
downloadmariadb-git-9cbb009b2ea4bffbf450d1b540d04387fbe9865b.tar.gz
Bug #53450: Crash / assertion "virtual int
ha_myisam::index_first(uchar*)") at assert.c:81 Single-table DELETE crash/assertion similar to single-table UPDATE bug 14272. Same resolution as for the bug 14272: Don't run index scan when we should use quick select. This could cause failures because there are table handlers (like federated) that support quick select scanning but do not support index scanning. mysql-test/r/delete.result: Test case for bug #53450. mysql-test/t/delete.test: Test case for bug #53450. sql/sql_delete.cc: Bug #53450: Crash / assertion "virtual int ha_myisam::index_first(uchar*)") at assert.c:81 The mysql_delete function has been modified to not to use init_read_record_idx instead of init_read_record for the quick select.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index cc29b6f1b6b..07421ca55a6 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -266,7 +266,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
free_underlaid_joins(thd, select_lex);
DBUG_RETURN(TRUE);
}
- if (usable_index==MAX_KEY)
+ if (usable_index==MAX_KEY || (select && select->quick))
init_read_record(&info, thd, table, select, 1, 1, FALSE);
else
init_read_record_idx(&info, thd, table, 1, usable_index);