Current Path : /usr/opt/mysql57/mysql-test/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/mysql57/mysql-test/t/mysqldump_bugs.test |
# Embedded server doesn't support external clients --source include/not_embedded.inc --echo # --echo # Bug #32141046: MYSQLDUMP SHOULD DUMP USERS REFERENCED IN DEFINER --echo # CLAUSE OF STORED PROGRAMS. --echo # CREATE DATABASE IF NOT EXISTS db1; CREATE DATABASE IF NOT EXISTS db2; CREATE DATABASE IF NOT EXISTS db3; CREATE DATABASE IF NOT EXISTS db4; CREATE DATABASE IF NOT EXISTS mysqj; CREATE DATABASE IF NOT EXISTS mysqk; CREATE DATABASE IF NOT EXISTS mysqll; CREATE USER IF NOT EXISTS view_u1; CREATE USER IF NOT EXISTS view_u2@my.oracle.com; CREATE USER IF NOT EXISTS event_u1; CREATE USER IF NOT EXISTS event_u2@192.1.1.140; CREATE USER IF NOT EXISTS trig_u1; CREATE USER IF NOT EXISTS trig_u2@xyz.com; CREATE USER IF NOT EXISTS proc_u1; CREATE USER IF NOT EXISTS proc_u2@localhost; CREATE USER IF NOT EXISTS func_u1; CREATE USER IF NOT EXISTS func_u2; CREATE USER IF NOT EXISTS user_not_referenced_as_definer; USE db1; CREATE TABLE t1 (i int not null, j int); CREATE DEFINER=view_u1 VIEW v1 AS SELECT * FROM t1; CREATE DEFINER=view_u1 VIEW v2 AS SELECT * FROM t1; CREATE DEFINER=view_u2@my.oracle.com VIEW v3 AS SELECT * FROM t1; CREATE DEFINER=view_u2@my.oracle.com VIEW v4 AS SELECT * FROM t1; CREATE DEFINER=event_u1 EVENT e1 ON SCHEDULE AT '2037-01-01 00:00:00' DISABLE DO SET @a = 5; CREATE DEFINER=event_u1 EVENT e2 ON SCHEDULE AT '2037-01-01 00:00:00' DISABLE DO SET @a = 5; CREATE DEFINER=event_u2@192.1.1.140 EVENT e3 ON SCHEDULE AT '2037-01-01 00:00:00' DISABLE DO SET @a = 5; CREATE DEFINER=event_u2@192.1.1.140 EVENT e4 ON SCHEDULE AT '2037-01-01 00:00:00' DISABLE DO SET @a = 5; CREATE DEFINER=trig_u1 TRIGGER trig1 BEFORE INSERT ON t1 FOR EACH ROW SET @sum = 1; CREATE DEFINER=trig_u1 TRIGGER trig2 BEFORE INSERT ON t1 FOR EACH ROW SET @sum = 1; CREATE DEFINER=trig_u2@xyz.com TRIGGER trig3 BEFORE INSERT ON t1 FOR EACH ROW SET @sum = 1; CREATE DEFINER=trig_u2@xyz.com TRIGGER trig4 BEFORE INSERT ON t1 FOR EACH ROW SET @sum = 1; CREATE DEFINER=proc_u1 PROCEDURE p1() INSERT INTO t1 VALUES(10); CREATE DEFINER=proc_u1 PROCEDURE p2() INSERT INTO t1 VALUES(10); CREATE DEFINER=proc_u2@localhost PROCEDURE p3() INSERT INTO t1 VALUES(10); CREATE DEFINER=proc_u2@localhost PROCEDURE p4() INSERT INTO t1 VALUES(10); CREATE DEFINER=func_u1 FUNCTION f1 (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT('Hello, ',s,'!'); CREATE DEFINER=func_u1 FUNCTION f2 (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT('Hello, ',s,'!'); CREATE DEFINER=func_u2 FUNCTION f3 (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT('Hello, ',s,'!'); CREATE DEFINER=func_u2 FUNCTION f4 (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT('Hello, ',s,'!'); use db2; CREATE TABLE t1 (i int not null, j int); --echo # ensure that mysql database is dumped first before any other database is dumped. --exec $MYSQL_DUMP --all-databases --skip-comments --no-create-info --no-data --skip-triggers #cleanup DROP DATABASE IF EXISTS db1; DROP DATABASE IF EXISTS db2; DROP DATABASE IF EXISTS db3; DROP DATABASE IF EXISTS db4; DROP DATABASE IF EXISTS mysqj; DROP DATABASE IF EXISTS mysqk; DROP DATABASE IF EXISTS mysqll; DROP USER view_u1, view_u2@my.oracle.com, event_u1, event_u2@192.1.1.140, trig_u1, trig_u2@xyz.com, proc_u1, proc_u2@localhost, func_u1, func_u2, user_not_referenced_as_definer;