Loading mysql-test/r/myisam.result +10 −0 Original line number Diff line number Diff line Loading @@ -498,6 +498,16 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary 1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct drop table t1,t2; drop table t1; create table t1 ( c1 varchar(32), key (c1) ) engine=myisam; alter table t1 disable keys; insert into t1 values ('a'), ('b'); select c1 from t1 order by c1 limit 1; c1 a CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM; Got one of the listed errors create table t1 (a int, b varchar(200), c text not null) checksum=1; Loading mysql-test/t/myisam.test +12 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,18 @@ explain select sql_big_result distinct t1.a from t1,t2 order by t2.a; explain select distinct t1.a from t1,t2 order by t2.a; drop table t1,t2; # # Bug#14616 - Freshly imported table returns error 124 when using LIMIT # create table t1 ( c1 varchar(32), key (c1) ) engine=myisam; alter table t1 disable keys; insert into t1 values ('a'), ('b'); select c1 from t1 order by c1 limit 1; drop table t1; # # Test RTREE index # Loading sql/sql_select.cc +6 −2 Original line number Diff line number Diff line Loading @@ -7354,8 +7354,12 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, DBUG_ENTER("test_if_skip_sort_order"); LINT_INIT(ref_key_parts); /* Check which keys can be used to resolve ORDER BY */ usable_keys.set_all(); /* Check which keys can be used to resolve ORDER BY. We must not try to use disabled keys. */ usable_keys= table->keys_in_use; for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next) { if ((*tmp_order->item)->type() != Item::FIELD_ITEM) Loading Loading
mysql-test/r/myisam.result +10 −0 Original line number Diff line number Diff line Loading @@ -498,6 +498,16 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary 1 SIMPLE t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct drop table t1,t2; drop table t1; create table t1 ( c1 varchar(32), key (c1) ) engine=myisam; alter table t1 disable keys; insert into t1 values ('a'), ('b'); select c1 from t1 order by c1 limit 1; c1 a CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM; Got one of the listed errors create table t1 (a int, b varchar(200), c text not null) checksum=1; Loading
mysql-test/t/myisam.test +12 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,18 @@ explain select sql_big_result distinct t1.a from t1,t2 order by t2.a; explain select distinct t1.a from t1,t2 order by t2.a; drop table t1,t2; # # Bug#14616 - Freshly imported table returns error 124 when using LIMIT # create table t1 ( c1 varchar(32), key (c1) ) engine=myisam; alter table t1 disable keys; insert into t1 values ('a'), ('b'); select c1 from t1 order by c1 limit 1; drop table t1; # # Test RTREE index # Loading
sql/sql_select.cc +6 −2 Original line number Diff line number Diff line Loading @@ -7354,8 +7354,12 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, DBUG_ENTER("test_if_skip_sort_order"); LINT_INIT(ref_key_parts); /* Check which keys can be used to resolve ORDER BY */ usable_keys.set_all(); /* Check which keys can be used to resolve ORDER BY. We must not try to use disabled keys. */ usable_keys= table->keys_in_use; for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next) { if ((*tmp_order->item)->type() != Item::FIELD_ITEM) Loading