Debian Codegraph @

mysql-test/suite/rpl/t/rpl_row_json_null_for_not_null.test

raw
1 #
2 # Tests for the JSON data type under row-based replication.
3 #
4
5 --source include/have_binlog_format_row.inc
6 --source include/master-slave.inc
7 # mysqlbinlog.inc with $only_decoded_rows needs have_grep.inc
8 --source include/have_grep.inc
9
10 --echo #
11 --echo # Bug#26787468: REPLICATION DOES NOT HANDLE NULL INSERTED
12 --echo # IN JSON NOT NULL COLUMN CORRECTLY
13 --echo #
14 CREATE TABLE t (i INT, j JSON NOT NULL);
15 SET SESSION binlog_row_value_options = 'PARTIAL_JSON';
16 --source include/save_binlog_position.inc
17 INSERT IGNORE INTO t VALUES (1, NULL); # succeeds with a warning
18 SELECT * FROM t;
19 --echo # mysqlbinlog used to show 'Invalid JSON' for the second column.
20 --let $mysqlbinlog_only_decoded_rows=1
21 --source include/mysqlbinlog.inc
22 --source include/sync_slave_sql_with_master.inc
23 SELECT * FROM t;
24 --connection master
25 DROP TABLE t;
26
27 --source include/rpl_end.inc