adding test scripts
[csql.git] / test / tools / csql / indextran3.sql
blob77fe75f4a647854bfd8f3245680977f13b374555
1 echo create table t1(f1 int,f2 int,f3 int);
2 create table t1(f1 int,f2 int,f3 int);
3 echo create index idx1 on t1(f1,f3);
4 create index idx1 on t1(f1,f3);
5 echo insert into t1 values(1,10,100);
6 insert into t1 values(1,10,100);
7 echo insert into t1 values(3,33,333);
8 insert into t1 values(3,33,333);
9 echo insert into t1 values(2,33,444); 
10 insert into t1 values(2,33,444); 
11 echo set autocommit off;
12 set autocommit off;
13 echo insert into t1 values(4,40,400);
14 insert into t1 values(4,40,400);
15 echo insert into t1 values(3,33,333);
16 insert into t1 values(3,33,333);
17 echo select * from t1;
18 select * from t1;
19 echo rollback;
20 rollback;
21 echo select * from t1;
22 select * from t1;
23 echo commit;
24 commit;
25 echo select * from t1;
26 select * from t1;
27 echo insert into t1 values(4,40,400);
28 insert into t1 values(4,40,400);
29 echo insert into t1 values(3,33,333);
30 insert into t1 values(3,33,333);
31 echo select * from t1;
32 select * from t1;
33 echo commit;
34 commit;
35 echo select * from t1;
36 select * from t1;
37 echo rollback;
38 rollback;
39 echo select * from t1;
40 select * from t1;
41 echo update t1 set f1=20 where f1=2;
42 update t1 set f1=20 where f1=2;
43 echo select * from t1 where f1=20;
44 select * from t1 where f1=20;
45 echo update t1 set f2=333 where f3=444;
46 update t1 set f2=333 where f3=444;
47 echo select * from t1 where f3=444;
48 select * from t1 where f3=444;
49 echo select * from t1;
50 select * from t1;
51 echo update t1 set f1=1,f2=10 where f1=20;
52 update t1 set f1=1,f2=10 where f1=20;
53 echo select * from t1;
54 select * from t1;
55 echo rollback;
56 rollback;
57 echo select * from t1 where f1=33;
58 select * from t1 where f1=33;
59 echo select * from t1 where f1=2;
60 select * from t1 where f1=2;
61 echo select * from t1 where f1=2 and f3=444;
62 select * from t1 where f1=2 and f3=444;
63 echo update t1 set f1=20 where f1=2;
64 update t1 set f1=20 where f1=2;
65 echo select * from t1 where f1=20;
66 select * from t1 where f1=20;
67 echo update t1 set f2=333 where f3=444;
68 update t1 set f2=333 where f3=444;
69 echo select * from t1;
70 select * from t1;
71 echo select * from t1 where f3=444;
72 select * from t1 where f3=444;
73 echo select * from t1;
74 select * from t1;
75 echo update t1 set f1=1,f2=10 where f1=20;
76 update t1 set f1=1,f2=10 where f1=20;
77 echo select * from t1;
78 select * from t1;
79 echo commit;
80 commit;
81 echo select *from t1;
82 select *from t1;
83 echo select * from t1 where f1=1;
84 select * from t1 where f1=1;
85 echo select * from t1 where f1=2;
86 select * from t1 where f1=2;
87 echo select * from t1 where f1=2 and f3=444;
88 select * from t1 where f1=2 and f3=444;
89 echo select * from t1;
90 select * from t1;
91 echo delete from t1 where f1=3 and f3=333;
92 delete from t1 where f1=3 and f3=333;
93 echo select * from t1;
94 select * from t1;
95 echo delete from t1 where f1 in(1,5) and f3 in(50,100);
96 delete from t1 where f1 in(1,5) and f3 in(50,100);
97 echo select * from t1;
98 select * from t1;
99 echo delete from t1 where f2 between 33 and 45;
100 delete from t1 where f2 between 33 and 45;
101 echo select * from t1;
102 select * from t1;
103 echo delete from t1;
104 delete from t1;
105 echo select * from t1;
106 select * from t1;
107 echo rollback;
108 rollback;
109 echo select * from t1; 
110 select * from t1; 
111 echo delete from t1 where f1=3 and f3=333;
112 delete from t1 where f1=3 and f3=333;
113 echo select * from t1;
114 select * from t1;
115 echo delete from t1 where f1 in(1,5) and f3 in(50,100);
116 delete from t1 where f1 in(1,5) and f3 in(50,100);
117 echo select * from t1;
118 select * from t1;
119 echo commit;
120 commit;
121 echo delete from t1 where f2 between 33 and 45;
122 delete from t1 where f2 between 33 and 45;
123 echo select * from t1;
124 select * from t1;
125 echo delete from t1;
126 delete from t1;
127 echo select * from t1;
128 select * from t1;
129 echo select * from t1;
130 select * from t1;
131 rollback;
132 echo drop table t1;
133 drop table t1;
134 echo quit;
135 quit;