diff options
author | unknown <sergefp@mysql.com> | 2006-01-25 23:25:23 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2006-01-25 23:25:23 +0300 |
commit | d33ac37ba68cb26c11fe7c44d08ca16b6e7c5480 (patch) | |
tree | 6eb5453574dbbc5b4cca00daf48ba4aa1f574863 /mysql-test/t/update.test | |
parent | 52ff597a8aa3fd8ef18752b4839c755787059113 (diff) | |
download | mariadb-git-d33ac37ba68cb26c11fe7c44d08ca16b6e7c5480.tar.gz |
BUG#15935: In mysql_update, don't use full index scan when we could have used quick select scan.
mysql-test/r/update.result:
Testcase for BUG#15935
mysql-test/t/update.test:
Testcase for BUG#15935
sql/sql_update.cc:
BUG#15935:
- Do account for the fact that used_index!=MAX_KEY is also true for cases
when quick select is used, and use quick select then (and not full index scan).
- Also removed the redundant "used_index= MAX_KEY" statement
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r-- | mysql-test/t/update.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index 95adb40962c..55015075db7 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -287,4 +287,16 @@ update t1 set f1=1 where f1=3; update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1; --disable_info drop table t1,t2; + + +# BUG#15935 +create table t1 (a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, filler1 char(200), filler2 char(200), key(a)); +insert into t2 select A.a + 10*B.a, 'filler','filler' from t1 A, t1 B; +flush status; +update t2 set a=3 where a=2; +show status like 'handler_read%'; +drop table t1, t2; + # End of 4.1 tests |