mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into mysql.com:/home/psergey/mysql-5.1-bug22393 mysql-test/t/range.test: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/range.result: Manual merge
This commit is contained in:
@ -941,3 +941,17 @@ item started price
|
||||
A1 2005-11-01 08:00:00 1000.000
|
||||
A1 2005-11-15 00:00:00 2000.000
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2 (a int, b int, filler char(100));
|
||||
insert into t2 select A.a + 10 * (B.a + 10 * C.a), 10, 'filler' from t1 A,
|
||||
t1 B, t1 C where A.a < 5;
|
||||
insert into t2 select 1000, b, 'filler' from t2;
|
||||
alter table t2 add index (a,b);
|
||||
select 'In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)' Z;
|
||||
Z
|
||||
In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)
|
||||
explain select * from t2 where a=1000 and b<11;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref a a 5 const 502 Using where
|
||||
drop table t1, t2;
|
||||
|
Reference in New Issue
Block a user