~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/include/index_merge_2sweeps.inc

  • Committer: Monty
  • Date: 2008-11-07 05:51:15 UTC
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: mordred@palanthas.inaugust.com-20081107055115-0275gvq62buzls77
Fixed a decimal sign thing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# include/index_merge_2sweeps.inc
2
 
#
3
 
# 2-sweeps read Index_merge test
4
 
#
5
 
# The variable
6
 
#     $engine_type       -- storage engine to be tested
7
 
# has to be set before sourcing this script.
8
 
#
9
 
# Last update:
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
13
 
#
14
 
 
15
 
--echo #---------------- 2-sweeps read Index merge test 2 -------------------------------
16
 
 
17
 
eval SET SESSION STORAGE_ENGINE = $engine_type;
18
 
 
19
 
--disable_warnings
20
 
drop table if exists t1;
21
 
--enable_warnings
22
 
 
23
 
create table t1 (
24
 
  pk int primary key,
25
 
  key1 int,
26
 
  key2 int,
27
 
  filler char(200),
28
 
  filler2 char(200),
29
 
  index(key1),
30
 
  index(key2)
31
 
);
32
 
 
33
 
 
34
 
--disable_query_log
35
 
let $1=1000;
36
 
begin;
37
 
while ($1)
38
 
{
39
 
  eval insert into t1 values($1, $1, $1, 'filler-data','filler-data-2');
40
 
  dec $1;
41
 
}
42
 
commit;
43
 
--enable_query_log
44
 
 
45
 
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
46
 
 
47
 
set @maxv=1000;
48
 
 
49
 
select * from t1 where
50
 
  (pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
51
 
  or key1=18 or key1=60;
52
 
 
53
 
select * from t1 where
54
 
  (pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
55
 
  or key1 < 3 or key1 > @maxv-11;
56
 
 
57
 
select * from t1 where
58
 
  (pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
59
 
  or
60
 
  (key1 < 5) or (key1 > 10 and key1 < 15) or (key1 >= 50 and key1 < 55 ) or (key1 > @maxv-10);
61
 
 
62
 
select * from t1 where
63
 
  (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 )
64
 
  or
65
 
  (key1 < 5) or (key1 > @maxv-10);
66
 
 
67
 
drop table t1;