diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-11-07 19:59:58 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-11-07 19:59:58 +0400 |
commit | 9d2b259e236ce1df5d0cbf40c3bf7811bc4d92e6 (patch) | |
tree | 96bdd8a0e56af4a0122dbc23116ba44af069013b /mysql-test/r/join_outer_innodb.result | |
parent | 3acf3868788368e2df1b90cb69af1ba345799245 (diff) | |
download | mariadb-git-9d2b259e236ce1df5d0cbf40c3bf7811bc4d92e6.tar.gz |
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
Problems:
1. ALTER TABLE ... ORDER BY... doesn't make sence if there's a
user-defined clustered index in the table.
2. using a secondary index is slower than using a clustered one
for a table scan.
Fixes:
1. raise a warning.
2. use the clustered index.
mysql-test/include/mix1.inc:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- test case.
mysql-test/r/innodb.result:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- results adjusted.
mysql-test/r/innodb_mysql.result:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- results adjusted.
mysql-test/r/join_outer_innodb.result:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- results adjusted.
sql/sql_select.cc:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- use the clustered index for a table scan (if any) as it's faster than
using a secondary index.
sql/sql_table.cc:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- ALTER TABLE ... ORDER BY doesn't make sence if there's a
user-defined clustered index in the table. Ignore it in such cases
and raise a warning.
Diffstat (limited to 'mysql-test/r/join_outer_innodb.result')
-rw-r--r-- | mysql-test/r/join_outer_innodb.result | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/join_outer_innodb.result b/mysql-test/r/join_outer_innodb.result index e8a2d6f668b..24a11b12b03 100644 --- a/mysql-test/r/join_outer_innodb.result +++ b/mysql-test/r/join_outer_innodb.result @@ -8,12 +8,12 @@ EXPLAIN SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id WHERE t1.name LIKE 'A%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index +1 SIMPLE t1 index PRIMARY,name PRIMARY 4 NULL 3 Using where 1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index EXPLAIN SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id WHERE t1.name LIKE 'A%' OR FALSE; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index +1 SIMPLE t2 index NULL PRIMARY 4 NULL 5 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where DROP TABLE t1,t2; |