~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/limit.test

  • Committer: Brian Aker
  • Date: 2010-01-22 00:53:13 UTC
  • Revision ID: brian@gaz-20100122005313-jmizcbcdi1lt4tcx
Revert db patch.

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
15
16
select * from t1;
16
17
update t1 set b=4 where b=1;
 
18
--sorted_result
17
19
select * from t1;
18
20
delete from t1 where b=2 limit 1;
 
21
--sorted_result
19
22
select * from t1;
20
23
delete from t1 limit 1;
 
24
--sorted_result
21
25
select * from t1;
22
26
drop table t1;
23
27
 
27
31
update t1 set i=2 limit 1;
28
32
delete from t1 limit 0;
29
33
update t1 set i=3 limit 0;
 
34
--sorted_result
30
35
select * from t1;
31
36
drop table t1;
32
37
 
51
56
DROP TABLE t1;
52
57
 
53
58
#
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
 
#
64
59
# Bug #21787: COUNT(*) + ORDER BY + LIMIT returns wrong result
65
60
#
66
61
create table t1 (a int);
72
67
drop table t1;
73
68
# End of 4.1 tests
74
69
 
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
 
 
97
70
--echo End of 5.0 tests