Current Path : /home/usr.opt/mysql57/mysql-test/r/ |
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 : //home/usr.opt/mysql57/mysql-test/r/mysqldump_bugs.result |
# # Bug #32141046: MYSQLDUMP SHOULD DUMP USERS REFERENCED IN DEFINER # CLAUSE OF STORED PROGRAMS. # 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); # ensure that mysql database is dumped first before any other database is dumped. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `mysql`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db1` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `db1`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db2` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `db2`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db3` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `db3`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db4` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `db4`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mtr` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `mtr`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqj` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `mysqj`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqk` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `mysqk`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqll` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `mysqll`; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `test`; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 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;