polardbxengine/mysql-test/suite/rpl/r/rpl_row_jsondiff_binarydiff...

32 lines
1.5 KiB
Plaintext

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]
SET @@SESSION.BINLOG_ROW_IMAGE = 'MINIMAL';
SET @@SESSION.BINLOG_ROW_VALUE_OPTIONS = 'PARTIAL_JSON';
CREATE TABLE t1(i INT, j1 JSON, o INT, j2 JSON);
INSERT INTO t1 VALUES(1, '["Apple", "abcdefghijklmnopqghijklmnopqr"]', 2, '["Orange", "abcdefghijklmnopqghijklmnopqr"]');
include/sync_slave_sql_with_master.inc
SET @@SESSION.BINLOG_ROW_IMAGE = 'MINIMAL';
# Adding debug point 'rpl_row_jsondiff_binarydiff' to @@GLOBAL.debug
include/stop_slave_sql.inc
[connection master]
include/diff_tables.inc [master:t1, slave:t1]
UPDATE t1 SET j1 = JSON_REPLACE(j1, '$[0]', 'Mango');
[connection slave]
include/start_slave_sql.inc
SET debug_sync= 'now WAIT_FOR signal.rpl_row_jsondiff_binarydiff_created';
ALTER TABLE t1 ADD u JSON;
include/stop_slave_sql.inc
[connection master]
UPDATE t1 SET j1 = JSON_REPLACE(j1, '$[0]', 'Fish');
[connection slave]
include/start_slave_sql.inc
SET debug_sync= 'now WAIT_FOR signal.rpl_row_jsondiff_binarydiff_marked_columns';
[connection master]
DROP TABLE t1;
include/sync_slave_sql_with_master.inc
# Removing debug point 'rpl_row_jsondiff_binarydiff' from @@GLOBAL.debug
include/rpl_end.inc