summaryrefslogtreecommitdiff
path: root/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
diff options
context:
space:
mode:
authorSachin <sachin.setiya@mariadb.com>2019-09-14 12:53:36 +0530
committerSachin Setiya <sachin.setiya@mariadb.com>2019-10-08 13:34:11 +0530
commit01bf9f8c3da905e0920a9b1f7cc5a0e0ee6eef2f (patch)
tree9cb0d9a608f0e213dc3c371cc5439170d4bf9935 /mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
parent5b2fa078e8aee75a180461963bd54ce885445c17 (diff)
downloadmariadb-git-01bf9f8c3da905e0920a9b1f7cc5a0e0ee6eef2f.tar.gz
MDEV-20591 Wrong Number of rows in mysqlbinlog output
calc_field_event_length should accurately calculate the size of BLOB type fields, Instead of returning just the bytes taken by length it should return length bytes + actual length.
Diffstat (limited to 'mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test')
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
index 3146330f0cd..add977bf07a 100644
--- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test
@@ -438,6 +438,18 @@ INSERT INTO t2 SET b=1;
UPDATE t1, t2 SET t1.a=10, t2.a=20;
DROP TABLE t1,t2;
+--echo #
+--echo # MDEV-20591 Wrong Number of rows in mysqlbinlog output.
+--echo #
+
+CREATE TABLE t1(c_char_utf8 CHAR(10) ,
+ c_varchar_utf8 char(10) ,
+ c_text_utf8 blob );
+
+INSERT into t1 values("B", "B", REPEAT("#", 2000));
+
+drop table t1;
+
flush logs;
let $MYSQLD_DATADIR= `select @@datadir`;
@@ -462,3 +474,4 @@ flush logs;
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--error 1
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000002 2>&1
+