Commit b7d80a54 authored by unknown's avatar unknown

MDEV-26: Global transaction ID.

After-rebase fixes. Rebase was done to be able to build on top
of the binlog background thread of MDEV-532.
parent 516a2428
...@@ -2,8 +2,8 @@ CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.1', master_ ...@@ -2,8 +2,8 @@ CHANGE MASTER 'slave1' TO master_port=MYPORT_1, master_host='127.0.0.1', master_
CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.1', master_user='root'; CHANGE MASTER 'slave2' TO master_port=MYPORT_2, master_host='127.0.0.1', master_user='root';
start all slaves; start all slaves;
Warnings: Warnings:
Note 1936 SLAVE 'slave2' started Note 1937 SLAVE 'slave2' started
Note 1936 SLAVE 'slave1' started Note 1937 SLAVE 'slave1' started
set default_master_connection = 'slave1'; set default_master_connection = 'slave1';
include/wait_for_slave_to_start.inc include/wait_for_slave_to_start.inc
set default_master_connection = 'slave2'; set default_master_connection = 'slave2';
...@@ -12,7 +12,7 @@ set default_master_connection = ''; ...@@ -12,7 +12,7 @@ set default_master_connection = '';
CHANGE MASTER TO master_port=MYPORT_3, master_host='127.0.0.1', master_user='root'; CHANGE MASTER TO master_port=MYPORT_3, master_host='127.0.0.1', master_user='root';
start all slaves; start all slaves;
Warnings: Warnings:
Note 1936 SLAVE '' started Note 1937 SLAVE '' started
include/wait_for_slave_to_start.inc include/wait_for_slave_to_start.inc
SET GLOBAL gtid_domain_id= 1; SET GLOBAL gtid_domain_id= 1;
SET SESSION gtid_domain_id= 1; SET SESSION gtid_domain_id= 1;
...@@ -81,7 +81,7 @@ Gtid_Pos 1-1-4,2-2-3 ...@@ -81,7 +81,7 @@ Gtid_Pos 1-1-4,2-2-3
*** Now move slave2 to replicate from both master1 and master2 instead of just slave1 *** *** Now move slave2 to replicate from both master1 and master2 instead of just slave1 ***
STOP ALL SLAVES; STOP ALL SLAVES;
Warnings: Warnings:
Note 1937 SLAVE '' stopped Note 1938 SLAVE '' stopped
INSERT INTO t1 VALUES (2, "switch1"); INSERT INTO t1 VALUES (2, "switch1");
INSERT INTO t3 VALUES (102, "switch1 a"); INSERT INTO t3 VALUES (102, "switch1 a");
INSERT INTO t2 VALUES (2, "switch1"); INSERT INTO t2 VALUES (2, "switch1");
...@@ -135,13 +135,13 @@ DROP TABLE t3; ...@@ -135,13 +135,13 @@ DROP TABLE t3;
SET GLOBAL gtid_domain_id=0; SET GLOBAL gtid_domain_id=0;
STOP ALL SLAVES; STOP ALL SLAVES;
Warnings: Warnings:
Note 1937 SLAVE '' stopped Note 1938 SLAVE '' stopped
include/reset_master_slave.inc include/reset_master_slave.inc
SET GLOBAL gtid_domain_id=0; SET GLOBAL gtid_domain_id=0;
STOP ALL SLAVES; STOP ALL SLAVES;
Warnings: Warnings:
Note 1937 SLAVE 'slave2' stopped Note 1938 SLAVE 'slave2' stopped
Note 1937 SLAVE 'slave1' stopped Note 1938 SLAVE 'slave1' stopped
include/reset_master_slave.inc include/reset_master_slave.inc
SET GLOBAL gtid_domain_id=0; SET GLOBAL gtid_domain_id=0;
include/reset_master_slave.inc include/reset_master_slave.inc
......
...@@ -7,21 +7,21 @@ ALTER TABLE mysql.rpl_slave_state CHANGE seq_no seq_no VARCHAR(20); ...@@ -7,21 +7,21 @@ ALTER TABLE mysql.rpl_slave_state CHANGE seq_no seq_no VARCHAR(20);
START SLAVE; START SLAVE;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
CALL mtr.add_suppression("Slave: Failed to open mysql.rpl_slave_state"); CALL mtr.add_suppression("Slave: Failed to open mysql.rpl_slave_state");
include/wait_for_slave_sql_error.inc [errno=1942] include/wait_for_slave_sql_error.inc [errno=1943]
include/stop_slave.inc include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL; ALTER TABLE mysql.rpl_slave_state CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL;
ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY; ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY;
ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id, domain_id); ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id, domain_id);
START SLAVE; START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1942] include/wait_for_slave_sql_error.inc [errno=1943]
include/stop_slave.inc include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY; ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY;
START SLAVE; START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1942] include/wait_for_slave_sql_error.inc [errno=1943]
include/stop_slave.inc include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id); ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id);
START SLAVE; START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1942] include/wait_for_slave_sql_error.inc [errno=1943]
include/stop_slave.inc include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY; ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY;
ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (domain_id, sub_id); ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (domain_id, sub_id);
......
...@@ -16,7 +16,7 @@ INSERT INTO t1 VALUES (1); ...@@ -16,7 +16,7 @@ INSERT INTO t1 VALUES (1);
--connection slave --connection slave
CALL mtr.add_suppression("Slave: Failed to open mysql.rpl_slave_state"); CALL mtr.add_suppression("Slave: Failed to open mysql.rpl_slave_state");
--let $slave_sql_errno=1942 --let $slave_sql_errno=1943
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--source include/stop_slave.inc --source include/stop_slave.inc
...@@ -24,19 +24,19 @@ ALTER TABLE mysql.rpl_slave_state CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL; ...@@ -24,19 +24,19 @@ ALTER TABLE mysql.rpl_slave_state CHANGE seq_no seq_no BIGINT UNSIGNED NOT NULL;
ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY; ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY;
ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id, domain_id); ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id, domain_id);
START SLAVE; START SLAVE;
--let $slave_sql_errno=1942 --let $slave_sql_errno=1943
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--source include/stop_slave.inc --source include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY; ALTER TABLE mysql.rpl_slave_state DROP PRIMARY KEY;
START SLAVE; START SLAVE;
--let $slave_sql_errno=1942 --let $slave_sql_errno=1943
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--source include/stop_slave.inc --source include/stop_slave.inc
ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id); ALTER TABLE mysql.rpl_slave_state ADD PRIMARY KEY (sub_id);
START SLAVE; START SLAVE;
--let $slave_sql_errno=1942 --let $slave_sql_errno=1943
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--source include/stop_slave.inc --source include/stop_slave.inc
......
...@@ -742,7 +742,8 @@ gtid_find_binlog_file(slave_connection_state *state, char *out_name) ...@@ -742,7 +742,8 @@ gtid_find_binlog_file(slave_connection_state *state, char *out_name)
char buf[FN_REFLEN]; char buf[FN_REFLEN];
bzero((char*) &cache, sizeof(cache)); bzero((char*) &cache, sizeof(cache));
init_alloc_root(&memroot, 10*(FN_REFLEN+sizeof(binlog_file_entry)), 0); init_alloc_root(&memroot, 10*(FN_REFLEN+sizeof(binlog_file_entry)), 0,
MYF(MY_THREAD_SPECIFIC));
if (!(list= get_binlog_list(&memroot))) if (!(list= get_binlog_list(&memroot)))
{ {
errormsg= "Out of memory while looking for GTID position in binlog"; errormsg= "Out of memory while looking for GTID position in binlog";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment