List:Commits« Previous MessageNext Message »
From:Gleb Shchepa Date:May 14 2010 2:21pm
Subject:bzr commit into mysql-pe branch (gshchepa:4070)
View as plain text  
#At file:///mnt/sda7/work/mysql-pe/ based on revid:alexey.kopytov@stripped

 4070 Gleb Shchepa	2010-05-14 [merge]
      auto-merge mysql-5.1-bugteam --> mysql-pe (bug 53450)

    modified:
      mysql-test/r/delete.result
      mysql-test/t/delete.test
      sql/sql_delete.cc
=== modified file 'mysql-test/r/delete.result'
--- a/mysql-test/r/delete.result	2010-04-15 12:51:12 +0000
+++ b/mysql-test/r/delete.result	2010-05-14 14:19:47 +0000
@@ -490,4 +490,13 @@ END |
 DELETE IGNORE FROM t1;
 ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
 DROP TABLE t1;
+#
+# Bug #53450: Crash/assertion
+#    "virtual int ha_myisam::index_first(uchar*)") at assert.c:81
+#
+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;
 End of 5.1 tests

=== modified file 'mysql-test/t/delete.test'
--- a/mysql-test/t/delete.test	2010-04-15 12:51:12 +0000
+++ b/mysql-test/t/delete.test	2010-05-14 14:19:47 +0000
@@ -527,5 +527,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

=== modified file 'sql/sql_delete.cc'
--- a/sql/sql_delete.cc	2010-05-12 11:22:00 +0000
+++ b/sql/sql_delete.cc	2010-05-14 14:19:47 +0000
@@ -291,7 +291,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *
     free_underlaid_joins(thd, select_lex);
     goto err;
   }
-  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);


Attachment: [text/bzr-bundle] bzr/gshchepa@mysql.com-20100514141947-1a3uuc92rdy31vvv.bundle
Thread
bzr commit into mysql-pe branch (gshchepa:4070)Gleb Shchepa14 May