Skip to content

Commit d72e199

Browse files
author
Shishir Jaiswal
committed
Bug#26199978 - WRONG ERROR MESSAGE FOR PARTIAL BACKUPS WITH
GTID_MODE = ON POST-PUSH FIX ============= There is a leak in mysqlpump (Bug#23102944) which can be seen after the tests were pushed in patch to this bug. This known issue will be worked upon later. Meanwhile to make the "LeakSanitizer" silent till this leak is fixed, we're moving the pushed tests from "main.mysqlpump_extended.test" to a new file "mysqlpump_partial_bkp.test" and making its entry in "mysql-test/collections/disabled-asan.list" (applicable only in 8.0 and trunk). We've also included "not_valgrind.inc" in the header of this new test file for the same reason.
1 parent 43eadd3 commit d72e199

File tree

4 files changed

+61
-60
lines changed

4 files changed

+61
-60
lines changed

mysql-test/r/mysqlpump_extended.result

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -368,23 +368,3 @@ INSERT INTO t1 VALUES (x) utf8mb4 utf8mb4_general_ci latin1_swedish_ci
368368
DROP DATABASE db1_extended;
369369
DROP USER u1@localhost;
370370
# test for compress-output
371-
#
372-
# Bug#26199978 - WRONG ERROR MESSAGE FOR PARTIAL BACKUPS WITH GTID_MODE = ON
373-
#
374-
# Test 1: Taking backup when --set-gtid-purged is passed as ON
375-
CREATE DATABASE bug26199978;
376-
DROP DATABASE bug26199978;
377-
# Backup file should contain "SET @@GLOBAL.GTID_PURGED=.* ''"
378-
Pattern "SET @@GLOBAL.GTID_PURGED=.* ''" found
379-
# Test 2: Taking backup when --set-gtid-purged is pased as OFF
380-
CREATE DATABASE bug26199978;
381-
DROP DATABASE bug26199978;
382-
# Backup file should NOT contain "SET @@GLOBAL.GTID_PURGED=.* ''"
383-
Matching lines are:
384-
None
385-
Occurrences of 'SET @@GLOBAL.GTID_PURGED=.* ''' in the input file: 0
386-
# Test 3: Taking backup when --set-gtid-purged is passed as AUTO. Should error out
387-
# asking to pass --set-gtid-purged=[ON|OFF]
388-
CREATE DATABASE bug26199978;
389-
DROP DATABASE bug26199978;
390-
# Cleanup
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Bug#26199978 - WRONG ERROR MESSAGE FOR PARTIAL BACKUPS WITH GTID_MODE = ON
3+
#
4+
# Test 1: Taking backup when --set-gtid-purged is passed as ON
5+
CREATE DATABASE bug26199978;
6+
DROP DATABASE bug26199978;
7+
# Backup file should contain "SET @@GLOBAL.GTID_PURGED=.* '.*'"
8+
Pattern "SET @@GLOBAL.GTID_PURGED=.* '.*'" found
9+
# Test 2: Taking backup when --set-gtid-purged is pased as OFF
10+
CREATE DATABASE bug26199978;
11+
DROP DATABASE bug26199978;
12+
# Backup file should NOT contain "SET @@GLOBAL.GTID_PURGED=.* '.*'"
13+
Matching lines are:
14+
None
15+
Occurrences of 'SET @@GLOBAL.GTID_PURGED=.* '.*'' in the input file: 0
16+
# Test 3: Taking backup when --set-gtid-purged is passed as AUTO. Should error out
17+
# asking to pass --set-gtid-purged=[ON|OFF]
18+
CREATE DATABASE bug26199978;
19+
DROP DATABASE bug26199978;
20+
# Cleanup

mysql-test/t/mysqlpump_extended.test

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -427,43 +427,3 @@ DROP USER u1@localhost;
427427
#cleanup
428428
--remove_file $MYSQLTEST_VARDIR/tmp/db1_extended.zlib
429429
--remove_file $MYSQLTEST_VARDIR/tmp/db1_extended.lz4
430-
431-
-- echo #
432-
-- echo # Bug#26199978 - WRONG ERROR MESSAGE FOR PARTIAL BACKUPS WITH GTID_MODE = ON
433-
-- echo #
434-
435-
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
436-
--shutdown_server 10
437-
--source include/wait_until_disconnected.inc
438-
--enable_reconnect
439-
--exec echo "restart: --enforce-gtid-consistency=ON --gtid-mode=ON" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
440-
--source include/wait_until_connected_again.inc
441-
442-
let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/bug26199978_gtid-purged_ON.sql;
443-
let SEARCH_PATTERN=SET @@GLOBAL.GTID_PURGED=.* '';
444-
let GREP_FILE=$MYSQLTEST_VARDIR/tmp/bug26199978_gtid-purged_OFF.sql;
445-
let GREP_PATTERN=$SEARCH_PATTERN;
446-
447-
--echo # Test 1: Taking backup when --set-gtid-purged is passed as ON
448-
CREATE DATABASE bug26199978;
449-
--exec $MYSQL_PUMP --databases bug26199978 --set-gtid-purged=ON > $SEARCH_FILE
450-
DROP DATABASE bug26199978;
451-
--echo # Backup file should contain "$SEARCH_PATTERN"
452-
--source include/search_pattern.inc
453-
454-
--echo # Test 2: Taking backup when --set-gtid-purged is pased as OFF
455-
CREATE DATABASE bug26199978;
456-
--exec $MYSQL_PUMP --databases bug26199978 --set-gtid-purged=OFF > $GREP_FILE
457-
DROP DATABASE bug26199978;
458-
--echo # Backup file should NOT contain "$GREP_PATTERN"
459-
--source include/grep_pattern.inc
460-
461-
--echo # Test 3: Taking backup when --set-gtid-purged is passed as AUTO. Should error out
462-
--echo # asking to pass --set-gtid-purged=[ON|OFF]
463-
CREATE DATABASE bug26199978;
464-
--error 1
465-
--exec $MYSQL_PUMP --databases bug26199978 --set-gtid-purged=AUTO > $MYSQLTEST_VARDIR/tmp/bug26199978_auto.sql
466-
DROP DATABASE bug26199978;
467-
468-
--echo # Cleanup
469-
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp bug26199978_*.sql
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--source include/not_valgrind.inc
2+
3+
--echo #
4+
--echo # Bug#26199978 - WRONG ERROR MESSAGE FOR PARTIAL BACKUPS WITH GTID_MODE = ON
5+
--echo #
6+
7+
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
8+
--shutdown_server 10
9+
--source include/wait_until_disconnected.inc
10+
--enable_reconnect
11+
--exec echo "restart: --enforce-gtid-consistency=ON --gtid-mode=ON" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
12+
--source include/wait_until_connected_again.inc
13+
14+
let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/bug26199978_gtid-purged_ON.sql;
15+
let SEARCH_PATTERN=SET @@GLOBAL.GTID_PURGED=.* '.*';
16+
let GREP_FILE=$MYSQLTEST_VARDIR/tmp/bug26199978_gtid-purged_OFF.sql;
17+
let GREP_PATTERN=$SEARCH_PATTERN;
18+
19+
--echo # Test 1: Taking backup when --set-gtid-purged is passed as ON
20+
CREATE DATABASE bug26199978;
21+
--exec $MYSQL_PUMP --databases bug26199978 --set-gtid-purged=ON > $SEARCH_FILE
22+
DROP DATABASE bug26199978;
23+
--echo # Backup file should contain "$SEARCH_PATTERN"
24+
--source include/search_pattern.inc
25+
26+
--echo # Test 2: Taking backup when --set-gtid-purged is pased as OFF
27+
CREATE DATABASE bug26199978;
28+
--exec $MYSQL_PUMP --databases bug26199978 --set-gtid-purged=OFF > $GREP_FILE
29+
DROP DATABASE bug26199978;
30+
--echo # Backup file should NOT contain "$GREP_PATTERN"
31+
--source include/grep_pattern.inc
32+
33+
--echo # Test 3: Taking backup when --set-gtid-purged is passed as AUTO. Should error out
34+
--echo # asking to pass --set-gtid-purged=[ON|OFF]
35+
CREATE DATABASE bug26199978;
36+
--error 1
37+
--exec $MYSQL_PUMP --databases bug26199978 --set-gtid-purged=AUTO > $MYSQLTEST_VARDIR/tmp/bug26199978_auto.sql
38+
DROP DATABASE bug26199978;
39+
40+
--echo # Cleanup
41+
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp bug26199978_*.sql

0 commit comments

Comments
 (0)