Debian Codegraph @

mysql-test/suite/json/t/json_table_binlog.test

raw
1 --source include/have_binlog_format_mixed.inc
2
3 --echo #
4 --echo # MDEV-25154: JSON_TABLE: Queries involving ordinality columns are unsafe for statement binlog and should be marked as such
5 --echo #
6
7 create table t1 (a int);
8
9 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
10 set binlog_format='statement';
11 insert into t1
12 select *
13 from json_table('[1,2,3]', '$[*]' columns (a for ordinality)) as T ;
14
15 set binlog_format='mixed';
16 let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
17 let $binlog_file= LAST;
18
19 insert into t1
20 select *
21 from json_table('[1,2,3]', '$[*]' columns (a for ordinality)) as T ;
22
23 --echo # This must show Annotate_rows, Write_rows_v1 events. Not the statement event
24 --source include/show_binlog_events.inc
25 drop table t1;