mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Merge mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#28908/5.0
into mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#28908/5.1 sql/set_var.cc: Auto merged BitKeeper/deleted/.del-rpl_slave_skip.result: Auto merged BitKeeper/deleted/.del-rpl_slave_skip.test: Auto merged sql/slave.cc: Manual merged
This commit is contained in:
commit
529a480d81
3 changed files with 64 additions and 0 deletions
34
mysql-test/r/rpl_server_id.result
Normal file
34
mysql-test/r/rpl_server_id.result
Normal file
|
@ -0,0 +1,34 @@
|
|||
set global server_id=1;
|
||||
reset master;
|
||||
drop table if exists t1,t2,t3;
|
||||
create table t1 (a int);
|
||||
select @@server_id;
|
||||
@@server_id
|
||||
1
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int)
|
||||
set global server_id=2;
|
||||
create table t2 (b int);
|
||||
select @@server_id;
|
||||
@@server_id
|
||||
2
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int)
|
||||
master-bin.000001 # Query 2 # use `test`; create table t2 (b int)
|
||||
set global server_id=3;
|
||||
create table t3 (c int);
|
||||
select @@server_id;
|
||||
@@server_id
|
||||
3
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2,t3
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int)
|
||||
master-bin.000001 # Query 2 # use `test`; create table t2 (b int)
|
||||
master-bin.000001 # Query 3 # use `test`; create table t3 (c int)
|
||||
set global server_id=1;
|
||||
drop table t1,t2,t3;
|
29
mysql-test/t/rpl_server_id.test
Normal file
29
mysql-test/t/rpl_server_id.test
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Test for BUG#28908 Replication: set global server_id is not setting the session server_id
|
||||
|
||||
-- source include/have_log_bin.inc
|
||||
|
||||
let $saved_server_id=`select @@server_id`;
|
||||
set global server_id=1;
|
||||
reset master;
|
||||
|
||||
-- disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
-- enable_warnings
|
||||
|
||||
create table t1 (a int);
|
||||
select @@server_id;
|
||||
source include/show_binlog_events2.inc;
|
||||
|
||||
set global server_id=2;
|
||||
create table t2 (b int);
|
||||
select @@server_id;
|
||||
source include/show_binlog_events2.inc;
|
||||
|
||||
set global server_id=3;
|
||||
create table t3 (c int);
|
||||
select @@server_id;
|
||||
source include/show_binlog_events2.inc;
|
||||
|
||||
# cleanup
|
||||
eval set global server_id=$saved_server_id;
|
||||
drop table t1,t2,t3;
|
|
@ -1186,6 +1186,7 @@ static void fix_trans_mem_root(THD *thd, enum_var_type type)
|
|||
static void fix_server_id(THD *thd, enum_var_type type)
|
||||
{
|
||||
server_id_supplied = 1;
|
||||
thd->server_id= server_id;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue