Skip to content

Commit 6cd8399

Browse files
committed
Backport of fix for Bug#26484241 FAILURE OF NDB_BINLOG_LOG_READS TEST ON WINDOWS
Plus a little extra to ensure LIKE match on Windows
1 parent d55689e commit 6cd8399

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

mysql-test/suite/ndb_binlog/t/ndb_binlog_log_reads.test

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ create table raw_binlog_rows (txt varchar(1000));
9898
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
9999

100100
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a WRITE_ROW since ndb-log-update-as-write=1"
101-
select "mysqld1:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
101+
select "mysqld1:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
102102
drop table raw_binlog_rows;
103103
--enable_query_log
104104

@@ -125,7 +125,7 @@ create table raw_binlog_rows (txt varchar(1000));
125125
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
126126

127127
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a WRITE_ROW since ndb-log-update-as-write=1"
128-
select "mysqld2:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
128+
select "mysqld2:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
129129

130130
drop table raw_binlog_rows;
131131
--enable_query_log
@@ -153,7 +153,7 @@ create table raw_binlog_rows (txt varchar(1000));
153153
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
154154

155155
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a UPDATE_ROW since ndb-log-update-as-write=0"
156-
select "mysqld3:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
156+
select "mysqld3:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
157157

158158
drop table raw_binlog_rows;
159159
--enable_query_log
@@ -181,7 +181,7 @@ create table raw_binlog_rows (txt varchar(1000));
181181
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
182182

183183
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a UPDATE_ROW since ndb-log-update-as-write=0"
184-
select "mysqld4:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
184+
select "mysqld4:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
185185

186186
drop table raw_binlog_rows;
187187
--enable_query_log
@@ -239,7 +239,7 @@ create table raw_binlog_rows (txt varchar(1000));
239239
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
240240

241241
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a WRITE_ROW since ndb-log-update-as-write=1"
242-
select "mysqld1:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
242+
select "mysqld1:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
243243
drop table raw_binlog_rows;
244244
--enable_query_log
245245

@@ -266,7 +266,7 @@ create table raw_binlog_rows (txt varchar(1000));
266266
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
267267

268268
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a WRITE_ROW since ndb-log-update-as-write=1"
269-
select "mysqld2:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
269+
select "mysqld2:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
270270

271271
drop table raw_binlog_rows;
272272
--enable_query_log
@@ -294,7 +294,7 @@ create table raw_binlog_rows (txt varchar(1000));
294294
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
295295

296296
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a UPDATE_ROW since ndb-log-update-as-write=0"
297-
select "mysqld3:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
297+
select "mysqld3:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
298298

299299
drop table raw_binlog_rows;
300300
--enable_query_log
@@ -322,7 +322,7 @@ create table raw_binlog_rows (txt varchar(1000));
322322
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
323323

324324
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a UPDATE_ROW since ndb-log-update-as-write=0"
325-
select "mysqld4:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
325+
select "mysqld4:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
326326

327327
drop table raw_binlog_rows;
328328
--enable_query_log
@@ -380,7 +380,7 @@ create table raw_binlog_rows (txt varchar(1000));
380380
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
381381

382382
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a WRITE_ROW since ndb-log-update-as-write=1"
383-
select "mysqld1:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
383+
select "mysqld1:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
384384
drop table raw_binlog_rows;
385385
--enable_query_log
386386

@@ -407,7 +407,7 @@ create table raw_binlog_rows (txt varchar(1000));
407407
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
408408

409409
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a WRITE_ROW since ndb-log-update-as-write=1"
410-
select "mysqld2:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
410+
select "mysqld2:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
411411

412412
drop table raw_binlog_rows;
413413
--enable_query_log
@@ -435,7 +435,7 @@ create table raw_binlog_rows (txt varchar(1000));
435435
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
436436

437437
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a UPDATE_ROW since ndb-log-update-as-write=0"
438-
select "mysqld3:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
438+
select "mysqld3:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
439439

440440
drop table raw_binlog_rows;
441441
--enable_query_log
@@ -463,7 +463,7 @@ create table raw_binlog_rows (txt varchar(1000));
463463
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
464464

465465
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a UPDATE_ROW since ndb-log-update-as-write=0"
466-
select "mysqld4:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
466+
select "mysqld4:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
467467

468468
drop table raw_binlog_rows;
469469
--enable_query_log
@@ -521,7 +521,7 @@ create table raw_binlog_rows (txt varchar(1000));
521521
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
522522

523523
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a WRITE_ROW since ndb-log-update-as-write=1"
524-
select "mysqld1:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
524+
select "mysqld1:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
525525
drop table raw_binlog_rows;
526526
--enable_query_log
527527

@@ -548,7 +548,7 @@ create table raw_binlog_rows (txt varchar(1000));
548548
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
549549

550550
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a WRITE_ROW since ndb-log-update-as-write=1"
551-
select "mysqld2:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
551+
select "mysqld2:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
552552

553553
drop table raw_binlog_rows;
554554
--enable_query_log
@@ -576,7 +576,7 @@ create table raw_binlog_rows (txt varchar(1000));
576576
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
577577

578578
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a UPDATE_ROW since ndb-log-update-as-write=0"
579-
select "mysqld3:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
579+
select "mysqld3:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
580580

581581
drop table raw_binlog_rows;
582582
--enable_query_log
@@ -604,7 +604,7 @@ create table raw_binlog_rows (txt varchar(1000));
604604
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
605605

606606
--echo "Check that the binlog contains the AnyValue bit set in extra row data for a UPDATE_ROW since ndb-log-update-as-write=0"
607-
select "mysqld4:",txt from raw_binlog_rows where txt like "### % `test`.`t1`" or txt like "### Extra row data %";
607+
select "mysqld4:",replace(txt, '\r', '') as txt from raw_binlog_rows where replace(txt, '\r', '') like "### % `test`.`t1`" or txt like "### Extra row data %";
608608

609609
drop table raw_binlog_rows;
610610
--enable_query_log

0 commit comments

Comments
 (0)