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
8b623739
Commit
8b623739
authored
Mar 17, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
parents
5164e291
9d78adc1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
mysql-test/r/rpl000009.result
mysql-test/r/rpl000009.result
+12
-0
mysql-test/t/rpl000009.test
mysql-test/t/rpl000009.test
+15
-0
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+10
-2
No files found.
mysql-test/r/rpl000009.result
View file @
8b623739
...
@@ -111,6 +111,18 @@ n s
...
@@ -111,6 +111,18 @@ n s
2 two bar
2 two bar
3 three bar
3 three bar
4 four bar
4 four bar
stop slave;
reset slave;
load data from master;
start slave;
insert into bar.t1 values (5, 'five bar');
select * from bar.t1;
n s
1 one bar
2 two bar
3 three bar
4 four bar
5 five bar
load table bar.t1 from master;
load table bar.t1 from master;
Table 't1' already exists
Table 't1' already exists
drop table bar.t1;
drop table bar.t1;
...
...
mysql-test/t/rpl000009.test
View file @
8b623739
...
@@ -108,6 +108,21 @@ connection slave;
...
@@ -108,6 +108,21 @@ connection slave;
sync_with_master
;
sync_with_master
;
select
*
from
bar
.
t1
;
select
*
from
bar
.
t1
;
# Check that LOAD DATA FROM MASTER is able to create master.info
# if needed (if RESET SLAVE was used before), before writing to it (BUG#2922).
stop
slave
;
reset
slave
;
load
data
from
master
;
start
slave
;
# see if replication coordinates were restored fine
connection
master
;
insert
into
bar
.
t1
values
(
5
,
'five bar'
);
save_master_pos
;
connection
slave
;
sync_with_master
;
select
*
from
bar
.
t1
;
# Check that LOAD DATA FROM MASTER reports the error if it can't drop a
# Check that LOAD DATA FROM MASTER reports the error if it can't drop a
# table to be overwritten.
# table to be overwritten.
# DISABLED FOR NOW AS chmod IS NOT PORTABLE ON NON-UNIX
# DISABLED FOR NOW AS chmod IS NOT PORTABLE ON NON-UNIX
...
...
sql/repl_failsafe.cc
View file @
8b623739
...
@@ -874,7 +874,7 @@ int load_master_data(THD* thd)
...
@@ -874,7 +874,7 @@ int load_master_data(THD* thd)
cleanup_mysql_results
(
db_res
,
cur_table_res
-
1
,
table_res
);
cleanup_mysql_results
(
db_res
,
cur_table_res
-
1
,
table_res
);
// adjust
position in
the master
// adjust
replication coordinates from
the master
if
(
master_status_res
)
if
(
master_status_res
)
{
{
MYSQL_ROW
row
=
mc_mysql_fetch_row
(
master_status_res
);
MYSQL_ROW
row
=
mc_mysql_fetch_row
(
master_status_res
);
...
@@ -887,10 +887,18 @@ int load_master_data(THD* thd)
...
@@ -887,10 +887,18 @@ int load_master_data(THD* thd)
*/
*/
if
(
row
&&
row
[
0
]
&&
row
[
1
])
if
(
row
&&
row
[
0
]
&&
row
[
1
])
{
{
/*
If the slave's master info is not inited, we init it, then we write
the new coordinates to it. Must call init_master_info() *before*
setting active_mi, because init_master_info() sets active_mi with
defaults.
*/
if
(
init_master_info
(
active_mi
,
master_info_file
,
relay_log_info_file
,
0
))
send_error
(
&
thd
->
net
,
ER_MASTER_INFO
);
strmake
(
active_mi
->
master_log_name
,
row
[
0
],
strmake
(
active_mi
->
master_log_name
,
row
[
0
],
sizeof
(
active_mi
->
master_log_name
));
sizeof
(
active_mi
->
master_log_name
));
active_mi
->
master_log_pos
=
strtoull
(
row
[
1
],
(
char
**
)
0
,
10
);
active_mi
->
master_log_pos
=
strtoull
(
row
[
1
],
(
char
**
)
0
,
10
);
// don't hit the magic number
// at least in recent versions, the condition below should be false
if
(
active_mi
->
master_log_pos
<
BIN_LOG_HEADER_SIZE
)
if
(
active_mi
->
master_log_pos
<
BIN_LOG_HEADER_SIZE
)
active_mi
->
master_log_pos
=
BIN_LOG_HEADER_SIZE
;
active_mi
->
master_log_pos
=
BIN_LOG_HEADER_SIZE
;
active_mi
->
rli
.
pending
=
0
;
active_mi
->
rli
.
pending
=
0
;
...
...
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