~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/limit.result

Merging stdize-code with main trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
select * from t1;
7
7
a       b
8
8
0       0
9
 
4       1
10
9
2       1
11
10
3       1
 
11
4       1
12
12
update t1 set b=2 where b=1 limit 2;
13
13
select * from t1;
14
14
a       b
15
15
0       0
16
 
4       2
17
16
2       2
18
 
3       1
 
17
3       2
 
18
4       1
19
19
update t1 set b=4 where b=1;
20
20
select * from t1;
21
21
a       b
22
22
0       0
23
 
4       2
24
23
2       2
25
 
3       4
 
24
3       2
 
25
4       4
26
26
delete from t1 where b=2 limit 1;
27
27
select * from t1;
28
28
a       b
29
29
0       0
30
 
2       2
31
 
3       4
 
30
3       2
 
31
4       4
32
32
delete from t1 limit 1;
33
33
select * from t1;
34
34
a       b
35
 
2       2
36
 
3       4
 
35
3       2
 
36
4       4
37
37
drop table t1;
38
38
create table t1 (i int);
39
39
insert into t1 (i) values(1),(1),(1);
54
54
INSERT INTO t1 SET id2=0;
55
55
SELECT * FROM t1;
56
56
id      id2
57
 
4       0
58
57
2       0
59
58
3       0
 
59
4       0
60
60
DELETE FROM t1 WHERE id2 = 0 ORDER BY id LIMIT 1;
61
61
SELECT * FROM t1;
62
62
id      id2
 
63
3       0
63
64
4       0
64
 
3       0
65
65
DELETE FROM t1 WHERE id2 = 0 ORDER BY id desc LIMIT 1;
66
66
SELECT * FROM t1;
67
67
id      id2
68
68
3       0
69
69
DROP TABLE t1;
70
 
create table t1 (a integer);
71
 
insert into t1 values (1);
72
 
select 1 as a from t1 union all select 1 from dual limit 1;
73
 
a
74
 
1
75
 
(select 1 as a from t1) union all (select 1 from dual) limit 1;
76
 
a
77
 
1
78
 
drop table t1;
79
70
create table t1 (a int);
80
71
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
81
72
explain select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
91
82
c
92
83
28
93
84
drop table t1;
94
 
prepare s from "select 1 limit ?";
95
 
set @a='qwe';
96
 
execute s using @a;
97
 
1
98
 
set @a=-1;
99
 
execute s using @a;
100
 
ERROR HY000: Incorrect arguments to EXECUTE
101
 
prepare s from "select 1 limit 1, ?";
102
 
execute s using @a;
103
 
ERROR HY000: Incorrect arguments to EXECUTE
104
 
prepare s from "select 1 limit ?, ?";
105
 
execute s using @a, @a;
106
 
ERROR HY000: Incorrect arguments to EXECUTE
107
 
set @a=14632475938453979136;
108
 
execute s using @a, @a;
109
 
1
110
 
set @a=-14632475938453979136;
111
 
execute s using @a, @a;
112
 
ERROR HY000: Incorrect arguments to EXECUTE
113
85
End of 5.0 tests