~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/select_safe.test

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
drop table if exists t1;
7
7
--enable_warnings
8
8
 
9
 
SET SQL_SELECT_LIMIT=4, MAX_JOIN_SIZE=9;
 
9
SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, MAX_JOIN_SIZE=9;
10
10
create table t1 (a int auto_increment primary key, b char(20));
11
11
insert into t1 values(1,"test");
12
 
--sorted_result
13
12
SELECT SQL_BUFFER_RESULT * from t1;
14
13
update t1 set b="a" where a=1;
15
14
delete from t1 where a=1;
16
15
insert into t1 values(1,"test"),(2,"test2");
17
 
--sorted_result
18
16
SELECT SQL_BUFFER_RESULT * from t1;
19
17
update t1 set b="a" where a=1;
20
18
select 1 from t1,t1 as t2,t1 as t3;
21
19
 
22
 
# The following should NOT give errors:
 
20
# The following should give errors:
 
21
--error 1175
23
22
update t1 set b="a";
 
23
--error 1175
24
24
update t1 set b="a" where b="test";
 
25
--error 1175
25
26
delete from t1;
 
27
--error 1175
26
28
delete from t1 where b="test";
 
29
--error 1175
27
30
delete from t1 where a+0=1;
 
31
--error 1104
28
32
select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5;
29
33
 
30
34
# The following should be ok:
81
85
select * from (select 1 union select 2 union select 3) x;
82
86
drop table t1;
83
87
 
84
 
SET SQL_SELECT_LIMIT=DEFAULT, MAX_JOIN_SIZE=DEFAULT;
 
88
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, MAX_JOIN_SIZE=DEFAULT;
85
89
 
86
90
# End of 4.1 tests