~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/r/limit.result

  • Committer: Brian Aker
  • Date: 2008-07-07 14:25:25 UTC
  • mto: (77.1.25 codestyle)
  • mto: This revision was merged to the branch mainline in revision 82.
  • Revision ID: brian@tangent.org-20080707142525-xzy2nl3ie2ebwfln
LL() cleanup

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
9
10
2       1
10
11
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
16
17
2       2
17
 
3       2
18
 
4       1
 
18
3       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
23
24
2       2
24
 
3       2
25
 
4       4
 
25
3       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
 
3       2
31
 
4       4
 
30
2       2
 
31
3       4
32
32
delete from t1 limit 1;
33
33
select * from t1;
34
34
a       b
35
 
3       2
36
 
4       4
 
35
2       2
 
36
3       4
37
37
drop table t1;
38
38
create table t1 (i int);
39
39
insert into t1 (i) values(1),(1),(1);
43
43
update t1 set i=3 limit 0;
44
44
select * from t1;
45
45
i
46
 
1
47
46
2
 
47
1
48
48
drop table t1;
49
49
select 0 limit 0;
50
50
0
54
54
INSERT INTO t1 SET id2=0;
55
55
SELECT * FROM t1;
56
56
id      id2
 
57
4       0
57
58
2       0
58
59
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
4       0
63
64
3       0
64
 
4       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;
70
79
create table t1 (a int);
71
80
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
72
81
explain select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
82
91
c
83
92
28
84
93
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
85
113
End of 5.0 tests