mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Merge branch '10.3' into 10.4
This commit is contained in:
commit
23ddc3518f
41 changed files with 2061 additions and 321 deletions
|
@ -8,7 +8,6 @@
|
|||
|
||||
source include/not_embedded.inc;
|
||||
|
||||
-- require include/have_log_bin.require
|
||||
disable_query_log;
|
||||
show variables like 'log_bin';
|
||||
enable_query_log;
|
||||
if (`select not @@log_bin`) {
|
||||
skip Test requires: 'have_log_bin';
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Variable_name Value
|
||||
log_bin ON
|
|
@ -16,3 +16,12 @@ COUNT(*)
|
|||
1
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL event_scheduler=off;
|
||||
#
|
||||
# MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
|
||||
#
|
||||
CREATE EVENT ev ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO BEGIN END;
|
||||
Warnings:
|
||||
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
|
||||
SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='test' AND EVENT_NAME='ev';
|
||||
EVENT_DEFINITION BEGIN END
|
||||
DROP EVENT ev;
|
||||
|
|
|
@ -2553,7 +2553,18 @@ idx
|
|||
1
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Start of 10.4 tests
|
||||
# MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
|
||||
#
|
||||
SET sql_mode=ORACLE;
|
||||
BEGIN END;
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW BEGIN END;
|
||||
SELECT ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='test' AND TRIGGER_NAME='tr';
|
||||
ACTION_STATEMENT BEGIN END
|
||||
DROP TRIGGER tr;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-19637 Crash on an SP variable assignment to a wrong subselect
|
||||
|
|
|
@ -25,5 +25,13 @@ let $wait_condition =
|
|||
SELECT COUNT(*) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
SET GLOBAL event_scheduler=off;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
|
||||
--echo #
|
||||
CREATE EVENT ev ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO BEGIN END;
|
||||
--vertical_results
|
||||
SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA='test' AND EVENT_NAME='ev';
|
||||
--horizontal_results
|
||||
DROP EVENT ev;
|
||||
|
|
|
@ -2392,9 +2392,23 @@ DROP PROCEDURE p1;
|
|||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.4 tests
|
||||
--echo # MDEV-28588 SIGSEGV in __memmove_avx_unaligned_erms, strmake_root
|
||||
--echo #
|
||||
|
||||
SET sql_mode=ORACLE;
|
||||
BEGIN END;
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW BEGIN END;
|
||||
--vertical_results
|
||||
SELECT ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA='test' AND TRIGGER_NAME='tr';
|
||||
--horizontal_results
|
||||
DROP TRIGGER tr;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19637 Crash on an SP variable assignment to a wrong subselect
|
||||
|
|
|
@ -1,33 +1,44 @@
|
|||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SET GLOBAL auto_increment_offset=1;
|
||||
connection node_2;
|
||||
SET GLOBAL auto_increment_offset=2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_forced_binlog_format='STATEMENT';
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
i int(11) NOT NULL primary key AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 1
|
||||
insert into t1(i) values(null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
3 dummy_text
|
||||
5 dummy_text
|
||||
7 dummy_text
|
||||
connection node_2;
|
||||
select * from t1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 2
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
3 dummy_text
|
||||
|
@ -45,27 +56,34 @@ SET GLOBAL wsrep_auto_increment_control='OFF';
|
|||
SET SESSION auto_increment_increment = 3;
|
||||
SET SESSION auto_increment_offset = 1;
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
i int(11) NOT NULL primary key AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 3
|
||||
auto_increment_offset 1
|
||||
insert into t1(i) values(null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
4 dummy_text
|
||||
7 dummy_text
|
||||
10 dummy_text
|
||||
connection node_2;
|
||||
select * from t1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 2
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
4 dummy_text
|
||||
|
@ -74,6 +92,7 @@ i c
|
|||
connection node_1;
|
||||
SET GLOBAL wsrep_auto_increment_control='ON';
|
||||
SET SESSION binlog_format='ROW';
|
||||
connection node_1;
|
||||
show variables like 'binlog_format';
|
||||
Variable_name Value
|
||||
binlog_format ROW
|
||||
|
@ -89,29 +108,37 @@ auto_increment_increment 3
|
|||
auto_increment_offset 1
|
||||
wsrep_auto_increment_control OFF
|
||||
SET GLOBAL wsrep_auto_increment_control='ON';
|
||||
connection node_1;
|
||||
drop table t1;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_forced_binlog_format='ROW';
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_forced_binlog_format='ROW';
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
i int(11) NOT NULL primary key AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 1
|
||||
insert into t1(i) values(null);
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
3 dummy_text
|
||||
5 dummy_text
|
||||
7 dummy_text
|
||||
connection node_2;
|
||||
select * from t1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 2
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
3 dummy_text
|
||||
|
@ -129,23 +156,30 @@ SET GLOBAL wsrep_auto_increment_control='OFF';
|
|||
SET SESSION auto_increment_increment = 3;
|
||||
SET SESSION auto_increment_offset = 1;
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
i int(11) NOT NULL primary key AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 3
|
||||
auto_increment_offset 1
|
||||
insert into t1(i) values(null);
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
4 dummy_text
|
||||
7 dummy_text
|
||||
10 dummy_text
|
||||
connection node_2;
|
||||
select * from t1;
|
||||
show variables like 'auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 2
|
||||
select * from t1 order by i;
|
||||
i c
|
||||
1 dummy_text
|
||||
4 dummy_text
|
||||
|
@ -159,13 +193,13 @@ binlog_format ROW
|
|||
show variables like '%auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 1
|
||||
auto_increment_offset 2
|
||||
wsrep_auto_increment_control ON
|
||||
SET GLOBAL wsrep_auto_increment_control='OFF';
|
||||
show variables like '%auto_increment%';
|
||||
Variable_name Value
|
||||
auto_increment_increment 3
|
||||
auto_increment_offset 1
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 2
|
||||
wsrep_auto_increment_control OFF
|
||||
SET GLOBAL wsrep_auto_increment_control='ON';
|
||||
drop table t1;
|
||||
|
|
190
mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff
Normal file
190
mysql-test/suite/galera/r/galera_ist_MDEV-28423,debug.rdiff
Normal file
|
@ -0,0 +1,190 @@
|
|||
--- r/galera_ist_MDEV-28423.result
|
||||
+++ r/galera_ist_MDEV-28423,debug.reject
|
||||
@@ -517,3 +517,187 @@
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
+Performing State Transfer on a server that has been killed and restarted
|
||||
+while a DDL was in progress on it
|
||||
+connection node_1;
|
||||
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
+connection node_2;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||
+connection node_1;
|
||||
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
+connection node_2;
|
||||
+SET wsrep_sync_wait = 0;
|
||||
+Killing server ...
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
|
||||
+COMMIT;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
|
||||
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
|
||||
+connection node_2;
|
||||
+Performing --wsrep-recover ...
|
||||
+connection node_2;
|
||||
+Starting server ...
|
||||
+Using --wsrep-start-position when starting mysqld ...
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
|
||||
+COMMIT;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1a_galera_st_kill_slave_ddl;
|
||||
+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
|
||||
+ROLLBACK;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
+COUNT(*) = 0
|
||||
+1
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
+COUNT(*) = 0
|
||||
+1
|
||||
+DROP TABLE t1;
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = $debug_orig;
|
519
mysql-test/suite/galera/r/galera_ist_MDEV-28423.result
Normal file
519
mysql-test/suite/galera/r/galera_ist_MDEV-28423.result
Normal file
|
@ -0,0 +1,519 @@
|
|||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
Performing State Transfer on a server that has been temporarily disconnected
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Unloading wsrep provider ...
|
||||
SET GLOBAL wsrep_cluster_address = '';
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Loading wsrep provider ...
|
||||
disconnect node_2;
|
||||
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_disconnect_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_shutdown_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
Performing State Transfer on a server that has been killed and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Performing --wsrep-recover ...
|
||||
Starting server ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_kill_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
190
mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff
Normal file
190
mysql-test/suite/galera/r/galera_ist_MDEV-28583,debug.rdiff
Normal file
|
@ -0,0 +1,190 @@
|
|||
--- r/galera_ist_MDEV-28583.result
|
||||
+++ r/galera_ist_MDEV-28583,debug.reject
|
||||
@@ -517,3 +517,187 @@
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
+Performing State Transfer on a server that has been killed and restarted
|
||||
+while a DDL was in progress on it
|
||||
+connection node_1;
|
||||
+CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
+connection node_2;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||
+connection node_1;
|
||||
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
+connection node_2;
|
||||
+SET wsrep_sync_wait = 0;
|
||||
+Killing server ...
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during');
|
||||
+COMMIT;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after');
|
||||
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after');
|
||||
+connection node_2;
|
||||
+Performing --wsrep-recover ...
|
||||
+connection node_2;
|
||||
+Starting server ...
|
||||
+Using --wsrep-start-position when starting mysqld ...
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after');
|
||||
+COMMIT;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1a_galera_st_kill_slave_ddl;
|
||||
+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after');
|
||||
+ROLLBACK;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
+COUNT(*) = 0
|
||||
+1
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
+COUNT(*) = 0
|
||||
+1
|
||||
+DROP TABLE t1;
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = $debug_orig;
|
519
mysql-test/suite/galera/r/galera_ist_MDEV-28583.result
Normal file
519
mysql-test/suite/galera/r/galera_ist_MDEV-28583.result
Normal file
|
@ -0,0 +1,519 @@
|
|||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
Performing State Transfer on a server that has been temporarily disconnected
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Unloading wsrep provider ...
|
||||
SET GLOBAL wsrep_cluster_address = '';
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Loading wsrep provider ...
|
||||
disconnect node_2;
|
||||
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_disconnect_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_shutdown_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
||||
Performing State Transfer on a server that has been killed and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'node2_committed_before');
|
||||
COMMIT;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after');
|
||||
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after');
|
||||
connection node_2;
|
||||
Performing --wsrep-recover ...
|
||||
Starting server ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_kill_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
DROP TABLE t1;
|
||||
COMMIT;
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
[mysqld.1]
|
||||
auto_increment_offset=1
|
||||
auto_increment_increment=1
|
||||
|
||||
[mysqld.2]
|
||||
auto_increment_offset=2
|
||||
auto_increment_increment=1
|
||||
|
|
|
@ -3,7 +3,12 @@
|
|||
##
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
--connection node_1
|
||||
SET GLOBAL auto_increment_offset=1;
|
||||
--connection node_2
|
||||
SET GLOBAL auto_increment_offset=2;
|
||||
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
|
@ -30,23 +35,24 @@ call mtr.add_suppression("Unsafe statement written to the binary log");
|
|||
--enable_query_log
|
||||
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
i int(11) NOT NULL primary key AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
show variables like 'auto_increment%';
|
||||
insert into t1(i) values(null);
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
select * from t1;
|
||||
show variables like 'auto_increment%';
|
||||
select * from t1 order by i;
|
||||
|
||||
SET GLOBAL wsrep_forced_binlog_format='none';
|
||||
|
||||
|
@ -80,36 +86,31 @@ SET SESSION auto_increment_increment = 3;
|
|||
SET SESSION auto_increment_offset = 1;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
i int(11) NOT NULL primary key AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
show variables like 'auto_increment%';
|
||||
insert into t1(i) values(null);
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
show variables like 'auto_increment%';
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
--connection node_1
|
||||
|
||||
##
|
||||
## Verify the return to automatic calculation of the step
|
||||
## and offset of the auto-increment:
|
||||
##
|
||||
|
||||
SET GLOBAL wsrep_auto_increment_control='ON';
|
||||
|
||||
SET SESSION binlog_format='ROW';
|
||||
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
--connection node_1
|
||||
show variables like 'binlog_format';
|
||||
show variables like '%auto_increment%';
|
||||
|
||||
|
@ -127,7 +128,8 @@ show variables like '%auto_increment%';
|
|||
##
|
||||
|
||||
SET GLOBAL wsrep_auto_increment_control='ON';
|
||||
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
--connection node_1
|
||||
drop table t1;
|
||||
|
||||
##
|
||||
|
@ -142,24 +144,25 @@ SET GLOBAL wsrep_forced_binlog_format='ROW';
|
|||
SET GLOBAL wsrep_forced_binlog_format='ROW';
|
||||
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
i int(11) NOT NULL primary key AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
show variables like 'auto_increment%';
|
||||
insert into t1(i) values(null);
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
select * from t1;
|
||||
show variables like 'auto_increment%';
|
||||
select * from t1 order by i;
|
||||
|
||||
SET GLOBAL wsrep_forced_binlog_format='none';
|
||||
|
||||
|
@ -189,24 +192,25 @@ SET SESSION auto_increment_increment = 3;
|
|||
SET SESSION auto_increment_offset = 1;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text',
|
||||
PRIMARY KEY (i)
|
||||
i int(11) NOT NULL primary key AUTO_INCREMENT,
|
||||
c char(32) DEFAULT 'dummy_text'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
show variables like 'auto_increment%';
|
||||
insert into t1(i) values(null);
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
insert into t1(i) values(null), (null), (null);
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
show variables like 'auto_increment%';
|
||||
|
||||
select * from t1;
|
||||
select * from t1 order by i;
|
||||
|
||||
--connection node_1
|
||||
|
||||
|
@ -216,6 +220,7 @@ select * from t1;
|
|||
##
|
||||
|
||||
SET GLOBAL wsrep_auto_increment_control='ON';
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
||||
show variables like 'binlog_format';
|
||||
show variables like '%auto_increment%';
|
||||
|
|
44
mysql-test/suite/galera/t/galera_ist_MDEV-28423.cnf
Normal file
44
mysql-test/suite/galera/t/galera_ist_MDEV-28423.cnf
Normal file
|
@ -0,0 +1,44 @@
|
|||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
# server-id=101
|
||||
#wsrep-debug=1
|
||||
innodb_file_per_table
|
||||
innodb_autoinc_lock_mode=2
|
||||
#wsrep_sst_method=rsync
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth=root:
|
||||
binlog_format=ROW
|
||||
core-file
|
||||
log-output=none
|
||||
wsrep_slave_threads=2
|
||||
wsrep_on=1
|
||||
gtid_strict_mode=1
|
||||
log_slave_updates=ON
|
||||
log_bin=binlog
|
||||
|
||||
[mysqld.2]
|
||||
# server-id=102
|
||||
#wsrep-debug=1
|
||||
innodb_file_per_table
|
||||
innodb_autoinc_lock_mode=2
|
||||
#wsrep_sst_method=rsync
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth=root:
|
||||
binlog_format=ROW
|
||||
core-file
|
||||
log-output=none
|
||||
wsrep_slave_threads=2
|
||||
wsrep_on=1
|
||||
gtid_strict_mode=1
|
||||
log_slave_updates=ON
|
||||
log_bin=binlog
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
|
||||
|
||||
[sst]
|
||||
transferfmt=@ENV.MTR_GALERA_TFMT
|
18
mysql-test/suite/galera/t/galera_ist_MDEV-28423.test
Normal file
18
mysql-test/suite/galera/t/galera_ist_MDEV-28423.test
Normal file
|
@ -0,0 +1,18 @@
|
|||
# MDEV-28423: Galera IST is failing on Joiner node
|
||||
|
||||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_mariabackup.inc
|
||||
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--source suite/galera/include/galera_st_disconnect_slave.inc
|
||||
--source suite/galera/include/galera_st_shutdown_slave.inc
|
||||
|
||||
--source suite/galera/include/galera_st_kill_slave.inc
|
||||
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
||||
|
||||
--source include/auto_increment_offset_restore.inc
|
44
mysql-test/suite/galera/t/galera_ist_MDEV-28583.cnf
Normal file
44
mysql-test/suite/galera/t/galera_ist_MDEV-28583.cnf
Normal file
|
@ -0,0 +1,44 @@
|
|||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
# server-id=101
|
||||
#wsrep-debug=1
|
||||
innodb_file_per_table
|
||||
innodb_autoinc_lock_mode=2
|
||||
wsrep_sst_method=rsync
|
||||
#wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth=root:
|
||||
binlog_format=ROW
|
||||
core-file
|
||||
log-output=none
|
||||
wsrep_slave_threads=2
|
||||
wsrep_on=1
|
||||
gtid_strict_mode=1
|
||||
log_slave_updates=ON
|
||||
log_bin=binlog
|
||||
|
||||
[mysqld.2]
|
||||
# server-id=102
|
||||
#wsrep-debug=1
|
||||
innodb_file_per_table
|
||||
innodb_autoinc_lock_mode=2
|
||||
wsrep_sst_method=rsync
|
||||
#wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth=root:
|
||||
binlog_format=ROW
|
||||
core-file
|
||||
log-output=none
|
||||
wsrep_slave_threads=2
|
||||
wsrep_on=1
|
||||
gtid_strict_mode=1
|
||||
log_slave_updates=ON
|
||||
log_bin=binlog
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
|
||||
|
||||
[sst]
|
||||
transferfmt=@ENV.MTR_GALERA_TFMT
|
18
mysql-test/suite/galera/t/galera_ist_MDEV-28583.test
Normal file
18
mysql-test/suite/galera/t/galera_ist_MDEV-28583.test
Normal file
|
@ -0,0 +1,18 @@
|
|||
# MDEV-28583: Galera: binlogs disappear after rsync IST
|
||||
|
||||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_mariabackup.inc
|
||||
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--source suite/galera/include/galera_st_disconnect_slave.inc
|
||||
--source suite/galera/include/galera_st_shutdown_slave.inc
|
||||
|
||||
--source suite/galera/include/galera_st_kill_slave.inc
|
||||
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
||||
|
||||
--source include/auto_increment_offset_restore.inc
|
|
@ -71,8 +71,6 @@ buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL
|
|||
buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently free (innodb_buffer_pool_pages_free)
|
||||
buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created)
|
||||
buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written)
|
||||
buffer_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of index pages written (innodb_index_pages_written)
|
||||
buffer_non_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of non index pages written (innodb_non_index_pages_written)
|
||||
buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read)
|
||||
buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read
|
||||
buffer_index_sec_rec_cluster_reads_avoided buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads avoided triggering cluster read
|
||||
|
|
|
@ -36,8 +36,6 @@ buffer_pool_bytes_dirty disabled
|
|||
buffer_pool_pages_free disabled
|
||||
buffer_pages_created disabled
|
||||
buffer_pages_written disabled
|
||||
buffer_index_pages_written disabled
|
||||
buffer_non_index_pages_written disabled
|
||||
buffer_pages_read disabled
|
||||
buffer_index_sec_rec_cluster_reads disabled
|
||||
buffer_index_sec_rec_cluster_reads_avoided disabled
|
||||
|
|
46
mysql-test/suite/rpl/r/rpl_gtid_glle_no_terminate.result
Normal file
46
mysql-test/suite/rpl/r/rpl_gtid_glle_no_terminate.result
Normal file
|
@ -0,0 +1,46 @@
|
|||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
|
||||
#
|
||||
# Initialize test data
|
||||
connection master;
|
||||
create table t1 (a int);
|
||||
SET @@session.server_id= 3;
|
||||
create table t2 (a int);
|
||||
include/save_master_gtid.inc
|
||||
#
|
||||
# Have the replica "reconnect" and the primary will send Gtid, Glle, DDL
|
||||
connection slave;
|
||||
set global gtid_slave_pos="0-3-1";
|
||||
include/start_slave.inc
|
||||
include/sync_with_master_gtid.inc
|
||||
#
|
||||
# Ensure that the replica did not error
|
||||
connection slave;
|
||||
include/sync_with_master_gtid.inc
|
||||
Last_SQL_Error =
|
||||
Last_SQL_Errno = 0
|
||||
#
|
||||
# Ensure that the primary sent a Glle after a Gtid event
|
||||
include/show_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-relay-bin.000002 # Rotate # # master-bin.000001;pos=POS
|
||||
slave-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
slave-relay-bin.000002 # Gtid_list # # []
|
||||
slave-relay-bin.000002 # Binlog_checkpoint # # master-bin.000001
|
||||
slave-relay-bin.000002 # Gtid # # GTID #-#-#
|
||||
slave-relay-bin.000002 # Gtid_list # # [#-#-#]
|
||||
slave-relay-bin.000002 # Query # # use `test`; create table t2 (a int)
|
||||
#
|
||||
# Ensure the DDL was executed on the replica
|
||||
#
|
||||
# Cleanup
|
||||
# t1 does not make it to the replica
|
||||
connection master;
|
||||
set sql_log_bin=0;
|
||||
DROP TABLE t1;
|
||||
set sql_log_bin=1;
|
||||
DROP TABLE t2;
|
||||
include/rpl_end.inc
|
72
mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test
Normal file
72
mysql-test/suite/rpl/t/rpl_gtid_glle_no_terminate.test
Normal file
|
@ -0,0 +1,72 @@
|
|||
#
|
||||
# Purpose:
|
||||
# If a fake Glle event follows a Gtid event, we need to ensure the rest of
|
||||
# the group should not terminate at the Glle event. MDEV-28550 revealed that
|
||||
# a Glle would terminate the event and upon reconnect, the DDL would be lost.
|
||||
#
|
||||
# Methodology:
|
||||
# Force the primary to send a fake GLLE event after a GTID on a "reconnect"
|
||||
# and ensure that both 1) the replica does not error, and 2) the original
|
||||
# command within the GTID is executed.
|
||||
#
|
||||
# References:
|
||||
# MDEV-28550: improper handling of replication event group that contains Gtid_log_list_event
|
||||
|
||||
--source include/master-slave.inc
|
||||
|
||||
# Independent of binlog format
|
||||
--source include/have_binlog_format_statement.inc
|
||||
|
||||
--connection slave
|
||||
--source include/stop_slave.inc
|
||||
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
|
||||
|
||||
--echo #
|
||||
--echo # Initialize test data
|
||||
--connection master
|
||||
create table t1 (a int);
|
||||
SET @@session.server_id= 3;
|
||||
create table t2 (a int);
|
||||
--source include/save_master_gtid.inc
|
||||
|
||||
--echo #
|
||||
--echo # Have the replica "reconnect" and the primary will send Gtid, Glle, DDL
|
||||
--connection slave
|
||||
eval set global gtid_slave_pos="0-3-1";
|
||||
--source include/start_slave.inc
|
||||
--source include/sync_with_master_gtid.inc
|
||||
|
||||
--echo #
|
||||
--echo # Ensure that the replica did not error
|
||||
connection slave;
|
||||
--source include/sync_with_master_gtid.inc
|
||||
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
||||
--echo Last_SQL_Error = $error
|
||||
let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||
--echo Last_SQL_Errno = $errno
|
||||
|
||||
--echo #
|
||||
--echo # Ensure that the primary sent a Glle after a Gtid event
|
||||
let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
|
||||
let $binlog_start= $relaylog_start;
|
||||
let $binlog_limit=0,10;
|
||||
--source include/show_relaylog_events.inc
|
||||
|
||||
--echo #
|
||||
--echo # Ensure the DDL was executed on the replica
|
||||
if (!`SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'test' AND table_name = 't2'`)
|
||||
{
|
||||
die "t2 should exist on slave";
|
||||
}
|
||||
|
||||
--echo #
|
||||
--echo # Cleanup
|
||||
|
||||
--echo # t1 does not make it to the replica
|
||||
--connection master
|
||||
set sql_log_bin=0;
|
||||
DROP TABLE t1;
|
||||
set sql_log_bin=1;
|
||||
DROP TABLE t2;
|
||||
|
||||
--source include/rpl_end.inc
|
|
@ -1144,6 +1144,18 @@ count(*)
|
|||
100
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-28552 Assertion `inited==RND' failed in handler::ha_rnd_end
|
||||
#
|
||||
create table tcount (c int unsigned);
|
||||
insert into tcount values (0);
|
||||
create table t (f int) with system versioning
|
||||
partition by system_time limit 1000
|
||||
(partition p1 history, partition pn current);
|
||||
insert into t values (1),(2);
|
||||
create trigger tr before insert on t for each row update tcount set c = c + 1;
|
||||
insert into t select * from t;
|
||||
drop table tcount, t;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
#
|
||||
|
|
|
@ -1072,6 +1072,23 @@ select count(*) from t1 partition (p0);
|
|||
select count(*) from t1 partition (p1);
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28552 Assertion `inited==RND' failed in handler::ha_rnd_end
|
||||
--echo #
|
||||
create table tcount (c int unsigned);
|
||||
insert into tcount values (0);
|
||||
|
||||
create table t (f int) with system versioning
|
||||
partition by system_time limit 1000
|
||||
(partition p1 history, partition pn current);
|
||||
insert into t values (1),(2);
|
||||
create trigger tr before insert on t for each row update tcount set c = c + 1;
|
||||
|
||||
insert into t select * from t;
|
||||
|
||||
# cleanup
|
||||
drop table tcount, t;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
|
|
@ -22,7 +22,7 @@ EOF
|
|||
fi
|
||||
|
||||
systemctl set-environment _WSREP_NEW_CLUSTER='--wsrep-new-cluster' && \
|
||||
systemctl start ${1:-mariadb}
|
||||
systemctl restart ${1:-mariadb}
|
||||
|
||||
extcode=$?
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ then
|
|||
[ -f "$FLUSHED" ] && rm -f "$FLUSHED"
|
||||
[ -f "$ERROR" ] && rm -f "$ERROR"
|
||||
|
||||
echo "flush tables"
|
||||
echo "flush tables"
|
||||
|
||||
# Wait for :
|
||||
# (a) Tables to be flushed, AND
|
||||
|
@ -72,7 +72,7 @@ then
|
|||
# (c) ERROR file, in case flush tables operation failed.
|
||||
|
||||
while [ ! -r "$FLUSHED" ] && \
|
||||
! grep -q -F ':' '--' "$FLUSHED" >/dev/null 2>&1
|
||||
! grep -q -F ':' -- "$FLUSHED" >/dev/null 2>&1
|
||||
do
|
||||
# Check whether ERROR file exists.
|
||||
if [ -f "$ERROR" ]; then
|
||||
|
@ -98,15 +98,11 @@ then
|
|||
|
||||
echo "done $STATE"
|
||||
|
||||
elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]
|
||||
then
|
||||
wsrep_log_error "Unrecognized role: '$WSREP_SST_OPT_ROLE'"
|
||||
else # joiner
|
||||
|
||||
wsrep_log_error "Unsupported role: '$WSREP_SST_OPT_ROLE'"
|
||||
exit 22 # EINVAL
|
||||
|
||||
|
||||
else
|
||||
wsrep_log_error "Unrecognized role: '$WSREP_SST_OPT_ROLE'"
|
||||
exit 22 # EINVAL
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
# This is a common command line parser to be sourced by other SST scripts
|
||||
|
||||
set -ue
|
||||
trap 'exit 32' HUP PIPE
|
||||
trap 'exit 3' INT QUIT TERM
|
||||
|
||||
# Setting the path for some utilities on CentOS
|
||||
export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
|
@ -184,7 +185,7 @@ case "$1" in
|
|||
shift
|
||||
;;
|
||||
'--bypass')
|
||||
WSREP_SST_OPT_BYPASS=1
|
||||
readonly WSREP_SST_OPT_BYPASS=1
|
||||
;;
|
||||
'--datadir')
|
||||
# Let's remove the trailing slash:
|
||||
|
@ -511,7 +512,24 @@ case "$1" in
|
|||
esac
|
||||
shift
|
||||
done
|
||||
readonly WSREP_SST_OPT_BYPASS
|
||||
|
||||
WSREP_TRANSFER_TYPE='SST'
|
||||
[ $WSREP_SST_OPT_BYPASS -ne 0 ] && readonly WSREP_TRANSFER_TYPE='IST'
|
||||
# Let's take the name of the current script as a base,
|
||||
# removing the directory, extension and "wsrep_sst_" prefix:
|
||||
WSREP_METHOD="${0##*/}"
|
||||
WSREP_METHOD="${WSREP_METHOD%.*}"
|
||||
readonly WSREP_METHOD="${WSREP_METHOD#wsrep_sst_}"
|
||||
if [ -n "${WSREP_SST_OPT_ROLE+x}" ]; then
|
||||
if [ "$WSREP_SST_OPT_ROLE" != 'donor' -a \
|
||||
"$WSREP_SST_OPT_ROLE" != 'joiner' ]
|
||||
then
|
||||
wsrep_log_error "Unrecognized role: '$WSREP_SST_OPT_ROLE'"
|
||||
exit 22 # EINVAL
|
||||
fi
|
||||
else
|
||||
readonly WSREP_SST_OPT_ROLE='donor'
|
||||
fi
|
||||
|
||||
# The same argument can be present on the command line several
|
||||
# times, in this case we must take its last value:
|
||||
|
@ -719,7 +737,7 @@ wsrep_log()
|
|||
{
|
||||
# echo everything to stderr so that it gets into common error log
|
||||
# deliberately made to look different from the rest of the log
|
||||
local readonly tst="$(date +%Y%m%d\ %H:%M:%S.%N | cut -b -21)"
|
||||
local readonly tst=$(date "+%Y%m%d %H:%M:%S.%N" | cut -b -21)
|
||||
echo "WSREP_SST: $* ($tst)" >&2
|
||||
}
|
||||
|
||||
|
@ -1050,7 +1068,7 @@ is_local_ip()
|
|||
[ "$1" = '127.0.0.1' -o \
|
||||
"$1" = '127.0.0.2' -o \
|
||||
"$1" = 'localhost' -o \
|
||||
"$1" = '[::1]' ] && return 0
|
||||
"$1" = '::1' ] && return 0
|
||||
# If the address starts with "127." this is probably a local
|
||||
# address, but we need to clarify what follows this prefix:
|
||||
if [ "${1#127.}" != "$1" ]; then
|
||||
|
@ -1067,21 +1085,25 @@ is_local_ip()
|
|||
"$1" = "$(hostname -f)" -o \
|
||||
"$1" = "$(hostname -d)" ] && return 0
|
||||
fi
|
||||
# If the address contains anything other than digits
|
||||
# and separators, it is not a local address:
|
||||
[ "${1#*[!0-9.]}" != "$1" ] && \
|
||||
[ "${1#*[!0-9A-Fa-f:\[\]]}" != "$1" ] && return 1
|
||||
# Now let's check if the given address is assigned to
|
||||
# one of the network cards:
|
||||
local ip_util=$(commandex 'ip')
|
||||
if [ -n "$ip_util" ]; then
|
||||
# ip address show ouput format is " inet[6] <address>/<mask>":
|
||||
"$ip_util" address show \
|
||||
| grep -E '^[[:space:]]*inet.? [^[:space:]]+/' -o \
|
||||
| grep -F " $1/" >/dev/null && return 0
|
||||
| grep -o -E '^[[:space:]]*inet.?[[:space:]]+[^[:space:]]+/' \
|
||||
| grep -qw -F -- "$1/" && return 0
|
||||
else
|
||||
local ifconfig_util=$(commandex 'ifconfig')
|
||||
if [ -n "$ifconfig_util" ]; then
|
||||
# ifconfig output format is " inet[6] <address> ...":
|
||||
"$ifconfig_util" \
|
||||
| grep -E '^[[:space:]]*inet.? [^[:space:]]+ ' -o \
|
||||
| grep -F " $1 " >/dev/null && return 0
|
||||
| grep -o -E '^[[:space:]]*inet.?[[:space:]]+[^[:space:]]+' \
|
||||
| grep -qw -F -- "$1" && return 0
|
||||
fi
|
||||
fi
|
||||
return 1
|
||||
|
@ -1403,7 +1425,7 @@ get_proc()
|
|||
if [ -z "$nproc" ]; then
|
||||
set +e
|
||||
if [ "$OS" = 'Linux' ]; then
|
||||
nproc=$(grep -c processor /proc/cpuinfo 2>/dev/null)
|
||||
nproc=$(grep -cw -E '^processor' /proc/cpuinfo 2>/dev/null)
|
||||
elif [ "$OS" = 'Darwin' -o "$OS" = 'FreeBSD' ]; then
|
||||
nproc=$(sysctl -n hw.ncpu)
|
||||
fi
|
||||
|
@ -1452,3 +1474,19 @@ check_server_ssl_config()
|
|||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
simple_cleanup()
|
||||
{
|
||||
# Since this is invoked just after exit NNN
|
||||
local estatus=$?
|
||||
if [ $estatus -ne 0 ]; then
|
||||
wsrep_log_error "Cleanup after exit with status: $estatus"
|
||||
fi
|
||||
if [ -n "${SST_PID:-}" ]; then
|
||||
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
|
||||
[ -f "$SST_PID" ] && rm -f "$SST_PID" || :
|
||||
fi
|
||||
exit $estatus
|
||||
}
|
||||
|
||||
wsrep_log_info "$WSREP_METHOD $WSREP_TRANSFER_TYPE started on $WSREP_SST_OPT_ROLE"
|
||||
|
|
|
@ -86,6 +86,7 @@ encrypt_threads=""
|
|||
encrypt_chunk=""
|
||||
|
||||
readonly SECRET_TAG='secret'
|
||||
readonly TOTAL_TAG='secret /total'
|
||||
|
||||
# Required for backup locks
|
||||
# For backup locks it is 1 sent by joiner
|
||||
|
@ -165,12 +166,10 @@ get_keys()
|
|||
exit 3
|
||||
fi
|
||||
|
||||
if [ -z "$ekey" ]; then
|
||||
if [ ! -r "$ekeyfile" ]; then
|
||||
wsrep_log_error "FATAL: Either key must be specified" \
|
||||
"or keyfile must be readable"
|
||||
exit 3
|
||||
fi
|
||||
if [ -z "$ekey" -a ! -r "$ekeyfile" ]; then
|
||||
wsrep_log_error "FATAL: Either key must be specified" \
|
||||
"or keyfile must be readable"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
if [ "$eformat" = 'openssl' ]; then
|
||||
|
@ -217,9 +216,7 @@ get_keys()
|
|||
exit 2
|
||||
fi
|
||||
|
||||
if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then
|
||||
ecmd="$ecmd -d"
|
||||
fi
|
||||
[ "$WSREP_SST_OPT_ROLE" = 'joiner' ] && ecmd="$ecmd -d"
|
||||
|
||||
stagemsg="$stagemsg-XB-Encrypted"
|
||||
}
|
||||
|
@ -324,7 +321,8 @@ get_transfer()
|
|||
if [ -z "$ssl_dhparams" ]; then
|
||||
# Determine the socat version
|
||||
SOCAT_VERSION=$(socat -V 2>&1 | \
|
||||
grep -m1 -owE '[0-9]+(\.[0-9]+)+' | head -n1)
|
||||
grep -m1 -owE '[0-9]+(\.[0-9]+)+' | \
|
||||
head -n1 || :)
|
||||
if [ -z "$SOCAT_VERSION" ]; then
|
||||
wsrep_log_error "******** FATAL ERROR ******************"
|
||||
wsrep_log_error "* Cannot determine the socat version. *"
|
||||
|
@ -595,18 +593,6 @@ get_stream()
|
|||
wsrep_log_info "Streaming with $sfmt"
|
||||
}
|
||||
|
||||
sig_joiner_cleanup()
|
||||
{
|
||||
local estatus=$?
|
||||
if [ $estatus -ne 0 ]; then
|
||||
wsrep_log_error "Cleanup after exit with status: $estatus"
|
||||
fi
|
||||
wsrep_log_error "Removing $MAGIC_FILE file due to signal"
|
||||
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
|
||||
[ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE"
|
||||
exit $estatus
|
||||
}
|
||||
|
||||
cleanup_at_exit()
|
||||
{
|
||||
# Since this is invoked just after exit NNN
|
||||
|
@ -617,6 +603,11 @@ cleanup_at_exit()
|
|||
|
||||
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
|
||||
|
||||
if [ $estatus -ne 0 ]; then
|
||||
wsrep_log_error "Removing $MAGIC_FILE file due to signal"
|
||||
[ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE" || :
|
||||
fi
|
||||
|
||||
if [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then
|
||||
wsrep_log_info "Removing the sst_in_progress file"
|
||||
wsrep_cleanup_progress_file
|
||||
|
@ -646,7 +637,7 @@ cleanup_at_exit()
|
|||
fi
|
||||
|
||||
# Final cleanup
|
||||
pgid=$(ps -o pgid= $$ 2>/dev/null | grep -o -E '[0-9]*' || :)
|
||||
pgid=$(ps -o pgid= $$ 2>/dev/null | grep -o -E '[0-9]+' || :)
|
||||
|
||||
# This means no setsid done in mysqld.
|
||||
# We don't want to kill mysqld here otherwise.
|
||||
|
@ -742,17 +733,15 @@ recv_joiner()
|
|||
fi
|
||||
fi
|
||||
|
||||
pushd "$dir" 1>/dev/null
|
||||
set +e
|
||||
|
||||
if [ $wait -ne 0 ]; then
|
||||
wait_for_listen &
|
||||
fi
|
||||
|
||||
cd "$dir"
|
||||
set +e
|
||||
timeit "$msg" "$ltcmd | $strmcmd; RC=( "\${PIPESTATUS[@]}" )"
|
||||
|
||||
set -e
|
||||
popd 1>/dev/null
|
||||
cd "$OLD_PWD"
|
||||
|
||||
if [ ${RC[0]} -eq 124 ]; then
|
||||
wsrep_log_error "Possible timeout in receiving first data from" \
|
||||
|
@ -770,26 +759,26 @@ recv_joiner()
|
|||
|
||||
if [ $checkf -eq 1 ]; then
|
||||
if [ ! -r "$MAGIC_FILE" ]; then
|
||||
# this message should cause joiner to abort
|
||||
# this message should cause joiner to abort:
|
||||
wsrep_log_error "receiving process ended without creating" \
|
||||
"'$MAGIC_FILE'"
|
||||
wsrep_log_info "Contents of datadir"
|
||||
"magic file ($MAGIC_FILE)"
|
||||
wsrep_log_info "Contents of datadir:"
|
||||
wsrep_log_info $(ls -l "$dir/"*)
|
||||
exit 32
|
||||
fi
|
||||
|
||||
# check donor supplied secret
|
||||
SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \
|
||||
cut -d ' ' -f2)
|
||||
# Select the "secret" tag whose value does not start
|
||||
# with a slash symbol. All new tags must to start with
|
||||
# the space and the slash symbol after the word "secret" -
|
||||
# to be removed by older versions of the SST scripts:
|
||||
SECRET=$(grep -m1 -E "^$SECRET_TAG[[:space:]]+[^/]" \
|
||||
-- "$MAGIC_FILE" || :)
|
||||
# Check donor supplied secret:
|
||||
SECRET=$(trim_string "${SECRET#$SECRET_TAG}")
|
||||
if [ "$SECRET" != "$MY_SECRET" ]; then
|
||||
wsrep_log_error "Donor does not know my secret!"
|
||||
wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'"
|
||||
exit 32
|
||||
fi
|
||||
|
||||
# remove secret from the magic file
|
||||
grep -v -F -- "$SECRET_TAG " "$MAGIC_FILE" > "$MAGIC_FILE.new"
|
||||
mv "$MAGIC_FILE.new" "$MAGIC_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -798,11 +787,11 @@ send_donor()
|
|||
local dir="$1"
|
||||
local msg="$2"
|
||||
|
||||
pushd "$dir" 1>/dev/null
|
||||
cd "$dir"
|
||||
set +e
|
||||
timeit "$msg" "$strmcmd | $tcmd; RC=( "\${PIPESTATUS[@]}" )"
|
||||
set -e
|
||||
popd 1>/dev/null
|
||||
cd "$OLD_PWD"
|
||||
|
||||
for ecode in "${RC[@]}"; do
|
||||
if [ $ecode -ne 0 ]; then
|
||||
|
@ -817,7 +806,7 @@ monitor_process()
|
|||
{
|
||||
local sst_stream_pid=$1
|
||||
|
||||
while true ; do
|
||||
while :; do
|
||||
if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1; then
|
||||
wsrep_log_error \
|
||||
"Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \
|
||||
|
@ -834,13 +823,6 @@ monitor_process()
|
|||
|
||||
[ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE"
|
||||
|
||||
if [ "$WSREP_SST_OPT_ROLE" != 'joiner' -a \
|
||||
"$WSREP_SST_OPT_ROLE" != 'donor' ]
|
||||
then
|
||||
wsrep_log_error "Invalid role '$WSREP_SST_OPT_ROLE'"
|
||||
exit 22
|
||||
fi
|
||||
|
||||
read_cnf
|
||||
setup_ports
|
||||
|
||||
|
@ -957,8 +939,8 @@ setup_commands()
|
|||
get_stream
|
||||
get_transfer
|
||||
|
||||
if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]
|
||||
then
|
||||
if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
|
||||
|
||||
trap cleanup_at_exit EXIT
|
||||
|
||||
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]
|
||||
|
@ -1079,6 +1061,7 @@ then
|
|||
fi
|
||||
|
||||
setup_commands
|
||||
|
||||
set +e
|
||||
timeit "$stagemsg-SST" "$INNOBACKUP | $tcmd; RC=( "\${PIPESTATUS[@]}" )"
|
||||
set -e
|
||||
|
@ -1122,10 +1105,9 @@ then
|
|||
|
||||
echo "done $WSREP_SST_OPT_GTID"
|
||||
wsrep_log_info "Total time on donor: $totime seconds"
|
||||
wsrep_log_info "mariabackup SST/IST completed on donor"
|
||||
|
||||
elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]
|
||||
then
|
||||
else # joiner
|
||||
|
||||
[ -e "$SST_PROGRESS_FILE" ] && \
|
||||
wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE"
|
||||
[ -n "$SST_PROGRESS_FILE" ] && touch "$SST_PROGRESS_FILE"
|
||||
|
@ -1196,6 +1178,7 @@ then
|
|||
sleep 1
|
||||
done
|
||||
|
||||
trap simple_cleanup EXIT
|
||||
echo $$ > "$SST_PID"
|
||||
|
||||
stagemsg='Joiner-Recv'
|
||||
|
@ -1205,7 +1188,7 @@ then
|
|||
[ -f "$DATA/$IST_FILE" ] && rm -f "$DATA/$IST_FILE"
|
||||
|
||||
# May need xtrabackup_checkpoints later on
|
||||
[ -f "$DATA/xtrabackup_binary" ] && rm -f "$DATA/xtrabackup_binary"
|
||||
[ -f "$DATA/xtrabackup_binary" ] && rm -f "$DATA/xtrabackup_binary"
|
||||
[ -f "$DATA/xtrabackup_galera_info" ] && rm -f "$DATA/xtrabackup_galera_info"
|
||||
|
||||
ADDR="$WSREP_SST_OPT_HOST"
|
||||
|
@ -1232,7 +1215,6 @@ then
|
|||
MY_SECRET="" # for check down in recv_joiner()
|
||||
fi
|
||||
|
||||
trap sig_joiner_cleanup HUP PIPE INT TERM
|
||||
trap cleanup_at_exit EXIT
|
||||
|
||||
if [ -n "$progress" ]; then
|
||||
|
@ -1256,8 +1238,7 @@ then
|
|||
|
||||
recv_joiner "$STATDIR" "$stagemsg-gtid" $stimeout 1 1
|
||||
|
||||
if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1
|
||||
then
|
||||
if ! ps -p "$WSREP_SST_OPT_PARENT" >/dev/null 2>&1; then
|
||||
wsrep_log_error "Parent mysqld process (PID: $WSREP_SST_OPT_PARENT)" \
|
||||
"terminated unexpectedly."
|
||||
exit 32
|
||||
|
@ -1285,13 +1266,13 @@ then
|
|||
cd "$DATA"
|
||||
wsrep_log_info "Cleaning the old binary logs"
|
||||
# If there is a file with binlogs state, delete it:
|
||||
[ -f "$binlog_base.state" ] && rm -fv "$binlog_base.state" 1>&2
|
||||
[ -f "$binlog_base.state" ] && rm -f "$binlog_base.state" >&2
|
||||
# Clean up the old binlog files and index:
|
||||
if [ -f "$binlog_index" ]; then
|
||||
while read bin_file || [ -n "$bin_file" ]; do
|
||||
rm -fv "$bin_file" 1>&2 || :
|
||||
rm -f "$bin_file" >&2 || :
|
||||
done < "$binlog_index"
|
||||
rm -fv "$binlog_index" 1>&2
|
||||
rm -f "$binlog_index" >&2
|
||||
fi
|
||||
if [ -n "$binlog_dir" -a "$binlog_dir" != '.' -a \
|
||||
-d "$binlog_dir" ]
|
||||
|
@ -1302,7 +1283,7 @@ then
|
|||
"Cleaning the binlog directory '$binlog_dir' as well"
|
||||
fi
|
||||
fi
|
||||
rm -fv "$binlog_base".[0-9]* 1>&2 || :
|
||||
rm -f "$binlog_base".[0-9]* >&2 || :
|
||||
cd "$OLD_PWD"
|
||||
fi
|
||||
|
||||
|
@ -1313,13 +1294,13 @@ then
|
|||
${ib_undo_dir:+"$ib_undo_dir"} \
|
||||
${ib_log_dir:+"$ib_log_dir"} \
|
||||
"$DATA" -mindepth 1 -prune -regex "$cpat" \
|
||||
-o -exec rm -rfv {} 1>&2 \+
|
||||
-o -exec rm -rf {} >&2 \+
|
||||
else
|
||||
find ${ib_home_dir:+"$ib_home_dir"} \
|
||||
${ib_undo_dir:+"$ib_undo_dir"} \
|
||||
${ib_log_dir:+"$ib_log_dir"} \
|
||||
"$DATA" -mindepth 1 -prune -regex "$cpat" \
|
||||
-o -exec rm -rfv {} 1>&2 \+
|
||||
-o -exec rm -rf {} >&2 \+
|
||||
fi
|
||||
|
||||
TDATA="$DATA"
|
||||
|
@ -1393,7 +1374,6 @@ then
|
|||
wsrep_log_info "Preparing the backup at $DATA"
|
||||
setup_commands
|
||||
timeit 'mariabackup prepare stage' "$INNOAPPLY"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
wsrep_log_error "mariabackup apply finished with errors." \
|
||||
"Check syslog or '$INNOAPPLYLOG' for details."
|
||||
|
@ -1450,6 +1430,10 @@ then
|
|||
else
|
||||
|
||||
wsrep_log_info "'$IST_FILE' received from donor: Running IST"
|
||||
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]; then
|
||||
readonly WSREP_SST_OPT_BYPASS=1
|
||||
readonly WSREP_TRANSFER_TYPE='IST'
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
@ -1458,12 +1442,13 @@ then
|
|||
exit 2
|
||||
fi
|
||||
|
||||
coords=$(cat "$MAGIC_FILE")
|
||||
# Remove special tags from the magic file, and from the output:
|
||||
coords=$(grep -v -E "^$SECRET_TAG[[:space:]]" -- "$MAGIC_FILE")
|
||||
wsrep_log_info "Galera co-ords from recovery: $coords"
|
||||
cat "$MAGIC_FILE" # Output : UUID:seqno wsrep_gtid_domain_id
|
||||
echo "$coords" # Output : UUID:seqno wsrep_gtid_domain_id
|
||||
|
||||
wsrep_log_info "Total time on joiner: $totime seconds"
|
||||
wsrep_log_info "mariabackup SST/IST completed on joiner"
|
||||
fi
|
||||
|
||||
wsrep_log_info "$WSREP_METHOD $WSREP_TRANSFER_TYPE completed on $WSREP_SST_OPT_ROLE"
|
||||
exit 0
|
||||
|
|
|
@ -163,10 +163,11 @@ then
|
|||
echo "$STOP_WSREP" && $MYSQLDUMP && echo "$CSV_TABLES_FIX" && \
|
||||
echo "$RESTORE_GENERAL_LOG" && echo "$RESTORE_SLOW_QUERY_LOG" && \
|
||||
echo "$SET_START_POSITION" && echo "$SET_WSREP_GTID_DOMAIN_ID" \
|
||||
|| echo "SST failed to complete;") | $MYSQL
|
||||
|| echo "SST failed to complete;") | $MYSQL || exit $?
|
||||
else
|
||||
wsrep_log_info "Bypassing state dump."
|
||||
echo "$SET_START_POSITION" | $MYSQL
|
||||
echo "$SET_START_POSITION" | $MYSQL || exit $?
|
||||
fi
|
||||
|
||||
#
|
||||
wsrep_log_info "$WSREP_METHOD $WSREP_TRANSFER_TYPE completed on $WSREP_SST_OPT_ROLE"
|
||||
exit 0
|
||||
|
|
|
@ -34,6 +34,12 @@ wsrep_check_programs rsync
|
|||
|
||||
cleanup_joiner()
|
||||
{
|
||||
# Since this is invoked just after exit NNN
|
||||
local estatus=$?
|
||||
if [ $estatus -ne 0 ]; then
|
||||
wsrep_log_error "Cleanup after exit with status: $estatus"
|
||||
fi
|
||||
|
||||
local failure=0
|
||||
|
||||
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
|
||||
|
@ -72,7 +78,9 @@ cleanup_joiner()
|
|||
wsrep_cleanup_progress_file
|
||||
fi
|
||||
|
||||
[ -f "$SST_PID" ] && rm -f "$SST_PID"
|
||||
[ -f "$SST_PID" ] && rm -f "$SST_PID" || :
|
||||
|
||||
exit $estatus
|
||||
}
|
||||
|
||||
check_pid_and_port()
|
||||
|
@ -310,6 +318,7 @@ if [ -n "$SSLMODE" -a "$SSLMODE" != 'DISABLED' ]; then
|
|||
fi
|
||||
|
||||
readonly SECRET_TAG='secret'
|
||||
readonly BYPASS_TAG='secret /bypass'
|
||||
|
||||
SST_PID="$WSREP_SST_OPT_DATA/wsrep_sst.pid"
|
||||
|
||||
|
@ -325,6 +334,7 @@ while check_pid "$SST_PID" 0; do
|
|||
sleep 1
|
||||
done
|
||||
|
||||
trap simple_cleanup EXIT
|
||||
echo $$ > "$SST_PID"
|
||||
|
||||
# give some time for stunnel from the previous SST to complete:
|
||||
|
@ -358,7 +368,7 @@ while check_pid "$RSYNC_PID" 1 "$RSYNC_CONF"; do
|
|||
sleep 1
|
||||
done
|
||||
|
||||
[ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE"
|
||||
[ -f "$MAGIC_FILE" ] && rm -f "$MAGIC_FILE"
|
||||
[ -f "$BINLOG_TAR_FILE" ] && rm -f "$BINLOG_TAR_FILE"
|
||||
|
||||
if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
|
||||
|
@ -390,7 +400,7 @@ EOF
|
|||
ERROR="$WSREP_SST_OPT_DATA/sst_error"
|
||||
|
||||
[ -f "$FLUSHED" ] && rm -f "$FLUSHED"
|
||||
[ -f "$ERROR" ] && rm -f "$ERROR"
|
||||
[ -f "$ERROR" ] && rm -f "$ERROR"
|
||||
|
||||
echo 'flush tables'
|
||||
|
||||
|
@ -400,7 +410,7 @@ EOF
|
|||
# (c) ERROR file, in case flush tables operation failed.
|
||||
|
||||
while [ ! -r "$FLUSHED" ] && \
|
||||
! grep -q -F ':' '--' "$FLUSHED" >/dev/null 2>&1
|
||||
! grep -q -F ':' -- "$FLUSHED" 2>/dev/null
|
||||
do
|
||||
# Check whether ERROR file exists.
|
||||
if [ -f "$ERROR" ]; then
|
||||
|
@ -440,9 +450,16 @@ EOF
|
|||
tar_type=0
|
||||
if tar --help | grep -qw -F -- '--transform'; then
|
||||
tar_type=1
|
||||
elif tar --version | grep -q -E '^bsdtar\>'; then
|
||||
elif tar --version | grep -qw -E '^bsdtar'; then
|
||||
tar_type=2
|
||||
fi
|
||||
if [ $tar_type -eq 2 ]; then
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
printf '%s' "$binlog_files" >&2
|
||||
else
|
||||
echo "$binlog_files" >&2
|
||||
fi
|
||||
fi
|
||||
if [ $tar_type -ne 0 ]; then
|
||||
# Preparing list of the binlog file names:
|
||||
echo "$binlog_files" | {
|
||||
|
@ -501,9 +518,8 @@ EOF
|
|||
fi
|
||||
|
||||
# Use deltaxfer only for WAN:
|
||||
inv=$(basename "$0")
|
||||
WHOLE_FILE_OPT=""
|
||||
if [ "${inv%wsrep_sst_rsync_wan*}" = "$inv" ]; then
|
||||
if [ "${WSREP_METHOD%_wan}" = "$WSREP_METHOD" ]; then
|
||||
WHOLE_FILE_OPT='--whole-file'
|
||||
fi
|
||||
|
||||
|
@ -613,7 +629,6 @@ FILTER="-f '- /lost+found'
|
|||
|
||||
wsrep_log_info "Transfer of data done"
|
||||
|
||||
|
||||
else # BYPASS
|
||||
|
||||
wsrep_log_info "Bypassing state dump."
|
||||
|
@ -634,6 +649,10 @@ FILTER="-f '- /lost+found'
|
|||
echo "$SECRET_TAG $WSREP_SST_OPT_REMOTE_PSWD" >> "$MAGIC_FILE"
|
||||
fi
|
||||
|
||||
if [ $WSREP_SST_OPT_BYPASS -ne 0 ]; then
|
||||
echo "$BYPASS_TAG" >> "$MAGIC_FILE"
|
||||
fi
|
||||
|
||||
rsync ${STUNNEL:+--rsh="$STUNNEL"} \
|
||||
--archive --quiet --checksum "$MAGIC_FILE" \
|
||||
"rsync://$WSREP_SST_OPT_ADDR" >&2 || RC=$?
|
||||
|
@ -647,15 +666,11 @@ FILTER="-f '- /lost+found'
|
|||
|
||||
if [ -n "$STUNNEL" ]; then
|
||||
[ -f "$STUNNEL_CONF" ] && rm -f "$STUNNEL_CONF"
|
||||
[ -f "$STUNNEL_PID" ] && rm -f "$STUNNEL_PID"
|
||||
[ -f "$STUNNEL_PID" ] && rm -f "$STUNNEL_PID"
|
||||
fi
|
||||
|
||||
[ -f "$SST_PID" ] && rm -f "$SST_PID"
|
||||
else # joiner
|
||||
|
||||
wsrep_log_info "rsync SST/IST completed on donor"
|
||||
|
||||
elif [ "$WSREP_SST_OPT_ROLE" = 'joiner' ]
|
||||
then
|
||||
check_sockets_utils
|
||||
|
||||
ADDR="$WSREP_SST_OPT_HOST"
|
||||
|
@ -663,8 +678,6 @@ then
|
|||
RSYNC_ADDR="$WSREP_SST_OPT_HOST"
|
||||
RSYNC_ADDR_UNESCAPED="$WSREP_SST_OPT_HOST_UNESCAPED"
|
||||
|
||||
trap 'exit 32' HUP PIPE
|
||||
trap 'exit 3' INT TERM ABRT
|
||||
trap cleanup_joiner EXIT
|
||||
|
||||
touch "$SST_PROGRESS_FILE"
|
||||
|
@ -797,8 +810,7 @@ EOF
|
|||
sleep 1
|
||||
done
|
||||
|
||||
if ! ps -p $MYSQLD_PID >/dev/null 2>&1
|
||||
then
|
||||
if ! ps -p $MYSQLD_PID >/dev/null 2>&1; then
|
||||
wsrep_log_error \
|
||||
"Parent mysqld process (PID: $MYSQLD_PID) terminated unexpectedly."
|
||||
kill -- -$MYSQLD_PID
|
||||
|
@ -806,52 +818,68 @@ EOF
|
|||
exit 32
|
||||
fi
|
||||
|
||||
if [ -r "$MAGIC_FILE" ]; then
|
||||
if [ -n "$MY_SECRET" ]; then
|
||||
# Check donor supplied secret:
|
||||
SECRET=$(grep -F -- "$SECRET_TAG " "$MAGIC_FILE" 2>/dev/null | \
|
||||
cut -d ' ' -f2)
|
||||
if [ "$SECRET" != "$MY_SECRET" ]; then
|
||||
wsrep_log_error "Donor does not know my secret!"
|
||||
wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'"
|
||||
exit 32
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ ! -r "$MAGIC_FILE" ]; then
|
||||
# This message should cause joiner to abort:
|
||||
wsrep_log_info "rsync process ended without creating magic file"
|
||||
echo "rsync process ended without creating '$MAGIC_FILE'"
|
||||
wsrep_log_info "rsync process ended without creating" \
|
||||
"magic file ($MAGIC_FILE)"
|
||||
exit 32
|
||||
fi
|
||||
|
||||
if [ -n "$WSREP_SST_OPT_BINLOG" ]; then
|
||||
binlog_tar_present=0
|
||||
[ -f "$BINLOG_TAR_FILE" ] && binlog_tar_present=1
|
||||
if [ -n "$MY_SECRET" ]; then
|
||||
# Select the "secret" tag whose value does not start
|
||||
# with a slash symbol. All new tags must to start with
|
||||
# the space and the slash symbol after the word "secret" -
|
||||
# to be removed by older versions of the SST scripts:
|
||||
SECRET=$(grep -m1 -E "^$SECRET_TAG[[:space:]]+[^/]" \
|
||||
-- "$MAGIC_FILE" || :)
|
||||
# Check donor supplied secret:
|
||||
SECRET=$(trim_string "${SECRET#$SECRET_TAG}")
|
||||
if [ "$SECRET" != "$MY_SECRET" ]; then
|
||||
wsrep_log_error "Donor does not know my secret!"
|
||||
wsrep_log_info "Donor: '$SECRET', my: '$MY_SECRET'"
|
||||
exit 32
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]; then
|
||||
if grep -m1 -qE "^$BYPASS_TAG([[space]]+.*)?\$" -- "$MAGIC_FILE"; then
|
||||
readonly WSREP_SST_OPT_BYPASS=1
|
||||
readonly WSREP_TRANSFER_TYPE='IST'
|
||||
fi
|
||||
fi
|
||||
|
||||
binlog_tar_present=0
|
||||
if [ -f "$BINLOG_TAR_FILE" ]; then
|
||||
if [ $WSREP_SST_OPT_BYPASS -ne 0 ]; then
|
||||
wsrep_log_warning "tar with binlogs transferred in the IST mode"
|
||||
fi
|
||||
binlog_tar_present=1
|
||||
fi
|
||||
|
||||
if [ $WSREP_SST_OPT_BYPASS -eq 0 -a -n "$WSREP_SST_OPT_BINLOG" ]; then
|
||||
# If it is SST (not an IST) or tar with binlogs is present
|
||||
# among the transferred files, then we need to remove the
|
||||
# old binlogs:
|
||||
if [ $WSREP_SST_OPT_BYPASS -eq 0 -o $binlog_tar_present -ne 0 ]; then
|
||||
cd "$DATA"
|
||||
# Clean up the old binlog files and index:
|
||||
binlog_index="$WSREP_SST_OPT_BINLOG_INDEX"
|
||||
if [ -f "$binlog_index" ]; then
|
||||
while read bin_file || [ -n "$bin_file" ]; do
|
||||
rm -f "$bin_file" || :
|
||||
done < "$binlog_index"
|
||||
rm -f "$binlog_index"
|
||||
fi
|
||||
binlog_cd=0
|
||||
# Change the directory to binlog base (if possible):
|
||||
if [ -n "$binlog_dir" -a "$binlog_dir" != '.' -a \
|
||||
-d "$binlog_dir" ]
|
||||
then
|
||||
binlog_cd=1
|
||||
cd "$binlog_dir"
|
||||
fi
|
||||
# Clean up unindexed binlog files:
|
||||
rm -f "$binlog_base".[0-9]* || :
|
||||
[ $binlog_cd -ne 0 ] && cd "$DATA_DIR"
|
||||
cd "$DATA"
|
||||
# Clean up the old binlog files and index:
|
||||
binlog_index="$WSREP_SST_OPT_BINLOG_INDEX"
|
||||
if [ -f "$binlog_index" ]; then
|
||||
while read bin_file || [ -n "$bin_file" ]; do
|
||||
rm -f "$bin_file" || :
|
||||
done < "$binlog_index"
|
||||
rm -f "$binlog_index"
|
||||
fi
|
||||
binlog_cd=0
|
||||
# Change the directory to binlog base (if possible):
|
||||
if [ -n "$binlog_dir" -a "$binlog_dir" != '.' -a \
|
||||
-d "$binlog_dir" ]
|
||||
then
|
||||
binlog_cd=1
|
||||
cd "$binlog_dir"
|
||||
fi
|
||||
# Clean up unindexed binlog files:
|
||||
rm -f "$binlog_base".[0-9]* || :
|
||||
[ $binlog_cd -ne 0 ] && cd "$DATA_DIR"
|
||||
if [ $binlog_tar_present -ne 0 ]; then
|
||||
# Create a temporary file:
|
||||
tmpdir=$(parse_cnf '--mysqld|sst' 'tmpdir')
|
||||
|
@ -875,7 +903,7 @@ EOF
|
|||
# Extracting binlog files:
|
||||
wsrep_log_info "Extracting binlog files:"
|
||||
RC=0
|
||||
if tar --version | grep -q -E '^bsdtar\>'; then
|
||||
if tar --version | grep -qw -E '^bsdtar'; then
|
||||
tar -tf "$BINLOG_TAR_FILE" > "$tmpfile" && \
|
||||
tar -xvf "$BINLOG_TAR_FILE" > /dev/null || RC=$?
|
||||
else
|
||||
|
@ -883,8 +911,8 @@ EOF
|
|||
cat "$tmpfile" >&2 || RC=$?
|
||||
fi
|
||||
if [ $RC -ne 0 ]; then
|
||||
rm -f "$tmpfile"
|
||||
wsrep_log_error "Error unpacking tar file with binlog files"
|
||||
rm -f "$tmpfile"
|
||||
exit 32
|
||||
fi
|
||||
# Rebuild binlog index:
|
||||
|
@ -897,24 +925,13 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$MY_SECRET" ]; then
|
||||
# remove secret from the magic file, and output
|
||||
# the UUID:seqno & wsrep_gtid_domain_id:
|
||||
grep -v -F -- "$SECRET_TAG " "$MAGIC_FILE"
|
||||
else
|
||||
# Output the UUID:seqno and wsrep_gtid_domain_id:
|
||||
cat "$MAGIC_FILE"
|
||||
fi
|
||||
|
||||
wsrep_log_info "rsync SST/IST completed on joiner"
|
||||
|
||||
# wsrep_cleanup_progress_file
|
||||
# cleanup_joiner
|
||||
else
|
||||
wsrep_log_error "Unrecognized role: '$WSREP_SST_OPT_ROLE'"
|
||||
exit 22 # EINVAL
|
||||
# Remove special tags from the magic file, and from the output:
|
||||
coords=$(grep -v -E "^$SECRET_TAG[[:space:]]" -- "$MAGIC_FILE")
|
||||
wsrep_log_info "Galera co-ords from recovery: $coords"
|
||||
echo "$coords" # Output : UUID:seqno wsrep_gtid_domain_id
|
||||
fi
|
||||
|
||||
[ -f "$BINLOG_TAR_FILE" ] && rm -f "$BINLOG_TAR_FILE"
|
||||
|
||||
wsrep_log_info "$WSREP_METHOD $WSREP_TRANSFER_TYPE completed on $WSREP_SST_OPT_ROLE"
|
||||
exit 0
|
||||
|
|
|
@ -1614,7 +1614,6 @@ public:
|
|||
for (; part_id < part_id_end; ++part_id)
|
||||
{
|
||||
handler *file= m_file[part_id];
|
||||
DBUG_ASSERT(bitmap_is_set(&(m_part_info->read_partitions), part_id));
|
||||
file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_OPEN);
|
||||
part_recs+= file->stats.records;
|
||||
}
|
||||
|
|
|
@ -904,8 +904,6 @@ void partition_info::vers_check_limit(THD *thd)
|
|||
uint32 part_id= vers_info->hist_part->id * sub_factor;
|
||||
const uint32 part_id_end= part_id + sub_factor;
|
||||
DBUG_ASSERT(part_id_end <= num_parts * sub_factor);
|
||||
for (; part_id < part_id_end; ++part_id)
|
||||
bitmap_set_bit(&read_partitions, part_id);
|
||||
|
||||
ha_partition *hp= (ha_partition*)(table->file);
|
||||
ha_rows hist_rows= hp->part_records(vers_info->hist_part);
|
||||
|
|
|
@ -7045,8 +7045,9 @@ dbug_gtid_accept:
|
|||
mi->using_gtid != Master_info::USE_GTID_NO &&
|
||||
mi->events_queued_since_last_gtid > 0 &&
|
||||
( (mi->last_queued_gtid_standalone &&
|
||||
!Log_event::is_part_of_group((Log_event_type)(uchar)
|
||||
buf[EVENT_TYPE_OFFSET])) ||
|
||||
(LOG_EVENT_IS_QUERY((Log_event_type)(uchar)
|
||||
buf[EVENT_TYPE_OFFSET]) ||
|
||||
(uchar)buf[EVENT_TYPE_OFFSET] == INCIDENT_EVENT)) ||
|
||||
(!mi->last_queued_gtid_standalone &&
|
||||
((uchar)buf[EVENT_TYPE_OFFSET] == XID_EVENT ||
|
||||
((uchar)buf[EVENT_TYPE_OFFSET] == QUERY_EVENT && /* QUERY_COMPRESSED_EVENT would never be commmit or rollback */
|
||||
|
|
|
@ -7046,7 +7046,7 @@ bool LEX::maybe_start_compound_statement(THD *thd)
|
|||
if (!make_sp_head(thd, NULL, &sp_handler_procedure, DEFAULT_AGGREGATE))
|
||||
return true;
|
||||
sphead->set_suid(SP_IS_NOT_SUID);
|
||||
sphead->set_body_start(thd, thd->m_parser_state->m_lip.get_cpp_ptr());
|
||||
sphead->set_body_start(thd, thd->m_parser_state->m_lip.get_cpp_tok_start());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -9587,10 +9587,11 @@ best_extension_by_limited_search(JOIN *join,
|
|||
for (JOIN_TAB **pos= join->best_ref + idx ; (s= *pos) ; pos++)
|
||||
{
|
||||
table_map real_table_bit= s->table->map;
|
||||
if ((remaining_tables & real_table_bit) &&
|
||||
(allowed_tables & real_table_bit) &&
|
||||
DBUG_ASSERT(remaining_tables & real_table_bit);
|
||||
|
||||
if ((allowed_tables & real_table_bit) &&
|
||||
!(remaining_tables & s->dependent) &&
|
||||
(!idx || !check_interleaving_with_nj(s)))
|
||||
!check_interleaving_with_nj(s))
|
||||
{
|
||||
double current_record_count, current_read_time;
|
||||
POSITION *position= join->positions + idx;
|
||||
|
@ -16861,7 +16862,6 @@ static uint reset_nj_counters(JOIN *join, List<TABLE_LIST> *join_list)
|
|||
|
||||
static bool check_interleaving_with_nj(JOIN_TAB *next_tab)
|
||||
{
|
||||
TABLE_LIST *next_emb= next_tab->table->pos_in_table_list->embedding;
|
||||
JOIN *join= next_tab->join;
|
||||
|
||||
if (join->cur_embedding_map & ~next_tab->embedding_map)
|
||||
|
@ -16873,6 +16873,7 @@ static bool check_interleaving_with_nj(JOIN_TAB *next_tab)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
TABLE_LIST *next_emb= next_tab->table->pos_in_table_list->embedding;
|
||||
/*
|
||||
Do update counters for "pairs of brackets" that we've left (marked as
|
||||
X,Y,Z in the above picture)
|
||||
|
|
|
@ -1107,10 +1107,6 @@ static SHOW_VAR innodb_status_variables[]= {
|
|||
/* Status variables for page compression */
|
||||
{"page_compression_saved",
|
||||
(char*) &export_vars.innodb_page_compression_saved, SHOW_LONGLONG},
|
||||
{"num_index_pages_written",
|
||||
(char*) &export_vars.innodb_index_pages_written, SHOW_LONGLONG},
|
||||
{"num_non_index_pages_written",
|
||||
(char*) &export_vars.innodb_non_index_pages_written, SHOW_LONGLONG},
|
||||
{"num_pages_page_compressed",
|
||||
(char*) &export_vars.innodb_pages_page_compressed, SHOW_LONGLONG},
|
||||
{"num_page_compressed_trim_op",
|
||||
|
@ -1178,9 +1174,6 @@ static SHOW_VAR innodb_status_variables[]= {
|
|||
{"encryption_rotation_estimated_iops",
|
||||
(char*) &export_vars.innodb_encryption_rotation_estimated_iops,
|
||||
SHOW_LONG},
|
||||
{"encryption_key_rotation_list_length",
|
||||
(char*)&export_vars.innodb_key_rotation_list_length,
|
||||
SHOW_LONGLONG},
|
||||
{"encryption_n_merge_blocks_encrypted",
|
||||
(char*)&export_vars.innodb_n_merge_blocks_encrypted,
|
||||
SHOW_LONGLONG},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2012, Facebook Inc.
|
||||
Copyright (c) 2013, 2020, MariaDB Corporation.
|
||||
Copyright (c) 2013, 2022, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
|
@ -176,8 +176,6 @@ enum monitor_id_t {
|
|||
MONITOR_OVLD_BUF_POOL_PAGES_FREE,
|
||||
MONITOR_OVLD_PAGE_CREATED,
|
||||
MONITOR_OVLD_PAGES_WRITTEN,
|
||||
MONITOR_OVLD_INDEX_PAGES_WRITTEN,
|
||||
MONITOR_OVLD_NON_INDEX_PAGES_WRITTEN,
|
||||
MONITOR_OVLD_PAGES_READ,
|
||||
MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS,
|
||||
MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS_AVOIDED,
|
||||
|
|
|
@ -108,10 +108,6 @@ struct srv_stats_t
|
|||
|
||||
/** Number of bytes saved by page compression */
|
||||
ulint_ctr_64_t page_compression_saved;
|
||||
/* Number of index pages written */
|
||||
ulint_ctr_64_t index_pages_written;
|
||||
/* Number of non index pages written */
|
||||
ulint_ctr_64_t non_index_pages_written;
|
||||
/* Number of pages compressed with page compression */
|
||||
ulint_ctr_64_t pages_page_compressed;
|
||||
/* Number of TRIM operations induced by page compression */
|
||||
|
@ -182,9 +178,6 @@ struct srv_stats_t
|
|||
/** Number of log scrub operations */
|
||||
ulint_ctr_64_t n_log_scrubs;
|
||||
|
||||
/** Number of spaces in keyrotation list */
|
||||
ulint_ctr_64_t key_rotation_list_length;
|
||||
|
||||
/** Number of temporary tablespace blocks encrypted */
|
||||
ulint_ctr_64_t n_temp_blocks_encrypted;
|
||||
|
||||
|
@ -1008,10 +1001,6 @@ struct export_var_t{
|
|||
|
||||
int64_t innodb_page_compression_saved;/*!< Number of bytes saved
|
||||
by page compression */
|
||||
int64_t innodb_index_pages_written; /*!< Number of index pages
|
||||
written */
|
||||
int64_t innodb_non_index_pages_written; /*!< Number of non index pages
|
||||
written */
|
||||
int64_t innodb_pages_page_compressed;/*!< Number of pages
|
||||
compressed by page compression */
|
||||
int64_t innodb_page_compressed_trim_op;/*!< Number of TRIM operations
|
||||
|
@ -1050,7 +1039,6 @@ struct export_var_t{
|
|||
ulint innodb_encryption_rotation_pages_flushed;
|
||||
ulint innodb_encryption_rotation_estimated_iops;
|
||||
int64_t innodb_encryption_key_requests;
|
||||
int64_t innodb_key_rotation_list_length;
|
||||
|
||||
ulint innodb_scrub_page_reorganizations;
|
||||
ulint innodb_scrub_page_splits;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2012, Facebook Inc.
|
||||
Copyright (c) 2013, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2013, 2022, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
|
@ -280,18 +280,6 @@ static monitor_info_t innodb_counter_info[] =
|
|||
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
|
||||
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_WRITTEN},
|
||||
|
||||
{"buffer_index_pages_written", "buffer",
|
||||
"Number of index pages written (innodb_index_pages_written)",
|
||||
static_cast<monitor_type_t>(
|
||||
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
|
||||
MONITOR_DEFAULT_START, MONITOR_OVLD_INDEX_PAGES_WRITTEN},
|
||||
|
||||
{"buffer_non_index_pages_written", "buffer",
|
||||
"Number of non index pages written (innodb_non_index_pages_written)",
|
||||
static_cast<monitor_type_t>(
|
||||
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
|
||||
MONITOR_DEFAULT_START, MONITOR_OVLD_NON_INDEX_PAGES_WRITTEN},
|
||||
|
||||
{"buffer_pages_read", "buffer",
|
||||
"Number of pages read (innodb_pages_read)",
|
||||
static_cast<monitor_type_t>(
|
||||
|
@ -1721,16 +1709,6 @@ srv_mon_process_existing_counter(
|
|||
value = stat.n_pages_written;
|
||||
break;
|
||||
|
||||
/* innodb_index_pages_written, the number of index pages written */
|
||||
case MONITOR_OVLD_INDEX_PAGES_WRITTEN:
|
||||
value = srv_stats.index_pages_written;
|
||||
break;
|
||||
|
||||
/* innodb_non_index_pages_written, the number of non index pages written */
|
||||
case MONITOR_OVLD_NON_INDEX_PAGES_WRITTEN:
|
||||
value = srv_stats.non_index_pages_written;
|
||||
break;
|
||||
|
||||
/* innodb_pages_read */
|
||||
case MONITOR_OVLD_PAGES_READ:
|
||||
buf_get_total_stat(&stat);
|
||||
|
|
|
@ -1562,8 +1562,6 @@ srv_export_innodb_status(void)
|
|||
|
||||
export_vars.innodb_available_undo_logs = srv_available_undo_logs;
|
||||
export_vars.innodb_page_compression_saved = srv_stats.page_compression_saved;
|
||||
export_vars.innodb_index_pages_written = srv_stats.index_pages_written;
|
||||
export_vars.innodb_non_index_pages_written = srv_stats.non_index_pages_written;
|
||||
export_vars.innodb_pages_page_compressed = srv_stats.pages_page_compressed;
|
||||
export_vars.innodb_page_compressed_trim_op = srv_stats.page_compressed_trim_op;
|
||||
export_vars.innodb_pages_page_decompressed = srv_stats.pages_page_decompressed;
|
||||
|
@ -1608,8 +1606,6 @@ srv_export_innodb_status(void)
|
|||
crypt_stat.estimated_iops;
|
||||
export_vars.innodb_encryption_key_requests =
|
||||
srv_stats.n_key_requests;
|
||||
export_vars.innodb_key_rotation_list_length =
|
||||
srv_stats.key_rotation_list_length;
|
||||
|
||||
export_vars.innodb_scrub_page_reorganizations =
|
||||
scrub_stat.page_reorganizations;
|
||||
|
|
|
@ -53,8 +53,6 @@ buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL
|
|||
buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently free (innodb_buffer_pool_pages_free)
|
||||
buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created)
|
||||
buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written)
|
||||
buffer_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of index pages written (innodb_index_pages_written)
|
||||
buffer_non_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of non index pages written (innodb_non_index_pages_written)
|
||||
buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read)
|
||||
buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read
|
||||
buffer_index_sec_rec_cluster_reads_avoided buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads avoided triggering cluster read
|
||||
|
|
|
@ -3746,27 +3746,15 @@ int spider_db_mbase::append_lock_tables(
|
|||
conn_link_idx = tmp_spider->conn_link_idx[tmp_link_idx];
|
||||
spider_mbase_share *db_share = (spider_mbase_share *)
|
||||
tmp_spider->share->dbton_share[conn->dbton_id];
|
||||
if (&db_share->db_names_str[conn_link_idx])
|
||||
{
|
||||
db_name = db_share->db_names_str[conn_link_idx].ptr();
|
||||
db_name_length = db_share->db_names_str[conn_link_idx].length();
|
||||
db_name_charset = tmp_spider->share->access_charset;
|
||||
} else {
|
||||
db_name = tmp_spider->share->tgt_dbs[conn_link_idx];
|
||||
db_name_length = tmp_spider->share->tgt_dbs_lengths[conn_link_idx];
|
||||
db_name_charset = system_charset_info;
|
||||
}
|
||||
if (&db_share->table_names_str[conn_link_idx])
|
||||
{
|
||||
table_name = db_share->table_names_str[conn_link_idx].ptr();
|
||||
table_name_length = db_share->table_names_str[conn_link_idx].length();
|
||||
table_name_charset = tmp_spider->share->access_charset;
|
||||
} else {
|
||||
table_name = tmp_spider->share->tgt_table_names[conn_link_idx];
|
||||
table_name_length =
|
||||
tmp_spider->share->tgt_table_names_lengths[conn_link_idx];
|
||||
table_name_charset = system_charset_info;
|
||||
}
|
||||
|
||||
db_name = db_share->db_names_str[conn_link_idx].ptr();
|
||||
db_name_length = db_share->db_names_str[conn_link_idx].length();
|
||||
db_name_charset = tmp_spider->share->access_charset;
|
||||
|
||||
table_name = db_share->table_names_str[conn_link_idx].ptr();
|
||||
table_name_length = db_share->table_names_str[conn_link_idx].length();
|
||||
table_name_charset = tmp_spider->share->access_charset;
|
||||
|
||||
if ((error_num = spider_db_mbase_utility->
|
||||
append_lock_table_body(
|
||||
str,
|
||||
|
|
Loading…
Reference in a new issue