Commit 4e564146 authored by Annamalai Gurusami's avatar Annamalai Gurusami

Merging from mysql-5.1 to mysql-5.5.

parents 64aad461 92ad6f56
......@@ -70,7 +70,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 5 NULL 4 Using index; Using temporary
explain select distinct f1, f2 from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL PRIMARY 5 NULL 3 Using index for group-by; Using temporary
1 SIMPLE t1 index NULL PRIMARY 5 NULL 4 Using index
drop table t1;
create table t1(pk int primary key) engine=innodb;
create view v1 as select pk from t1 where pk < 20;
......
......@@ -956,7 +956,7 @@ Table Op Msg_type Msg_text
test.t1 check status OK
explain select * from t1 where b like 'adfd%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL b NULL NULL NULL 15 Using where
1 SIMPLE t1 range b b 769 NULL 11 Using where
drop table t1;
set global innodb_file_per_table=on;
set global innodb_file_format='Barracuda';
......
......@@ -343,7 +343,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 5 NULL 4 Using index; Using temporary
explain select distinct f1, f2 from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL PRIMARY 5 NULL 3 Using index for group-by; Using temporary
1 SIMPLE t1 index NULL PRIMARY 5 NULL 4 Using index
drop table t1;
CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20),
INDEX (name));
......
......@@ -4140,6 +4140,13 @@ row_rename_table_for_mysql(
trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, NULL);
trx->error_state = DB_SUCCESS;
} else {
if (old_is_tmp && !new_is_tmp) {
/* After ALTER TABLE the table statistics
needs to be rebuilt. It will be rebuilt
when the table is loaded again. */
table->stat_initialized = FALSE;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment