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.
Showing
Please register or sign in to comment