From 9cbb009b2ea4bffbf450d1b540d04387fbe9865b Mon Sep 17 00:00:00 2001 From: Gleb Shchepa Date: Fri, 14 May 2010 15:36:27 +0400 Subject: 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. --- mysql-test/t/delete.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/t/delete.test') diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index 7bbc470137a..5a0e86568f3 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -374,5 +374,17 @@ DELETE IGNORE FROM t1; DROP TABLE t1; +--echo # +--echo # Bug #53450: Crash/assertion +--echo # "virtual int ha_myisam::index_first(uchar*)") at assert.c:81 +--echo # + +CREATE TABLE t1 (a INT, b INT, c INT, + INDEX(a), INDEX(b), INDEX(c)); +INSERT INTO t1 VALUES (1,2,3), (4,5,6), (7,8,9); + +DELETE FROM t1 WHERE a = 10 OR b = 20 ORDER BY c LIMIT 1; + +DROP TABLE t1; --echo End of 5.1 tests -- cgit v1.2.1