File: rpl_row_img_eng_full_nodup.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (67 lines) | stat: -rw-r--r-- 2,415 bytes parent folder | download | duplicates (2)
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
63
64
65
66
67
#Want to skip this test from daily Valgrind execution
--source include/no_valgrind_without_big.inc
#
# This file contains tests for FULL_NODUP row image mode
#

--let $rpl_topology= 1->2->3
--source include/rpl_init.inc
-- source include/have_binlog_format_row.inc

-- connection server_1
-- source include/have_innodb.inc
-- connection server_2
-- source include/have_innodb.inc
-- connection server_3
-- source include/have_innodb.inc
-- connection server_1

#  Tests for different storage engines on each server,
#  but same index structure on tables. The tests are conducted
#  using FULL_NODUP binlog-row-image on all servers.
#

-- let $row_img_set=server_1:FULL_NODUP:N,server_2:FULL_NODUP:Y,server_3:FULL_NODUP:Y
-- source include/rpl_row_img_set.inc

-- let $row_img_test_script= include/rpl_row_img.test
-- source include/rpl_row_img_general_loop.inc

################################################################################
# MDEV-33049 Assertion `marked_for_write_or_computed()' failed in bool
#            Field_new_decimal::store_value(const my_decimal*, int*)
#
# In FULL_NODUP mode, the before image has all fields and the after image has
# only updated fields. Crash happened when slave was unpacking a row event
# if the new decimal field is null in the before image.
################################################################################
CREATE TABLE t1(c1 INT NOT NULL PRIMARY KEY, c2 varchar(10) DEFAULT NULL,
                c3 decimal(12,4) DEFAULT NULL);
INSERT INTO t1(c1) VALUES (1);
--source include/save_master_pos.inc
--let $datadir= `SELECT @@datadir`

# It will generate a row event that c3 is only in before image and it is null.
UPDATE t1 SET c2 = 'c2';

# the UPDATE will crash the slave without this fix.
--source include/rpl_sync.inc

FLUSH BINARY LOGS;
UPDATE t1 SET c2 = "c2_new";

--echo # Use 'BINLOG' statement to apply the first update row event
--echo # BINLOG statement is same to slave applier, it should work well.
--exec $MYSQL_BINLOG --start-position=$_master_pos $datadir$_master_file > $MYSQLTEST_VARDIR/tmp/binlog.sql
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/binlog.sql

--echo # After 'BINLOG' statement c2's value should be "c2"
SELECT * FROM t1;

--remove_file $MYSQLTEST_VARDIR/tmp/binlog.sql
DROP TABLE t1;

-- let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
-- source include/rpl_row_img_set.inc

--source include/rpl_end.inc