~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/t/limit.test

  • Committer: Monty Taylor
  • Date: 2008-07-05 18:10:38 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: monty@inaugust.com-20080705181038-0ih0nnamu5qrut0y
Fixed prototypes. Cleaned define a little bit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
update t1 set a=4 where b=1 limit 1;
13
13
select * from t1;
14
14
update t1 set b=2 where b=1 limit 2;
15
 
--sorted_result
16
15
select * from t1;
17
16
update t1 set b=4 where b=1;
18
 
--sorted_result
19
17
select * from t1;
20
18
delete from t1 where b=2 limit 1;
21
 
--sorted_result
22
19
select * from t1;
23
20
delete from t1 limit 1;
24
 
--sorted_result
25
21
select * from t1;
26
22
drop table t1;
27
23
 
31
27
update t1 set i=2 limit 1;
32
28
delete from t1 limit 0;
33
29
update t1 set i=3 limit 0;
34
 
--sorted_result
35
30
select * from t1;
36
31
drop table t1;
37
32
 
56
51
DROP TABLE t1;
57
52
 
58
53
#
 
54
# Bug#8023 - limit on UNION with from DUAL, causes syntax error
 
55
#
 
56
create table t1 (a integer);
 
57
insert into t1 values (1);
 
58
# both queries must return one row
 
59
select 1 as a from t1 union all select 1 from dual limit 1;
 
60
(select 1 as a from t1) union all (select 1 from dual) limit 1;
 
61
drop table t1;
 
62
 
 
63
#
59
64
# Bug #21787: COUNT(*) + ORDER BY + LIMIT returns wrong result
60
65
#
61
66
create table t1 (a int);
67
72
drop table t1;
68
73
# End of 4.1 tests
69
74
 
 
75
#
 
76
# Bug #28464: a string argument to 'limit ?' PS
 
77
#
 
78
 
 
79
prepare s from "select 1 limit ?";
 
80
set @a='qwe';
 
81
execute s using @a;
 
82
set @a=-1;
 
83
--error ER_WRONG_ARGUMENTS
 
84
execute s using @a;
 
85
prepare s from "select 1 limit 1, ?";
 
86
--error ER_WRONG_ARGUMENTS
 
87
execute s using @a;
 
88
prepare s from "select 1 limit ?, ?";
 
89
--error ER_WRONG_ARGUMENTS
 
90
execute s using @a, @a;
 
91
set @a=14632475938453979136;
 
92
execute s using @a, @a;
 
93
set @a=-14632475938453979136;
 
94
--error ER_WRONG_ARGUMENTS
 
95
execute s using @a, @a;
 
96
 
70
97
--echo End of 5.0 tests