summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-11-15 10:23:27 +0100
committerunknown <msvensson@neptunus.(none)>2006-11-15 10:23:27 +0100
commit8b8647ff42757f0908340b054ec3d74c56ebfcb0 (patch)
tree7a8705274fa8b0035377163641ecf440b1e5e39c /mysql-test/r
parentb7dd49b01622a37ce07a0b8020a27c124e9f846b (diff)
downloadmariadb-git-8b8647ff42757f0908340b054ec3d74c56ebfcb0.tar.gz
Cleanup after test cases
mysql-test/r/init_connect.result: Restore global variable to the value it's set to when server is started mysql-test/r/key_cache.result: Restore global variable values to original mysql-test/r/mysqldump.result: Drop the user that was created. Specifying "drop user myDB_user" is equal to "drop user myDB_user@%" mysql-test/r/rpl_deadlock.result: Restore global variable values to original mysql-test/r/rpl_drop_db.result: Remove the conflicting file and drop database mysqltest1 before test exits mysql-test/r/rpl_ignore_revoke.result: As changes to mysql.* are ignored - explicitly delete the user on slave mysql-test/r/rpl_init_slave.result: Restore global variable values to original mysql-test/r/rpl_max_relay_size.result: Restore global variable values to original mysql-test/r/rpl_sp.result: Restore global variable values to original mysql-test/r/rpl_timezone.result: Restore global variable values to original mysql-test/r/rpl_variables.result: Restore global variable values to original mysql-test/r/view_grant.result: Use same user in all places in the same test "readonly" is equal to "readonly@%" not "readonly@localhost" mysql-test/t/init_connect.test: Restore global variable to the value it's set to when server is started mysql-test/t/key_cache.test: Restore global variable values to original mysql-test/t/mysqldump.test: Drop the user that was created. Specifying "drop user myDB_user" is equal to "drop user myDB_user@%" mysql-test/t/rpl_deadlock.test: Restore global variable values to original mysql-test/t/rpl_drop_db.test: Remove the conflicting file and drop database mysqltest1 before test exits mysql-test/t/rpl_ignore_revoke.test: As changes to mysql.* are ignored - explicitly delete the user on slave mysql-test/t/rpl_init_slave.test: Restore global variable values to original mysql-test/t/rpl_max_relay_size.test: Restore global variable values to original mysql-test/t/rpl_sp.test: Restore global variable values to original mysql-test/t/rpl_timezone.test: Restore global variable values to original mysql-test/t/rpl_variables.test: Restore global variable values to original mysql-test/t/view_grant.test: Use same user in all places in the same test "readonly" is equal to "readonly@%" not "readonly@localhost"
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/init_connect.result2
-rw-r--r--mysql-test/r/key_cache.result4
-rw-r--r--mysql-test/r/mysqldump.result6
-rw-r--r--mysql-test/r/rpl_deadlock.result2
-rw-r--r--mysql-test/r/rpl_drop_db.result2
-rw-r--r--mysql-test/r/rpl_ignore_revoke.result1
-rw-r--r--mysql-test/r/rpl_init_slave.result3
-rw-r--r--mysql-test/r/rpl_max_relay_size.result2
-rw-r--r--mysql-test/r/rpl_sp.result2
-rw-r--r--mysql-test/r/rpl_timezone.result2
-rw-r--r--mysql-test/r/rpl_variables.result2
-rw-r--r--mysql-test/r/view_grant.result14
12 files changed, 31 insertions, 11 deletions
diff --git a/mysql-test/r/init_connect.result b/mysql-test/r/init_connect.result
index f90ee5913a1..f5ec0bdc932 100644
--- a/mysql-test/r/init_connect.result
+++ b/mysql-test/r/init_connect.result
@@ -132,7 +132,7 @@ x
17
19
drop trigger trg1;
-set global init_connect=default;
+set global init_connect="set @a='a\\0c'";
revoke all privileges, grant option from mysqltest1@localhost;
drop user mysqltest1@localhost;
drop table t1, t2;
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index 406a92b9a08..a1bf3d0e128 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -284,12 +284,15 @@ insert t1 values ('aaabbb');
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+set @my_key_cache_block_size= @@global.key_cache_block_size;
set GLOBAL key_cache_block_size=2048;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
+set global key_cache_block_size= @my_key_cache_block_size;
CREATE TABLE t1(a int NOT NULL AUTO_INCREMENT PRIMARY KEY);
+SET @my_key_cache_block_size= @@global.key_cache_block_size;
SET GLOBAL key_cache_block_size=1536;
INSERT INTO t1 VALUES (1);
SELECT @@key_cache_block_size;
@@ -331,6 +334,7 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1,t2;
+set global key_cache_block_size= @my_key_cache_block_size;
set @@global.key_buffer_size=0;
Warnings:
Warning 1438 Cannot drop default keycache
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 54583febbc8..35a79d6a805 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -3089,7 +3089,7 @@ drop user mysqltest_1@localhost;
#
create database mysqldump_myDB;
use mysqldump_myDB;
-create user myDB_User;
+create user myDB_User@localhost;
grant create, create view, select, insert on mysqldump_myDB.* to myDB_User@localhost;
create table t1 (c1 int);
insert into t1 values (3);
@@ -3102,7 +3102,7 @@ drop view v1;
drop table t1;
drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
-drop user myDB_User;
+drop user myDB_User@localhost;
drop database mysqldump_myDB;
flush privileges;
# Bug #21424 continues from here.
@@ -3120,7 +3120,7 @@ drop view v1;
drop table t1;
drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
-drop user myDB_User;
+drop user myDB_User@localhost;
drop database mysqldump_myDB;
use test;
#
diff --git a/mysql-test/r/rpl_deadlock.result b/mysql-test/r/rpl_deadlock.result
index 541e12b806f..63b15bc1a1f 100644
--- a/mysql-test/r/rpl_deadlock.result
+++ b/mysql-test/r/rpl_deadlock.result
@@ -126,6 +126,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
+set @my_max_relay_log_size= @@global.max_relay_log_size;
set global max_relay_log_size=0;
stop slave;
change master to master_log_pos=532;
@@ -178,3 +179,4 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
drop table t1,t2,t3,t4;
+set global max_relay_log_size= @my_max_relay_log_size;
diff --git a/mysql-test/r/rpl_drop_db.result b/mysql-test/r/rpl_drop_db.result
index ce9d39e87f6..97a24d980b6 100644
--- a/mysql-test/r/rpl_drop_db.result
+++ b/mysql-test/r/rpl_drop_db.result
@@ -33,3 +33,5 @@ n
1234
drop table t1;
stop slave;
+drop database mysqltest1;
+drop database mysqltest1;
diff --git a/mysql-test/r/rpl_ignore_revoke.result b/mysql-test/r/rpl_ignore_revoke.result
index 42625119f28..b1ccd2f0442 100644
--- a/mysql-test/r/rpl_ignore_revoke.result
+++ b/mysql-test/r/rpl_ignore_revoke.result
@@ -27,3 +27,4 @@ select_priv
Y
revoke select on *.* FROM 'user_foo';
delete from mysql.user where user="user_foo";
+delete from mysql.user where user="user_foo";
diff --git a/mysql-test/r/rpl_init_slave.result b/mysql-test/r/rpl_init_slave.result
index 83d0a3289a2..f92fb9b4c1d 100644
--- a/mysql-test/r/rpl_init_slave.result
+++ b/mysql-test/r/rpl_init_slave.result
@@ -17,8 +17,11 @@ init_slave
show variables like 'max_connections';
Variable_name Value
max_connections 100
+set @my_global_init_connect= @@global.init_connect;
set global init_connect="set @c=1";
show variables like 'init_connect';
Variable_name Value
init_connect set @c=1
stop slave;
+set global init_connect= @my_global_init_connect;
+set global max_connections= default;
diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result
index 1fa49db6013..95c9ae79d05 100644
--- a/mysql-test/r/rpl_max_relay_size.result
+++ b/mysql-test/r/rpl_max_relay_size.result
@@ -14,6 +14,7 @@ reset slave;
#
# Test 1
#
+set @my_max_binlog_size= @@global.max_binlog_size;
set global max_binlog_size=8192;
set global max_relay_log_size=8192-1;
select @@global.max_relay_log_size;
@@ -266,6 +267,7 @@ File master-bin.000002
Position 98
Binlog_Do_DB
Binlog_Ignore_DB
+set global max_binlog_size= @my_max_binlog_size;
#
# End of 4.1 tests
#
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result
index 7b096b27733..7f152862373 100644
--- a/mysql-test/r/rpl_sp.result
+++ b/mysql-test/r/rpl_sp.result
@@ -465,3 +465,5 @@ RETURN 0
DROP PROCEDURE p1;
DROP FUNCTION f1;
drop table t1;
+set global log_bin_trust_function_creators=0;
+set global log_bin_trust_function_creators=0;
diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result
index 96a892f00fc..fde8709843e 100644
--- a/mysql-test/r/rpl_timezone.result
+++ b/mysql-test/r/rpl_timezone.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+set @my_time_zone= @@global.time_zone;
set timestamp=100000000;
create table t1 (t timestamp);
create table t2 (t char(32));
@@ -126,3 +127,4 @@ t
2003-12-31 23:00:00
2005-01-01 08:00:00
drop table t1, t2;
+set global time_zone= @my_time_zone;
diff --git a/mysql-test/r/rpl_variables.result b/mysql-test/r/rpl_variables.result
index 25b5ca13f77..6c532e33983 100644
--- a/mysql-test/r/rpl_variables.result
+++ b/mysql-test/r/rpl_variables.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+set @my_slave_net_timeout =@@global.slave_net_timeout;
set global slave_net_timeout=100;
set global sql_slave_skip_counter=100;
show variables like 'slave_compressed_protocol';
@@ -15,3 +16,4 @@ slave_load_tmpdir SLAVE_LOAD_TMPDIR
show variables like 'slave_skip_errors';
Variable_name Value
slave_skip_errors 3,100,137,643,1752
+set global slave_net_timeout =@my_slave_net_timeout;
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index 35e7afc0a7b..cf9ba1c604d 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -544,13 +544,13 @@ CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tu AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tus AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_td AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tds AS SELECT * FROM mysqltest1.t1;
-GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly;
-GRANT SELECT ON mysqltest1.v_ts TO readonly;
-GRANT INSERT ON mysqltest1.v_ti TO readonly;
-GRANT UPDATE ON mysqltest1.v_tu TO readonly;
-GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly;
-GRANT DELETE ON mysqltest1.v_td TO readonly;
-GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly;
+GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly@localhost;
+GRANT SELECT ON mysqltest1.v_ts TO readonly@localhost;
+GRANT INSERT ON mysqltest1.v_ti TO readonly@localhost;
+GRANT UPDATE ON mysqltest1.v_tu TO readonly@localhost;
+GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly@localhost;
+GRANT DELETE ON mysqltest1.v_td TO readonly@localhost;
+GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly@localhost;
SELECT * FROM mysqltest1.v_t1;
ERROR HY000: View 'mysqltest1.v_t1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
INSERT INTO mysqltest1.v_t1 VALUES(4);