Loading mysql-test/r/select.result +1 −0 Original line number Diff line number Diff line Loading @@ -1793,3 +1793,4 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par t2 0 PRIMARY 1 auto A 1199 NULL NULL t2 0 fld1 1 fld1 A 1199 NULL NULL t2 1 fld3 1 fld3 A NULL NULL NULL 1 mysql-test/t/select.test +16 −1 Original line number Diff line number Diff line Loading @@ -1712,6 +1712,21 @@ show full columns from t2 from test like 'f%'; show full columns from t2 from test like 's%'; show keys from t2; # # random in WHERE clause # drop table t1; CREATE TABLE t1 ( id mediumint(8) unsigned NOT NULL auto_increment, pseudo varchar(35) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY pseudo (pseudo) ); INSERT INTO t1 (pseudo) VALUES ('test'); INSERT INTO t1 (pseudo) VALUES ('test1'); SELECT 1 from t1 where rand() > 2; # # Drop the test tables # Loading sql/sql_select.cc +2 −0 Original line number Diff line number Diff line Loading @@ -2257,6 +2257,8 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) { JOIN_TAB *tab=join->join_tab+i; table_map current_map= tab->table->map; if (i == join->tables-1) current_map|= RAND_TABLE_BIT; bool use_quick_range=0; used_tables|=current_map; Loading Loading
mysql-test/r/select.result +1 −0 Original line number Diff line number Diff line Loading @@ -1793,3 +1793,4 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par t2 0 PRIMARY 1 auto A 1199 NULL NULL t2 0 fld1 1 fld1 A 1199 NULL NULL t2 1 fld3 1 fld3 A NULL NULL NULL 1
mysql-test/t/select.test +16 −1 Original line number Diff line number Diff line Loading @@ -1712,6 +1712,21 @@ show full columns from t2 from test like 'f%'; show full columns from t2 from test like 's%'; show keys from t2; # # random in WHERE clause # drop table t1; CREATE TABLE t1 ( id mediumint(8) unsigned NOT NULL auto_increment, pseudo varchar(35) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY pseudo (pseudo) ); INSERT INTO t1 (pseudo) VALUES ('test'); INSERT INTO t1 (pseudo) VALUES ('test1'); SELECT 1 from t1 where rand() > 2; # # Drop the test tables # Loading
sql/sql_select.cc +2 −0 Original line number Diff line number Diff line Loading @@ -2257,6 +2257,8 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) { JOIN_TAB *tab=join->join_tab+i; table_map current_map= tab->table->map; if (i == join->tables-1) current_map|= RAND_TABLE_BIT; bool use_quick_range=0; used_tables|=current_map; Loading