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