Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
5c6a787c
Commit
5c6a787c
authored
Jul 23, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@213.136.52.20:/home/bk/mysql-4.1
into mysql.com:/home/mysql_src/mysql-4.1
parents
9ffbf928
184db002
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
99 additions
and
27 deletions
+99
-27
mysql-test/r/rpl000015.result
mysql-test/r/rpl000015.result
+7
-7
mysql-test/r/rpl_empty_master_crash.result
mysql-test/r/rpl_empty_master_crash.result
+1
-1
mysql-test/r/rpl_flush_log_loop.result
mysql-test/r/rpl_flush_log_loop.result
+2
-2
mysql-test/r/rpl_log.result
mysql-test/r/rpl_log.result
+2
-2
mysql-test/r/rpl_log_pos.result
mysql-test/r/rpl_log_pos.result
+8
-8
mysql-test/r/rpl_redirect.result
mysql-test/r/rpl_redirect.result
+1
-1
mysql-test/r/rpl_replicate_do.result
mysql-test/r/rpl_replicate_do.result
+3
-0
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+6
-6
mysql-test/t/rpl_replicate_do.test
mysql-test/t/rpl_replicate_do.test
+4
-0
sql/slave.cc
sql/slave.cc
+63
-0
sql/slave.h
sql/slave.h
+2
-0
No files found.
mysql-test/r/rpl000015.result
View file @
5c6a787c
...
...
@@ -4,20 +4,20 @@ File Position Binlog_do_db Binlog_ignore_db
master-bin.000001 79
reset slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
change master to master_host='127.0.0.1';
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No
0 0 0 4
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No
0 0 0 4
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes
0 0 79 123
drop table if exists t1;
create table t1 (n int);
insert into t1 values (10),(45),(90);
...
...
mysql-test/r/rpl_empty_master_crash.result
View file @
5c6a787c
...
...
@@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
load table t1 from master;
ERROR 08S01: Error connecting to master: Master is not configured
load table t1 from master;
...
...
mysql-test/r/rpl_flush_log_loop.result
View file @
5c6a787c
...
...
@@ -13,5 +13,5 @@ master_password='',master_port=SLAVE_PORT;
start slave;
flush logs;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 79 relay-log.000001 122 slave-bin.000001 Yes Yes 0 0 79 122
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 79 relay-log.000001 122 slave-bin.000001 Yes Yes
0 0 79 122
mysql-test/r/rpl_log.result
View file @
5c6a787c
...
...
@@ -92,7 +92,7 @@ slave-bin.000002 4 Query 1 110 use `test`; create table t1 (n int)
slave-bin.000002 62 Query 1 168 use `test`; insert into t1 values (1)
slave-bin.000002 122 Query 1 228 use `test`; drop table t1
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000002 1531 master-bin.000002 Yes Yes 0 0 276 1535
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000002 1531 master-bin.000002 Yes Yes
0 0 276 1535
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
mysql-test/r/rpl_log_pos.result
View file @
5c6a787c
...
...
@@ -8,26 +8,26 @@ show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.000001 79
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 127
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes
0 0 79 127
stop slave;
change master to master_log_pos=73;
start slave;
stop slave;
change master to master_log_pos=73;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 73 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No
0 0 73 4
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 73 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No Yes
0 0 73 4
stop slave;
change master to master_log_pos=173;
start slave;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 173 4
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes
0 0 173 4
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.000001 79
...
...
mysql-test/r/rpl_redirect.result
View file @
5c6a787c
...
...
@@ -5,7 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SHOW SLAVE STATUS;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
SHOW SLAVE HOSTS;
Server_id Host Port Rpl_recovery_rank Master_id
2 127.0.0.1 SLAVE_PORT 2 1
...
...
mysql-test/r/rpl_replicate_do.result
View file @
5c6a787c
...
...
@@ -26,3 +26,6 @@ n
select * from t11;
ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11;
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.000001 1281 slave-relay-bin.000002 1325 master-bin.000001 Yes Yes test.t1 0 0 1281 1329
mysql-test/r/rpl_rotate_logs.result
View file @
5c6a787c
...
...
@@ -15,8 +15,8 @@ insert into temp_table values ("testing temporary tables");
create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes
0 0 417 461
select * from t1;
s
Could not break slave
...
...
@@ -56,8 +56,8 @@ Log_name
master-bin.000003
insert into t2 values (65);
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes
0 0 290 1088
select * from t2;
m
34
...
...
@@ -82,8 +82,8 @@ select * from t4;
a
testing temporary tables part 2
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes 0 0 838 8067
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db
Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table
Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 60 master-bin.000006 838 slave-relay-bin.000001 8067 master-bin.000006 Yes Yes
0 0 838 8067
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
...
...
mysql-test/t/rpl_replicate_do.test
View file @
5c6a787c
...
...
@@ -31,3 +31,7 @@ drop table if exists t1,t2,t11;
save_master_pos
;
connection
slave
;
sync_with_master
;
# show slave status, just to see of it prints replicate-do-table
--
replace_result
$MASTER_MYPORT
MASTER_PORT
show
slave
status
;
sql/slave.cc
View file @
5c6a787c
...
...
@@ -1565,6 +1565,48 @@ int register_slave_on_master(MYSQL* mysql)
}
/*
Builds a String from a HASH of TABLE_RULE_ENT. Cannot be used for any other
hash, as it assumes that the hash entries are TABLE_RULE_ENT.
SYNOPSIS
table_rule_ent_hash_to_str()
s pointer to the String to fill
h pointer to the HASH to read
RETURN VALUES
none
*/
void
table_rule_ent_hash_to_str
(
String
*
s
,
HASH
*
h
)
{
s
->
length
(
0
);
for
(
uint
i
=
0
;
i
<
h
->
records
;
i
++
)
{
TABLE_RULE_ENT
*
e
=
(
TABLE_RULE_ENT
*
)
hash_element
(
h
,
i
);
if
(
s
->
length
())
s
->
append
(
','
);
s
->
append
(
e
->
db
,
e
->
key_len
);
}
}
/*
Mostly the same thing as above
*/
void
table_rule_ent_dynamic_array_to_str
(
String
*
s
,
DYNAMIC_ARRAY
*
a
)
{
s
->
length
(
0
);
for
(
uint
i
=
0
;
i
<
a
->
elements
;
i
++
)
{
TABLE_RULE_ENT
*
e
;
get_dynamic
(
a
,
(
gptr
)
&
e
,
i
);
if
(
s
->
length
())
s
->
append
(
','
);
s
->
append
(
e
->
db
,
e
->
key_len
);
}
}
int
show_master_info
(
THD
*
thd
,
MASTER_INFO
*
mi
)
{
// TODO: fix this for multi-master
...
...
@@ -1594,6 +1636,10 @@ int show_master_info(THD* thd, MASTER_INFO* mi)
field_list
.
push_back
(
new
Item_empty_string
(
"Slave_SQL_Running"
,
3
));
field_list
.
push_back
(
new
Item_empty_string
(
"Replicate_do_db"
,
20
));
field_list
.
push_back
(
new
Item_empty_string
(
"Replicate_ignore_db"
,
20
));
field_list
.
push_back
(
new
Item_empty_string
(
"Replicate_do_table"
,
20
));
field_list
.
push_back
(
new
Item_empty_string
(
"Replicate_ignore_table"
,
23
));
field_list
.
push_back
(
new
Item_empty_string
(
"Replicate_wild_do_table"
,
24
));
field_list
.
push_back
(
new
Item_empty_string
(
"Replicate_wild_ignore_table"
,
28
));
field_list
.
push_back
(
new
Item_return_int
(
"Last_errno"
,
4
,
MYSQL_TYPE_LONG
));
field_list
.
push_back
(
new
Item_empty_string
(
"Last_error"
,
20
));
field_list
.
push_back
(
new
Item_return_int
(
"Skip_counter"
,
10
,
...
...
@@ -1626,6 +1672,23 @@ int show_master_info(THD* thd, MASTER_INFO* mi)
protocol
->
store
(
mi
->
rli
.
slave_running
?
"Yes"
:
"No"
,
&
my_charset_bin
);
protocol
->
store
(
&
replicate_do_db
);
protocol
->
store
(
&
replicate_ignore_db
);
/*
We can't directly use some protocol->store for
replicate_*_table,
as Protocol doesn't know the TABLE_RULE_ENT struct.
We first build Strings and then pass them to protocol->store.
*/
char
buf
[
256
];
String
tmp
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);
table_rule_ent_hash_to_str
(
&
tmp
,
&
replicate_do_table
);
protocol
->
store
(
&
tmp
);
table_rule_ent_hash_to_str
(
&
tmp
,
&
replicate_ignore_table
);
protocol
->
store
(
&
tmp
);
table_rule_ent_dynamic_array_to_str
(
&
tmp
,
&
replicate_wild_do_table
);
protocol
->
store
(
&
tmp
);
table_rule_ent_dynamic_array_to_str
(
&
tmp
,
&
replicate_wild_ignore_table
);
protocol
->
store
(
&
tmp
);
protocol
->
store
((
uint32
)
mi
->
rli
.
last_slave_errno
);
protocol
->
store
(
mi
->
rli
.
last_slave_error
,
&
my_charset_bin
);
protocol
->
store
((
uint32
)
mi
->
rli
.
slave_skip_counter
);
...
...
sql/slave.h
View file @
5c6a787c
...
...
@@ -398,6 +398,8 @@ int mysql_table_dump(THD* thd, const char* db,
int
fetch_master_table
(
THD
*
thd
,
const
char
*
db_name
,
const
char
*
table_name
,
MASTER_INFO
*
mi
,
MYSQL
*
mysql
);
void
table_rule_ent_hash_to_str
(
String
*
s
,
HASH
*
h
);
void
table_rule_ent_dynamic_array_to_str
(
String
*
s
,
DYNAMIC_ARRAY
*
a
);
int
show_master_info
(
THD
*
thd
,
MASTER_INFO
*
mi
);
int
show_binlog_info
(
THD
*
thd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment