diff --git a/debian/mariadb-test-data.lintian-overrides b/debian/mariadb-test-data.lintian-overrides index cbd77e0283090..025ff5f6cafd4 100644 --- a/debian/mariadb-test-data.lintian-overrides +++ b/debian/mariadb-test-data.lintian-overrides @@ -410,12 +410,16 @@ package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/mariadb-conv/file01.utf16.txt] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/mariadb-conv/file01.utf8.txt] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/mariadb-conv/file02.latin1.txt] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/master-10.0.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/master-12.3.2.info] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/mysql5613mysql/README] -package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/new-format-relay-log-win.info] -package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/new-format-relay-log.info] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/numbers.txt] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/old-format-relay-log-win.info] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/old-format-relay-log.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/relay-log-10.0-win.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/relay-log-10.0.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/relay-log-12.3.2-win.info] +package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/relay-log-12.3.2.info] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/unicode/allkeys1400.txt] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/unicode/allkeys400.txt] package-contains-documentation-outside-usr-share-doc [usr/share/mysql/mysql-test/std_data/unicode/allkeys520.txt] diff --git a/mysql-test/main/rpl_read_info.result b/mysql-test/main/rpl_read_info.result new file mode 100644 index 0000000000000..9a3c969ec743b --- /dev/null +++ b/mysql-test/main/rpl_read_info.result @@ -0,0 +1,14 @@ +CHANGE MASTER TO master_host='127.0.0.1'; +# restart: --skip-slave-start +Master_Log_File = 'mysqld-bin.000002' +Read_Master_Log_Pos = '2147483648' +Master_SSL_Key = '' +Using_Gtid = 'Current_Pos' +Relay_Master_Log_File = 'mysqld-bin.000001' +Exec_Master_Log_Pos = '2147483648' +SQL_Delay = '5' +# restart: --skip-slave-start +Master_Log_File = 'mysqld-bin.000003' +Using_Gtid = 'No' +SQL_Delay = '10' +RESET SLAVE ALL; diff --git a/mysql-test/main/rpl_read_info.test b/mysql-test/main/rpl_read_info.test new file mode 100644 index 0000000000000..a6fabf4aca971 --- /dev/null +++ b/mysql-test/main/rpl_read_info.test @@ -0,0 +1,64 @@ +# Verify that the post-WL#344 format of `*.info` can be parsed. +# * Verify that the line count includes the line-count line in +# `@@master_info_file` while excludes it in `@@relay_log_info_file` +# (Reference: MDEV-39788 master.info is read and +# written one line too many compared to before) +# * Verify that position values > 2^31 can be read +# (MDEV-38020: Master & relay log info files read 2^31 and above incorrectly) + +--source include/not_embedded.inc +CHANGE MASTER TO master_host='127.0.0.1'; # have_info_files + +--let $MYSQLD_DATADIR= `SELECT @@datadir` + +# the new version of relay_log.info comes in two versions: with path +# separator '/' (most systems) and with path separator '\' (windows) +if ($SYSTEM_PATH_SEPARATOR != /) { + --let $file_suffix= -win +} + + +# Format established in 10.0 + +--source include/shutdown_mysqld.inc + + --remove_file $MYSQLD_DATADIR/master.info + # `Using_Gtid` is the `key=value` section, not the 33rd option. + --copy_file $MYSQL_TEST_DIR/std_data/master-10.0.info $MYSQLD_DATADIR/master.info + + # Check that the 5th option (`SQL_Delay`) is included. + --remove_file $MYSQLD_DATADIR/relay-log.info + --copy_file $MYSQL_TEST_DIR/std_data/relay-log-10.0$file_suffix.info $MYSQLD_DATADIR/relay-log.info + +--let $restart_parameters= --skip-slave-start +--source include/start_mysqld.inc + +--let $status_items= Master_Log_File, Read_Master_Log_Pos, Master_SSL_Key, Using_Gtid, Relay_Master_Log_File, Exec_Master_Log_Pos, SQL_Delay +--source include/show_slave_status.inc + + + +# Compatibility test with erroneous files from 12.3.0-12.3.2 +# (from MDEV-37530, fixed in MDEV-39788) + +--source include/shutdown_mysqld.inc + + --remove_file $MYSQLD_DATADIR/master.info + # `relay-log.info`-style `master.info`, where line 34 is a blank line, + # and the `key=value` section starts on line 35. + --copy_file $MYSQL_TEST_DIR/std_data/master-12.3.2.info $MYSQLD_DATADIR/master.info + + # Extra ignored blank line in the file + --remove_file $MYSQLD_DATADIR/relay-log.info + --copy_file $MYSQL_TEST_DIR/std_data/relay-log-12.3.2$file_suffix.info $MYSQLD_DATADIR/relay-log.info + +--source include/start_mysqld.inc + +--let $status_items= Master_Log_File, Using_Gtid, SQL_Delay +--source include/show_slave_status.inc + + +# Reset +--disable_warnings + RESET SLAVE ALL; +--enable_warnings diff --git a/mysql-test/std_data/master-10.0.info b/mysql-test/std_data/master-10.0.info new file mode 100644 index 0000000000000..5048b1ed1dc39 --- /dev/null +++ b/mysql-test/std_data/master-10.0.info @@ -0,0 +1,34 @@ +33 +mysqld-bin.000002 +2147483648 +127.0.0.1 +root + +3306 +60 +1 + + + + + +1 +60.000 + +0 + +100000 + + + + + + + + + + + + + +using_gtid=1 diff --git a/mysql-test/std_data/master-12.3.2.info b/mysql-test/std_data/master-12.3.2.info new file mode 100644 index 0000000000000..41f4a4ab642d7 --- /dev/null +++ b/mysql-test/std_data/master-12.3.2.info @@ -0,0 +1,50 @@ +33 +mysqld-bin.000003 +2147483648 +127.0.0.1 +root + +3306 +60 +1 + + + + + +1 +60.000 + +0 + +100000 + + + + + + + + + + + + + + +do_domain_ids=0 +connect_retry +ssl +ignore_domain_ids=0 +ssl_ca +ssl_cipher +ssl_verify_server_cert +ssl_capath +ssl_cert +ssl_key +retry_count +ssl_crlpath +ssl_crl +heartbeat_period +using_gtid=0 +END_MARKER diff --git a/mysql-test/std_data/new-format-relay-log-win.info b/mysql-test/std_data/new-format-relay-log-win.info deleted file mode 100644 index e00383b556512..0000000000000 --- a/mysql-test/std_data/new-format-relay-log-win.info +++ /dev/null @@ -1,6 +0,0 @@ -5 -.\slave-relay-bin.000001 -4 - -0 -0 diff --git a/mysql-test/std_data/new-format-relay-log.info b/mysql-test/std_data/new-format-relay-log.info deleted file mode 100644 index 883dec1f66b6b..0000000000000 --- a/mysql-test/std_data/new-format-relay-log.info +++ /dev/null @@ -1,6 +0,0 @@ -5 -./slave-relay-bin.000001 -4 - -0 -0 diff --git a/mysql-test/std_data/relay-log-10.0-win.info b/mysql-test/std_data/relay-log-10.0-win.info new file mode 100644 index 0000000000000..2c1b588422b20 --- /dev/null +++ b/mysql-test/std_data/relay-log-10.0-win.info @@ -0,0 +1,6 @@ +5 +.\mysqld-relay-bin.000001 +4 +mysqld-bin.000001 +2147483648 +5 diff --git a/mysql-test/std_data/relay-log-10.0.info b/mysql-test/std_data/relay-log-10.0.info new file mode 100644 index 0000000000000..a6ade93dce9a9 --- /dev/null +++ b/mysql-test/std_data/relay-log-10.0.info @@ -0,0 +1,6 @@ +5 +./mysqld-relay-bin.000001 +4 +mysqld-bin.000001 +2147483648 +5 diff --git a/mysql-test/std_data/relay-log-12.3.2-win.info b/mysql-test/std_data/relay-log-12.3.2-win.info new file mode 100644 index 0000000000000..bf166712958d5 --- /dev/null +++ b/mysql-test/std_data/relay-log-12.3.2-win.info @@ -0,0 +1,7 @@ +6 +.\mysqld-relay-bin.000001 +4 +mysqld-bin.000001 +2147483648 +10 + diff --git a/mysql-test/std_data/relay-log-12.3.2.info b/mysql-test/std_data/relay-log-12.3.2.info new file mode 100644 index 0000000000000..818c6b36aa76b --- /dev/null +++ b/mysql-test/std_data/relay-log-12.3.2.info @@ -0,0 +1,7 @@ +6 +./mysqld-relay-bin.000001 +4 +mysqld-bin.000001 +2147483648 +10 + diff --git a/mysql-test/suite/rpl/r/rpl_read_new_relay_log_info.result b/mysql-test/suite/rpl/r/rpl_read_new_relay_log_info.result deleted file mode 100644 index e193a7e1126c2..0000000000000 --- a/mysql-test/suite/rpl/r/rpl_read_new_relay_log_info.result +++ /dev/null @@ -1,15 +0,0 @@ -include/master-slave.inc -[connection master] -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1); -DROP TABLE t1; -connection slave; -==== Check that we can understand the new format of relay-log.info ==== -include/stop_slave.inc -include/reset_slave.inc -# Read relay-log.info -START SLAVE IO_THREAD; -include/wait_for_slave_io_to_start.inc -# Check that relay log coordinates are equal to those saved in new-format_relay-log.info -= , 0, slave-relay-bin.000001, 4 -include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_read_new_relay_log_info.test b/mysql-test/suite/rpl/t/rpl_read_new_relay_log_info.test deleted file mode 100644 index 350071bf3dc7a..0000000000000 --- a/mysql-test/suite/rpl/t/rpl_read_new_relay_log_info.test +++ /dev/null @@ -1,48 +0,0 @@ -# ==== Purpose ==== -# -# - Verify that the post-WL#344 format of relay_log.info can be parsed. - ---source include/master-slave.inc - -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1); -DROP TABLE t1; ---sync_slave_with_master - ---echo ==== Check that we can understand the new format of relay-log.info ==== ---source include/stop_slave.inc - ---let $master_use_gtid_option= No ---source include/reset_slave.inc ---let $MYSQLD_DATADIR= `select @@datadir` - -# the new version of relay_log.info comes in two versions: with path -# separator '/' (most systems) and with path separator '\' (windows) -if ($SYSTEM_PATH_SEPARATOR != /) { - --let $file_suffix= -win -} - -# MDEV-19801 changed the default Using_Gtid to Slave_Pos which doesn't -# automatically purge relay-log.info ---remove_file $MYSQLD_DATADIR/relay-log.info ---copy_file $MYSQL_TEST_DIR/std_data/new-format-relay-log$file_suffix.info $MYSQLD_DATADIR/relay-log.info - ---echo # Read relay-log.info -START SLAVE IO_THREAD; ---source include/wait_for_slave_io_to_start.inc ---echo # Check that relay log coordinates are equal to those saved in new-format_relay-log.info ---let $master_file= query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1) ---let $master_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1) ---let $relay_log_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1) ---let $relay_log_pos= query_get_value(SHOW SLAVE STATUS, Relay_Log_Pos, 1) ---echo $master_file= $master_file, $master_pos, $relay_log_file, $relay_log_pos -if (`SELECT "$master_file" != "" OR - "$master_pos" != "0" OR - "$relay_log_file" != "slave-relay-bin.000001" OR - "$relay_log_pos" != "4"`) { - --echo ERROR: log coordinates changed - --die log coordinates changed -} - ---let $rpl_only_running_threads= 1 ---source include/rpl_end.inc