41 changed files with 1402 additions and 592 deletions
-
84extra/mariabackup/backup_copy.cc
-
7extra/mariabackup/backup_copy.h
-
248extra/mariabackup/backup_mysql.cc
-
6extra/mariabackup/backup_mysql.h
-
10extra/mariabackup/common.h
-
80extra/mariabackup/xtrabackup.cc
-
2extra/mariabackup/xtrabackup.h
-
2mysql-test/main/subselect2.result
-
4mysql-test/main/subselect3.result
-
4mysql-test/main/subselect3_jcl6.result
-
40mysql-test/main/subselect4.result
-
43mysql-test/main/subselect4.test
-
4mysql-test/main/subselect_mat_cost_bugs.result
-
8mysql-test/main/win.result
-
10mysql-test/main/win.test
-
8mysql-test/suite/encryption/r/tempfiles_encrypted.result
-
7mysql-test/suite/galera/include/galera_wsrep_recover.inc
-
9mysql-test/suite/galera/r/galera_log_bin_ext.result
-
82mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result
-
4mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff
-
4mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff
-
11mysql-test/suite/galera/r/galera_wan_restart_sst.result
-
3mysql-test/suite/galera/t/galera_log_bin_ext.cnf
-
2mysql-test/suite/galera/t/galera_log_bin_ext.test
-
19mysql-test/suite/galera/t/galera_log_bin_ext_mariabackup.cnf
-
2mysql-test/suite/galera/t/galera_log_bin_ext_mariabackup.test
-
84mysql-test/suite/galera/t/galera_log_bin_sst.inc
-
1mysql-test/suite/galera/t/galera_sst_rsync.test
-
1mysql-test/suite/galera/t/galera_sst_rsync_logbasename.cnf
-
19mysql-test/suite/galera/t/galera_wan_restart_sst.test
-
2mysql-test/suite/innodb/r/innodb_force_recovery.result
-
2mysql-test/suite/innodb/t/innodb_force_recovery.test
-
321scripts/wsrep_sst_common.sh
-
263scripts/wsrep_sst_mariabackup.sh
-
7scripts/wsrep_sst_mysqldump.sh
-
475scripts/wsrep_sst_rsync.sh
-
9sql/item_subselect.cc
-
4sql/sql_select.cc
-
2storage/innobase/handler/ha_innodb.cc
-
29storage/innobase/handler/i_s.cc
-
72storage/innobase/os/os0file.cc
@ -0,0 +1,82 @@ |
|||
connection node_1; |
|||
connection node_2; |
|||
connection node_1; |
|||
reset master; |
|||
connection node_2; |
|||
reset master; |
|||
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; |
|||
INSERT INTO t1 VALUES (1); |
|||
CREATE TABLE t2 (id INT) ENGINE=InnoDB; |
|||
INSERT INTO t2 VALUES (1); |
|||
INSERT INTO t2 VALUES (1); |
|||
connection node_2; |
|||
SELECT COUNT(*) = 1 FROM t1; |
|||
COUNT(*) = 1 |
|||
1 |
|||
SELECT COUNT(*) = 2 FROM t2; |
|||
COUNT(*) = 2 |
|||
1 |
|||
connection node_1; |
|||
ALTER TABLE t1 ADD COLUMN f2 INTEGER; |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
hostname1-bin.000001 # Gtid # # GTID #-#-# |
|||
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB |
|||
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) |
|||
hostname1-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
hostname1-bin.000001 # Xid # # COMMIT /* XID */ |
|||
hostname1-bin.000001 # Gtid # # GTID #-#-# |
|||
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB |
|||
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1) |
|||
hostname1-bin.000001 # Table_map # # table_id: # (test.t2) |
|||
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
hostname1-bin.000001 # Xid # # COMMIT /* XID */ |
|||
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1) |
|||
hostname1-bin.000001 # Table_map # # table_id: # (test.t2) |
|||
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
hostname1-bin.000001 # Xid # # COMMIT /* XID */ |
|||
hostname1-bin.000001 # Gtid # # GTID #-#-# |
|||
hostname1-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER |
|||
connection node_2; |
|||
Shutting down server ... |
|||
connection node_1; |
|||
Cleaning var directory ... |
|||
connection node_2; |
|||
Starting server ... |
|||
connection node_2; |
|||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; |
|||
COUNT(*) = 2 |
|||
1 |
|||
include/show_binlog_events.inc |
|||
Log_name Pos Event_type Server_id End_log_pos Info |
|||
hostname1-bin.000001 # Gtid # # GTID #-#-# |
|||
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB |
|||
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1) |
|||
hostname1-bin.000001 # Table_map # # table_id: # (test.t1) |
|||
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
hostname1-bin.000001 # Xid # # COMMIT /* XID */ |
|||
hostname1-bin.000001 # Gtid # # GTID #-#-# |
|||
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB |
|||
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1) |
|||
hostname1-bin.000001 # Table_map # # table_id: # (test.t2) |
|||
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
hostname1-bin.000001 # Xid # # COMMIT /* XID */ |
|||
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-# |
|||
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1) |
|||
hostname1-bin.000001 # Table_map # # table_id: # (test.t2) |
|||
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
|||
hostname1-bin.000001 # Xid # # COMMIT /* XID */ |
|||
hostname1-bin.000001 # Gtid # # GTID #-#-# |
|||
hostname1-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER |
|||
hostname1-bin.000001 # Rotate # # hostname1-bin.000002;pos=4 |
|||
DROP TABLE t1; |
|||
DROP TABLE t2; |
|||
#cleanup |
|||
connection node_1; |
|||
RESET MASTER; |
|||
@ -1 +1 @@ |
|||
--source galera_log_bin.inc |
|||
--source galera_log_bin_sst.inc |
|||
@ -0,0 +1,19 @@ |
|||
!include ../galera_2nodes.cnf |
|||
|
|||
[mysqld] |
|||
wsrep_sst_method=mariabackup |
|||
wsrep_sst_auth="root:" |
|||
|
|||
[mysqld.1] |
|||
log-bin=@ENV.MYSQLTEST_VARDIR/mysqld.1/data/hostname1-bin |
|||
log-bin-index = hostname1.bdx |
|||
log-slave-updates |
|||
|
|||
[mysqld.2] |
|||
log-bin=@ENV.MYSQLTEST_VARDIR/mysqld.2/data/hostname2-bin |
|||
log-bin-index = hostname2.bdx |
|||
log-slave-updates |
|||
|
|||
[sst] |
|||
transferfmt=@ENV.MTR_GALERA_TFMT |
|||
sst_max_binlogs= |
|||
@ -0,0 +1,2 @@ |
|||
--source include/have_mariabackup.inc |
|||
--source galera_log_bin_sst.inc |
|||
@ -0,0 +1,84 @@ |
|||
--source include/galera_cluster.inc |
|||
--source include/force_restart.inc |
|||
|
|||
# Save original auto_increment_offset values. |
|||
--let $node_1=node_1 |
|||
--let $node_2=node_2 |
|||
--source include/auto_increment_offset_save.inc |
|||
|
|||
--connection node_1 |
|||
reset master; |
|||
--connection node_2 |
|||
reset master; |
|||
|
|||
# |
|||
# Test Galera with --log-bin --log-slave-updates . |
|||
# This way the actual MySQL binary log is used, |
|||
# rather than Galera's own implementation |
|||
# |
|||
|
|||
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; |
|||
INSERT INTO t1 VALUES (1); |
|||
|
|||
CREATE TABLE t2 (id INT) ENGINE=InnoDB; |
|||
INSERT INTO t2 VALUES (1); |
|||
INSERT INTO t2 VALUES (1); |
|||
|
|||
--connection node_2 |
|||
SELECT COUNT(*) = 1 FROM t1; |
|||
SELECT COUNT(*) = 2 FROM t2; |
|||
|
|||
--connection node_1 |
|||
ALTER TABLE t1 ADD COLUMN f2 INTEGER; |
|||
--let $MASTER_MYPORT=$NODE_MYPORT_1 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
--connection node_2 |
|||
|
|||
#--connection node_2 |
|||
#--source suite/galera/include/galera_stop_replication.inc |
|||
|
|||
--echo Shutting down server ... |
|||
--source include/shutdown_mysqld.inc |
|||
|
|||
--connection node_1 |
|||
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' |
|||
--source include/wait_condition.inc |
|||
|
|||
# |
|||
# Force SST |
|||
# |
|||
--echo Cleaning var directory ... |
|||
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat |
|||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mtr |
|||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/performance_schema |
|||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/test |
|||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mysql |
|||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data |
|||
|
|||
--connection node_2 |
|||
|
|||
--echo Starting server ... |
|||
let $restart_noprint=2; |
|||
--source include/start_mysqld.inc |
|||
|
|||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
|||
--source include/wait_condition.inc |
|||
|
|||
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; |
|||
--source include/wait_condition.inc |
|||
|
|||
--connection node_2 |
|||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; |
|||
--let $MASTER_MYPORT=$NODE_MYPORT_2 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
DROP TABLE t1; |
|||
DROP TABLE t2; |
|||
|
|||
--echo #cleanup |
|||
--connection node_1 |
|||
RESET MASTER; |
|||
|
|||
# Restore original auto_increment_offset values. |
|||
--source include/auto_increment_offset_restore.inc |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue