File: binlog_partial_json_warnings.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (62 lines) | stat: -rw-r--r-- 3,017 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# ==== Implementation ====
#
# This test checks if the correct warnings are issued when the following
# incompatible configurations regarding binlog_row_value_options=PARTIAL_JSON
# are attempted:
#  1) binlog_format=STATEMENT
#  2) binlog_row_image=FULL
#  3) log_bin_use_v1_row_events=1
#  4) the binlog is disabled
#
# ==== Related Worklog ====
#
# WL#2955 RBR replication of partial JSON updates
#

--source include/force_restart.inc

call mtr.add_suppression("When binlog_format=STATEMENT, the option binlog_row_value_options=PARTIAL_JSON");
call mtr.add_suppression("When binlog_row_image=FULL, the option binlog_row_value_options=PARTIAL_JSON");
call mtr.add_suppression("When binlog_row_value_options=PARTIAL_JSON, the option log_bin_use_v1_row_events=1");
call mtr.add_suppression("When the binary log is disabled, the option binlog_row_value_options=PARTIAL_JSON");
call mtr.add_suppression("You need to use --log-bin to make --binlog-format work.");

--echo # binlog-format=stmt is not compatible with partial json
--let $restart_parameters= "restart: --log-bin --binlog-format=statement --binlog-row-value-options=PARTIAL_JSON --binlog-row-image=MINIMAL"
--source include/restart_mysqld.inc

--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_count= 1
--let $assert_select= When binlog_format=STATEMENT, the option binlog_row_value_options=PARTIAL_JSON
--let $assert_text= There shall be a warning when binlog_format=STATEMENT
--source include/assert_grep.inc

SET @@GLOBAL.BINLOG_ROW_VALUE_OPTIONS= PARTIAL_JSON;

--echo # binlog-row-image=full causes partial json to be used only in after image
--let $restart_parameters= "restart: --log-bin --binlog-format=row --binlog-row-value-options=PARTIAL_JSON --binlog-row-image=FULL"
--source include/restart_mysqld.inc

--let $assert_select= When binlog_row_image=FULL, the option binlog_row_value_options=PARTIAL_JSON
--let $assert_text= There shall be a warning when binlog_row_image=FULL
--source include/assert_grep.inc

--echo # log-bin-use-v1-row-events is not compatible with partial json
--let $restart_parameters= "restart: --log-bin --log-bin-use-v1-row-events=TRUE --binlog-row-value-options=PARTIAL_JSON --binlog-row-image=MINIMAL"
--source include/restart_mysqld.inc

--let $assert_select= When binlog_row_value_options=PARTIAL_JSON, the option log_bin_use_v1_row_events=1
--let $assert_text= There shall be a warning when log_bin_use_v1_row_events=1
--source include/assert_grep.inc

SET @@GLOBAL.BINLOG_ROW_VALUE_OPTIONS= PARTIAL_JSON;

--echo # the binlog is disabled
--let $restart_parameters= "restart: --binlog-row-value-options=PARTIAL_JSON --binlog-row-image=MINIMAL --skip-log-bin --skip-log-replica-updates"
--source include/restart_mysqld.inc

--let $assert_select= When the binary log is disabled, the option binlog_row_value_options=PARTIAL_JSON
--let $assert_text= There shall be a warning when when the binary log is disabled
--source include/assert_grep.inc

SET @@GLOBAL.BINLOG_ROW_VALUE_OPTIONS= PARTIAL_JSON;