1 # include/index_merge_2sweeps.inc
3 # 2-sweeps read Index_merge test
6 # $engine_type -- storage engine to be tested
7 # has to be set before sourcing this script.
10 # 2006-08-02 ML test refactored
11 # old name was index_merge_innodb2.test
12 # main code went into include/index_merge_2sweeps.inc
15 --echo #---------------- 2-sweeps read Index merge
test 2 -------------------------------
17 eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
20 drop
table if exists t1;
38 eval insert into t1 values($1, $1, $1,
'filler-data',
'filler-data-2');
43 select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
47 select * from t1 where
48 (pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
49 or key1=18 or key1=60;
51 select * from t1 where
52 (pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
53 or key1 < 3 or key1 > @maxv-11;
55 select * from t1 where
56 (pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
58 (key1 < 5) or (key1 > 10 and key1 < 15) or (key1 >= 50 and key1 < 55 ) or (key1 > @maxv-10);
60 select * from t1 where
61 (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 )
63 (key1 < 5) or (key1 > @maxv-10);