~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

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

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# should work with embedded server after mysqltest is fixed
 
2
-- source include/not_embedded.inc
 
3
-- source include/have_innodb.inc
 
4
 
 
5
#
 
6
# BUG#11733: COMMITs should not happen if read-only is set
 
7
#
 
8
 
 
9
--disable_warnings
 
10
DROP TABLE IF EXISTS table_11733 ;
 
11
--enable_warnings
 
12
 
 
13
# READ_ONLY does nothing to SUPER users
 
14
# so we use a non-SUPER one:
 
15
 
 
16
grant CREATE, SELECT, DROP on *.* to test@localhost;
 
17
 
 
18
connect (con1,localhost,test,,test);
 
19
 
 
20
connection default;
 
21
set global read_only=0;
 
22
 
 
23
# Any transactional engine will do
 
24
create table table_11733 (a int) engine=InnoDb;
 
25
 
 
26
connection con1;
 
27
BEGIN;
 
28
insert into table_11733 values(11733);
 
29
 
 
30
connection default;
 
31
set global read_only=1;
 
32
 
 
33
connection con1;
 
34
select @@global.read_only;
 
35
select * from table_11733 ;
 
36
-- error ER_OPTION_PREVENTS_STATEMENT
 
37
COMMIT;
 
38
 
 
39
connection default;
 
40
set global read_only=0;
 
41
drop table table_11733 ;
 
42
drop user test@localhost;
 
43