include/master-slave.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection master] # # TC1. Execute Begin_load_query and Execute_load with and without the # necessary privileges # ------------------------------------------------------------------- SET @@SESSION.sql_log_bin = OFF; CREATE TABLE t1 (word CHAR(20) NOT NULL); SET @@SESSION.sql_log_bin = ON; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1; include/save_master_pos.inc [connection slave] CALL mtr.add_suppression("The PRIVILEGE_CHECKS_USER for channel '' would need FILE"); CALL mtr.add_suppression(".*The slave coordinator and worker threads are stopped.*"); CREATE TABLE t1(word CHAR(20) NOT NULL); START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/wait_for_slave_sql_error.inc [errno=13497] GRANT FILE, INSERT ON *.* TO 'u1'@'localhost'; START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/sync_slave_sql.inc STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead REVOKE FILE, INSERT ON *.* FROM 'u1'@'localhost'; SET @@GLOBAL.DEBUG = "+d,skip_the_priv_check_in_begin_load"; CHANGE REPLICATION SOURCE TO SOURCE_USER='root', SOURCE_PORT=MASTER_PORT, SOURCE_HOST='127.0.0.1', PRIVILEGE_CHECKS_USER = 'u1'@'localhost', SOURCE_LOG_POS= MASTER_LOG_POS; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead SET DEBUG_SYNC= "now WAIT_FOR skipped_the_priv_check_in_begin_load"; include/wait_for_slave_sql_error.inc [errno=13497] SET @@GLOBAL.DEBUG = "-d,skip_the_priv_check_in_begin_load"; STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead GRANT FILE, INSERT ON *.* TO 'u1'@'localhost'; CHANGE REPLICATION SOURCE TO SOURCE_USER='root', SOURCE_PORT=MASTER_PORT, SOURCE_HOST='127.0.0.1', PRIVILEGE_CHECKS_USER = 'u1'@'localhost', SOURCE_LOG_POS= MASTER_LOG_POS; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/sync_slave_sql.inc DROP TABLE t1; STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead REVOKE FILE, INSERT ON *.* FROM 'u1'@'localhost'; [connection master] # # TC2. Execute Begin_load_query and Delete_file with and without the # necessary privileges # ------------------------------------------------------------------- SET @@SESSION.sql_log_bin = OFF; DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL, PRIMARY KEY (c1)) ENGINE = MyISAM; INSERT INTO t1 VALUES (1); SET @@SESSION.sql_log_bin = ON; master_log_pos 1196 LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/data01' INTO TABLE t1; ERROR 23000: Duplicate entry '1' for key 't1.PRIMARY' [connection slave] CREATE TABLE t1 (c1 INT NOT NULL, PRIMARY KEY (c1)) ENGINE = MyISAM; START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/wait_for_slave_sql_error.inc [errno=13497] GRANT FILE ON *.* TO 'u1'@'localhost'; START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/sync_slave_sql.inc STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead REVOKE FILE ON *.* FROM 'u1'@'localhost'; SET @@GLOBAL.DEBUG = "+d,skip_the_priv_check_in_begin_load"; CHANGE REPLICATION SOURCE TO SOURCE_USER='root', SOURCE_PORT=MASTER_PORT, SOURCE_HOST='127.0.0.1', PRIVILEGE_CHECKS_USER = 'u1'@'localhost', SOURCE_LOG_POS= MASTER_LOG_POS; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead SET DEBUG_SYNC = "now WAIT_FOR skipped_the_priv_check_in_begin_load"; include/wait_for_slave_sql_error.inc [errno=13497] SET @@GLOBAL.DEBUG = "-d,skip_the_priv_check_in_begin_load"; STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead GRANT FILE ON *.* TO 'u1'@'localhost'; CHANGE REPLICATION SOURCE TO SOURCE_USER='root', SOURCE_PORT=MASTER_PORT, SOURCE_HOST='127.0.0.1', PRIVILEGE_CHECKS_USER = 'u1'@'localhost', SOURCE_LOG_POS= MASTER_LOG_POS; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/sync_slave_sql.inc DROP TABLE t1; STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead DROP TABLE t1; include/rpl_end.inc