~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_ignore_table.result

  • 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
stop slave;
 
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
3
reset master;
 
4
reset slave;
 
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
6
start slave;
 
7
**** Test case for BUG#16487 ****
 
8
**** Master ****
 
9
CREATE TABLE test.t4 (a int);
 
10
CREATE TABLE test.t1 (a int);
 
11
UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5;
 
12
**** Slave ****
 
13
SELECT * FROM t4;
 
14
a
 
15
DROP TABLE t1;
 
16
DROP TABLE t4;
 
17
**** Test case for BUG#25482 ****
 
18
**** Adding GRANTS on master ****
 
19
create table test.t1(a int);
 
20
create table test.t4(a int);
 
21
GRANT SELECT ON test.t1 TO mysqltest1@localhost;
 
22
GRANT INSERT ON test.t4 TO mysqltest2@localhost;
 
23
GRANT select, update, insert, references on t1
 
24
to mysqltest2@localhost;
 
25
GRANT SELECT ON test.* TO mysqltest3@localhost;
 
26
GRANT INSERT ON test.t4 TO mysqltest3@localhost;
 
27
GRANT select(a), update(a), insert(a), references(a) on t4
 
28
to mysqltest3@localhost;
 
29
create database mysqltest2;
 
30
create table mysqltest2.t2 (id int);
 
31
GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass';
 
32
insert into mysql.user (user, host) values ("mysqltest5", "somehost");
 
33
Warnings:
 
34
Warning 1364    Field 'ssl_cipher' doesn't have a default value
 
35
Warning 1364    Field 'x509_issuer' doesn't have a default value
 
36
Warning 1364    Field 'x509_subject' doesn't have a default value
 
37
GRANT SELECT ON *.* TO mysqltest6@localhost;
 
38
GRANT INSERT ON *.* TO mysqltest6@localhost;
 
39
GRANT INSERT ON test.* TO mysqltest6@localhost;
 
40
GRANT INSERT ON test.t1 TO mysqltest6@localhost;
 
41
show grants for mysqltest1@localhost;
 
42
Grants for mysqltest1@localhost
 
43
GRANT USAGE ON *.* TO 'mysqltest1'@'localhost'
 
44
GRANT SELECT ON `test`.`t1` TO 'mysqltest1'@'localhost'
 
45
show grants for mysqltest2@localhost;
 
46
Grants for mysqltest2@localhost
 
47
GRANT USAGE ON *.* TO 'mysqltest2'@'localhost'
 
48
GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO 'mysqltest2'@'localhost'
 
49
GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost'
 
50
show grants for mysqltest3@localhost;
 
51
Grants for mysqltest3@localhost
 
52
GRANT USAGE ON *.* TO 'mysqltest3'@'localhost'
 
53
GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost'
 
54
GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost'
 
55
show grants for mysqltest4@localhost;
 
56
Grants for mysqltest4@localhost
 
57
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
 
58
GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost'
 
59
show grants for mysqltest6@localhost;
 
60
Grants for mysqltest6@localhost
 
61
GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost'
 
62
GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost'
 
63
GRANT INSERT ON `test`.`t1` TO 'mysqltest6'@'localhost'
 
64
flush privileges;
 
65
show grants for mysqltest5@somehost;
 
66
Grants for mysqltest5@somehost
 
67
GRANT USAGE ON *.* TO 'mysqltest5'@'somehost'
 
68
**** Checking grants on slave ****
 
69
show grants for mysqltest2@localhost;
 
70
Grants for mysqltest2@localhost
 
71
GRANT USAGE ON *.* TO 'mysqltest2'@'localhost'
 
72
GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost'
 
73
show grants for mysqltest3@localhost;
 
74
Grants for mysqltest3@localhost
 
75
GRANT USAGE ON *.* TO 'mysqltest3'@'localhost'
 
76
GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost'
 
77
GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost'
 
78
show grants for mysqltest4@localhost;
 
79
Grants for mysqltest4@localhost
 
80
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
 
81
GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost'
 
82
show grants for mysqltest5@somehost;
 
83
Grants for mysqltest5@somehost
 
84
GRANT USAGE ON *.* TO 'mysqltest5'@'somehost'
 
85
show grants for mysqltest6@localhost;
 
86
Grants for mysqltest6@localhost
 
87
GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost'
 
88
GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost'
 
89
show grants for mysqltest1@localhost;
 
90
ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost'
 
91
**** Revoking grants on master ****
 
92
REVOKE SELECT ON test.t1 FROM mysqltest1@localhost;
 
93
REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost;
 
94
REVOKE select(a) on t4
 
95
from mysqltest3@localhost;
 
96
show grants for mysqltest1@localhost;
 
97
Grants for mysqltest1@localhost
 
98
GRANT USAGE ON *.* TO 'mysqltest1'@'localhost'
 
99
show grants for mysqltest3@localhost;
 
100
Grants for mysqltest3@localhost
 
101
GRANT USAGE ON *.* TO 'mysqltest3'@'localhost'
 
102
GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost'
 
103
GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost'
 
104
show grants for mysqltest4@localhost;
 
105
Grants for mysqltest4@localhost
 
106
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
 
107
**** Checking grants on slave ****
 
108
show grants for mysqltest1@localhost;
 
109
ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost'
 
110
show grants for mysqltest3@localhost;
 
111
Grants for mysqltest3@localhost
 
112
GRANT USAGE ON *.* TO 'mysqltest3'@'localhost'
 
113
GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost'
 
114
GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost'
 
115
show grants for mysqltest4@localhost;
 
116
Grants for mysqltest4@localhost
 
117
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
 
118
set global slave_exec_mode='IDEMPOTENT';
 
119
drop table t1, t4, mysqltest2.t2;
 
120
drop database mysqltest2;
 
121
delete from mysql.user where user like "mysqltest%";
 
122
delete from mysql.db where user like "mysqltest%";
 
123
delete from mysql.columns_priv where user like "mysqltest%";
 
124
delete from mysql.tables_priv where user like "mysqltest%";
 
125
delete from mysql.tables_priv where user like "mysqltest%";
 
126
DROP TABLE IF EXISTS t5;
 
127
CREATE TABLE t5 (
 
128
word varchar(50) collate utf8_unicode_ci NOT NULL default ''
 
129
) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
130
SET @@session.character_set_client=33,@@session.collation_connection=192;
 
131
CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY;
 
132
INSERT INTO t5 (word)  VALUES ('TEST’');
 
133
SELECT HEX(word) FROM t5;
 
134
HEX(word)
 
135
54455354E28099
 
136
set @@global.slave_exec_mode= default;
 
137
SELECT HEX(word) FROM t5;
 
138
HEX(word)
 
139
54455354E28099
 
140
SELECT * FROM tmptbl504451f4258$1;
 
141
ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist
 
142
DROP TABLE t5;