-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MW-416 Replicating DDL after ACL check, 5.6 version
Re-implemented the fix for MW-416 according to 5.7 version
- Loading branch information
Showing
8 changed files
with
287 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
CREATE USER 'userMW416'@'localhost'; | ||
GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; | ||
SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; | ||
Variable_name Value | ||
wsrep_replicated 2 | ||
ALTER DATABASE db CHARACTER SET = utf8; | ||
ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'db' | ||
ALTER EVENT ev1 RENAME TO ev2; | ||
ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'test' | ||
ALTER FUNCTION fun1 COMMENT 'foo'; | ||
ERROR 42000: alter routine command denied to user 'userMW416'@'localhost' for routine 'test.fun1' | ||
ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; | ||
Got one of the listed errors | ||
ALTER PROCEDURE proc1 COMMENT 'foo'; | ||
Got one of the listed errors | ||
ALTER SERVER srv OPTIONS (USER 'sally'); | ||
Got one of the listed errors | ||
ALTER TABLE tbl DROP COLUMN col; | ||
Got one of the listed errors | ||
ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; | ||
Got one of the listed errors | ||
ALTER VIEW vw AS SELECT 1; | ||
Got one of the listed errors | ||
CREATE DATABASE db; | ||
Got one of the listed errors | ||
CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; | ||
Got one of the listed errors | ||
CREATE FUNCTION fun1() RETURNS int RETURN(1); | ||
Got one of the listed errors | ||
CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; | ||
Got one of the listed errors | ||
CREATE PROCEDURE proc1() BEGIN END; | ||
Got one of the listed errors | ||
CREATE INDEX idx ON tbl(id); | ||
Got one of the listed errors | ||
CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; | ||
Got one of the listed errors | ||
CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); | ||
Got one of the listed errors | ||
CREATE TABLE t (i int); | ||
Got one of the listed errors | ||
CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; | ||
Got one of the listed errors | ||
CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; | ||
Got one of the listed errors | ||
CREATE VIEW vw AS SELECT 1; | ||
Got one of the listed errors | ||
DROP DATABASE db; | ||
Got one of the listed errors | ||
DROP EVENT ev; | ||
Got one of the listed errors | ||
DROP FUNCTION fun1; | ||
Got one of the listed errors | ||
DROP INDEX idx ON t0; | ||
Got one of the listed errors | ||
DROP LOGFILE GROUP lfg; | ||
Got one of the listed errors | ||
DROP PROCEDURE proc1; | ||
Got one of the listed errors | ||
DROP SERVEr srv; | ||
Got one of the listed errors | ||
DROP TABLE t0; | ||
Got one of the listed errors | ||
DROP TABLESPACE tblspc; | ||
Got one of the listed errors | ||
DROP TRIGGER trg; | ||
Got one of the listed errors | ||
DROP VIEW vw; | ||
Got one of the listed errors | ||
RENAME TABLE t0 TO t1; | ||
Got one of the listed errors | ||
TRUNCATE TABLE t0; | ||
Got one of the listed errors | ||
ALTER USER myuser PASSWORD EXPIRE; | ||
Got one of the listed errors | ||
CREATE USER myuser IDENTIFIED BY 'pass'; | ||
Got one of the listed errors | ||
DROP USER myuser; | ||
Got one of the listed errors | ||
GRANT ALL ON *.* TO 'myuser'; | ||
Got one of the listed errors | ||
RENAME USER myuser TO mariauser; | ||
Got one of the listed errors | ||
REVOKE SELECT ON test FROM myuser; | ||
Got one of the listed errors | ||
REVOKE ALL, GRANT OPTION FROM myuser; | ||
Got one of the listed errors | ||
REVOKE PROXY ON myuser FROM myuser; | ||
Got one of the listed errors | ||
ANALYZE TABLE db.tbl; | ||
Got one of the listed errors | ||
CHECK TABLE db.tbl; | ||
Got one of the listed errors | ||
CHECKSUM TABLE db.tbl; | ||
Got one of the listed errors | ||
OPTIMIZE TABLE db.tbl; | ||
Got one of the listed errors | ||
REPAIR TABLE db.tbl; | ||
Got one of the listed errors | ||
INSTALL PLUGIN plg SONAME 'plg.so'; | ||
Got one of the listed errors | ||
UNINSTALL PLUGIN plg; | ||
Got one of the listed errors | ||
DROP USER 'userMW416'@'localhost'; | ||
SHOW DATABASES; | ||
Database | ||
information_schema | ||
mtr | ||
mysql | ||
performance_schema | ||
test | ||
SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; | ||
Variable_name Value | ||
wsrep_replicated 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
--source include/galera_cluster.inc | ||
--source include/have_innodb.inc | ||
|
||
CREATE USER 'userMW416'@'localhost'; | ||
GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; | ||
|
||
SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; | ||
|
||
--connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1 | ||
--connection userMW416 | ||
|
||
# DDL | ||
|
||
--error 1044 | ||
ALTER DATABASE db CHARACTER SET = utf8; | ||
--error 1044 | ||
ALTER EVENT ev1 RENAME TO ev2; | ||
--error 1370 | ||
ALTER FUNCTION fun1 COMMENT 'foo'; | ||
#--error 1044,1227 | ||
#ALTER INSTANCE ROTATE INNODB MASTER KEY; | ||
--error 1044,1227 | ||
ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; | ||
--error 1044,1227,1370 | ||
ALTER PROCEDURE proc1 COMMENT 'foo'; | ||
--error 1044,1227,1370 | ||
ALTER SERVER srv OPTIONS (USER 'sally'); | ||
--error 1044,1142,1227,1370 | ||
ALTER TABLE tbl DROP COLUMN col; | ||
--error 1044,1227,1370 | ||
ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; | ||
--error 1044,1142,1227,1370 | ||
ALTER VIEW vw AS SELECT 1; | ||
|
||
--error 1044,1227,1370 | ||
CREATE DATABASE db; | ||
--error 1044,1227,1370 | ||
CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; | ||
--error 1044,1227,1370 | ||
CREATE FUNCTION fun1() RETURNS int RETURN(1); | ||
--error 1044,1227,1370 | ||
CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; | ||
--error 1044,1227,1370 | ||
CREATE PROCEDURE proc1() BEGIN END; | ||
--error 1044,1142,1227,1370 | ||
CREATE INDEX idx ON tbl(id); | ||
--error 1044,1142,1227,1370 | ||
CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; | ||
--error 1044,1142,1227,1370 | ||
CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); | ||
--error 1044,1142,1227,1370 | ||
CREATE TABLE t (i int); | ||
--error 1044,1142,1227,1370 | ||
CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; | ||
--error 1044,1142,1227,1370 | ||
CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; | ||
--error 1044,1142,1227,1370 | ||
CREATE VIEW vw AS SELECT 1; | ||
|
||
|
||
|
||
--error 1044,1142,1227,1370 | ||
DROP DATABASE db; | ||
--error 1044,1142,1227,1370 | ||
DROP EVENT ev; | ||
--error 1044,1142,1227,1370 | ||
DROP FUNCTION fun1; | ||
--error 1044,1142,1227,1370 | ||
DROP INDEX idx ON t0; | ||
--error 1044,1142,1227,1370 | ||
DROP LOGFILE GROUP lfg; | ||
--error 1044,1142,1227,1370 | ||
DROP PROCEDURE proc1; | ||
--error 1044,1142,1227,1370 | ||
DROP SERVEr srv; | ||
--error 1044,1142,1227,1370 | ||
DROP TABLE t0; | ||
--error 1044,1142,1227,1370 | ||
DROP TABLESPACE tblspc; | ||
--error 1044,1142,1227,1360,1370 | ||
DROP TRIGGER trg; | ||
--error 1044,1142,1227,1370 | ||
DROP VIEW vw; | ||
|
||
--error 1044,1142,1227,1370 | ||
RENAME TABLE t0 TO t1; | ||
|
||
--error 1044,1142,1227,1370 | ||
TRUNCATE TABLE t0; | ||
|
||
# DCL | ||
|
||
# account management | ||
--error 1044,1142,1227,1370 | ||
ALTER USER myuser PASSWORD EXPIRE; | ||
--error 1044,1142,1227,1370 | ||
CREATE USER myuser IDENTIFIED BY 'pass'; | ||
--error 1044,1142,1227,1370 | ||
DROP USER myuser; | ||
--error 1044,1045,1142,1227,1370 | ||
GRANT ALL ON *.* TO 'myuser'; | ||
--error 1044,1142,1227,1370 | ||
RENAME USER myuser TO mariauser; | ||
--error 1044,1142,1227,1370 | ||
REVOKE SELECT ON test FROM myuser; | ||
--error 1044,1142,1227,1370,1698 | ||
REVOKE ALL, GRANT OPTION FROM myuser; | ||
--error 1044,1142,1227,1370,1698 | ||
REVOKE PROXY ON myuser FROM myuser; | ||
|
||
# table maintenance | ||
--error 1044,1142,1227,1370 | ||
ANALYZE TABLE db.tbl; | ||
--error 1044,1142,1227,1370 | ||
CHECK TABLE db.tbl; | ||
--error 1044,1142,1227,1370 | ||
CHECKSUM TABLE db.tbl; | ||
--error 1044,1142,1227,1370 | ||
OPTIMIZE TABLE db.tbl; | ||
--error 1044,1142,1227,1370 | ||
REPAIR TABLE db.tbl; | ||
|
||
# plugin and user defined functions | ||
--error 1044,1142,1227,1370 | ||
INSTALL PLUGIN plg SONAME 'plg.so'; | ||
--error 1044,1142,1227,1370 | ||
UNINSTALL PLUGIN plg; | ||
|
||
--connection node_1 | ||
DROP USER 'userMW416'@'localhost'; | ||
SHOW DATABASES; | ||
SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.