~mathiaz/ubuntu/lucid/mysql-dfsg-5.1/zap-bug-552053

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-06-25 12:55:45 UTC
  • mfrom: (1.1.2 upstream) (0.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20090625125545-m8ogs96zzsri74xe
Tags: 5.1.34-1ubuntu1
* Merge from debian experimental (and 5.0 from main), remaining changes:
  - debian/mysql-server-5.1.config:
    + ask for MySQL root password at priority high instead of medium so
      that the password prompt is seen on a default install. (LP: #319843)
    + don't ask for root password when upgrading from a 5.0 install.
  - debian/control:
    + Make libmysqlclient16-dev a transitional package depending on
      libmysqlclient-dev.
    + Make libmysqlclient-dev conflict with libmysqlclient15-dev.
    + Don't build mysql-server, mysql-client, mysql-common and
      libmysqlclient15-dev binary packages since they're still provided
      by mysql-dfsg-5.0.
    + Make mysql-{client,server}-5.1 packages conflict and
      replace mysql-{client,server}-5.0, but not provide
      mysql-{client,server}.
    + Depend on a specific version of mysql-common rather than the src
      version of mysql-dfsg-5.1 since mysql-common is currently part of
      mysql-dfsg-5.0.
    + Lower mailx from a Recommends to a Suggests to avoid pulling in
      a full MTA on all installs of mysql-server. (LP: #259477)
  - debian/rules:
    + added -fno-strict-aliasing to CFLAGS to get around mysql testsuite
      build failures.
    + install mysql-test and sql-bench to /usr/share/mysql/ rather than
      /usr/.
  - debian/additions/debian-start.inc.sh: support ANSI mode (LP: #310211)
  - Add AppArmor profile:
    - debian/apparmor-profile: apparmor profile.
    - debian/rules, debian/mysql-server-5.0.files: install apparmor profile.
    - debian/mysql-server-5.0.dirs: add etc/apparmor.d/force-complain
    - debian/mysql-server-5.0.postrm: remove symlink in force-complain/ on
      purge.
    - debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    - debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    - debian/mysql-server-5.1.postinst: reload apparmor profiles.
  - debian/additions/my.cnf: remove language option. Error message files are
    located in a different directory in MySQL 5.0. Setting the language
    option to use /usr/share/mysql/english breaks 5.0. Both 5.0 and 5.1
    use a default value that works. (LP: #316974)
  - debian/mysql-server-5.1.mysql.init:
    + Clearly indicate that we do not support running multiple instances
      of mysqld by duplicating the init script.
      (closes: #314785, #324834, #435165, #444216)
    + Properly parameterize all existing references to the mysql config
      file (/etc/mysql/my.cnf).
  - debian/mysql-server-5.0.postinst: Clear out the second password
    when setting up mysql. (LP: #344816)
  - mysql-server-core-5.1 package for files needed by Akonadi:
    + debian/control: create mysql-server-core-5.1 package.
    + debian/mysql-server-core-5.1.files, debian/mysql-server-5.1.files:
      move core mysqld files to mysql-server-core-5.1 package.
  - Don't package sql-bench and mysql-test file.
* Dropped changes:
  - debian/patches/92_ssl_test_cert.dpatch: certificate expiration in
    test suite (LP: #323755). Included upstream.
* Dropped from 5.0:
  - apparmor profile:
    - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6. All version
      of apparmor-profile (>hardy) are higher than this version.
    - debian/mysql-server-5.0.preinst: create symlink for force-complain/
      on pre-feisty upgrades, upgrades where apparmor-profiles profile is
      unchanged (ie non-enforcing) and upgrades where the profile
      doesn't exist. Support for pre-hardy upgrades is no longer needed.
* debian/mysql-server-5.1.postinst: fix debian-sys-maint user creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set @start_read_only= @@global.read_only;
1
2
DROP TABLE IF EXISTS t1,t2,t3;
2
3
grant CREATE, SELECT, DROP on *.* to test@localhost;
 
4
connect (con1,localhost,test,,test);
 
5
connection default;
3
6
set global read_only=0;
 
7
connection con1;
4
8
create table t1 (a int);
5
9
insert into t1 values(1);
6
10
create table t2 select * from t1;
 
11
connection default;
7
12
set global read_only=1;
8
13
create table t3 (a int);
9
14
drop table t3;
 
15
connection con1;
10
16
select @@global.read_only;
11
17
@@global.read_only
12
18
1
39
45
drop table t1;
40
46
insert into t1 values(1);
41
47
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
 
48
connection default;
42
49
set global read_only=0;
43
50
lock table t1 write;
 
51
connection con1;
44
52
lock table t2 write;
 
53
connection default;
45
54
set global read_only=1;
46
55
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
47
56
unlock tables ;
 
57
send set global read_only=1;
48
58
set global read_only=1;
 
59
connection con1;
49
60
select @@global.read_only;
50
61
@@global.read_only
51
62
0
53
64
select @@global.read_only;
54
65
@@global.read_only
55
66
1
 
67
connection default;
 
68
reap;
 
69
connection default;
56
70
set global read_only=0;
57
71
lock table t1 read;
 
72
connection con1;
58
73
lock table t2 read;
 
74
connection default;
59
75
set global read_only=1;
60
76
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
61
77
unlock tables ;
 
78
send set global read_only=1;
62
79
set global read_only=1;
 
80
connection con1;
63
81
select @@global.read_only;
64
82
@@global.read_only
65
83
0
67
85
select @@global.read_only;
68
86
@@global.read_only
69
87
1
 
88
connection default;
 
89
reap;
 
90
connection default;
70
91
set global read_only=0;
71
92
BEGIN;
 
93
connection con1;
72
94
BEGIN;
 
95
connection default;
73
96
set global read_only=1;
74
97
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
75
98
ROLLBACK;
76
99
set global read_only=1;
 
100
connection con1;
77
101
select @@global.read_only;
78
102
@@global.read_only
79
103
1
80
104
ROLLBACK;
 
105
connection default;
81
106
set global read_only=0;
82
107
flush tables with read lock;
83
108
set global read_only=1;
84
109
unlock tables;
 
110
connect (root2,localhost,root,,test);
 
111
connection default;
85
112
set global read_only=0;
86
113
flush tables with read lock;
 
114
connection root2;
87
115
set global read_only=1;
 
116
connection default;
88
117
select @@global.read_only;
89
118
@@global.read_only
90
119
1
94
123
drop temporary table if exists ttt;
95
124
Warnings:
96
125
Note    1051    Unknown table 'ttt'
 
126
connection default;
97
127
set global read_only=0;
98
128
drop table t1,t2;
99
129
drop user test@localhost;
100
130
#
101
 
# Bug #27440 read_only allows create and drop database
 
131
# Bug#27440 read_only allows create and drop database
102
132
#
103
133
set global read_only= 1;
104
134
drop database if exists mysqltest_db1;
112
142
create database mysqltest_db1;
113
143
grant all on mysqltest_db1.* to `mysqltest_u1`@`%`;
114
144
flush privileges;
 
145
connect (con_bug27440,127.0.0.1,mysqltest_u1,,test,MASTER_MYPORT,);
 
146
connection con_bug27440;
115
147
create database mysqltest_db2;
116
148
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
117
149
show databases like '%mysqltest_db2%';
118
150
Database (%mysqltest_db2%)
119
151
drop database mysqltest_db1;
120
152
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
 
153
disconnect con_bug27440;
 
154
connection default;
121
155
delete from mysql.user where User like 'mysqltest_%';
122
156
delete from mysql.db where User like 'mysqltest_%';
123
157
delete from mysql.tables_priv where User like 'mysqltest_%';
124
158
delete from mysql.columns_priv where User like 'mysqltest_%';
125
159
flush privileges;
126
160
drop database mysqltest_db1;
127
 
set global read_only=0;
 
161
set global read_only= @start_read_only;