| 1 |
# |
| 2 |
# 1. Create source-replica topology |
| 3 |
include/master-slave.inc |
| 4 |
Warnings: |
| 5 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 6 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 7 |
[connection master] |
| 8 |
# |
| 9 |
# 2. Configure source with time_zone value to 'UTC' |
| 10 |
SET @save.time_zone= @@time_zone; |
| 11 |
SET time_zone='UTC'; |
| 12 |
# |
| 13 |
# 3. Configure replica without time_zone table |
| 14 |
[connection slave] |
| 15 |
RENAME TABLE mysql.time_zone TO mysql.time_zone_bkup; |
| 16 |
[connection master] |
| 17 |
# |
| 18 |
# 4. Execute a transaction which doesn't use time_zone |
| 19 |
CREATE DATABASE IF NOT EXISTS db1; |
| 20 |
# |
| 21 |
# 5. Execute a transaction which does use time_zone |
| 22 |
CREATE USER u1 IDENTIFIED BY 'Root@123'; |
| 23 |
# |
| 24 |
# 6. Start replica |
| 25 |
[connection slave] |
| 26 |
call mtr.add_suppression("Replica SQL for channel '': ... The replica coordinator and worker threads are stopped.*"); |
| 27 |
call mtr.add_suppression("Replica SQL for channel '':.*failed executing transaction.*"); |
| 28 |
call mtr.add_suppression("Replica SQL for channel '': Error 'Table 'mysql.time_zone' doesn't exist' on query.*"); |
| 29 |
call mtr.add_suppression("Replica: Unknown or incorrect time zone: 'UTC'.*"); |
| 30 |
include/start_slave_io.inc |
| 31 |
include/wait_for_slave_io_to_start.inc |
| 32 |
START REPLICA SQL_THREAD; |
| 33 |
# |
| 34 |
# 7. Verify that replica sql thread failed with error |
| 35 |
include/wait_for_slave_sql_error.inc [errno=1146] |
| 36 |
# |
| 37 |
# 8. Cleanup |
| 38 |
include/stop_slave_io.inc |
| 39 |
RESET REPLICA ALL; |
| 40 |
CHANGE REPLICATION SOURCE TO SOURCE_USER= 'root', SOURCE_HOST= "127.0.0.1", SOURCE_PORT= MASTER_MYPORT;; |
| 41 |
Warnings: |
| 42 |
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 43 |
Note 1760 Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 44 |
RENAME TABLE mysql.time_zone_bkup TO mysql.time_zone; |
| 45 |
include/start_slave.inc |
| 46 |
[connection master] |
| 47 |
DROP USER u1; |
| 48 |
DROP DATABASE db1; |
| 49 |
set time_zone= @save.time_zone; |
| 50 |
include/rpl_end.inc |