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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7c911106
Commit
7c911106
authored
Apr 12, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new files
parent
10692ba8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
mysql-test/include/master-slave-end.inc
mysql-test/include/master-slave-end.inc
+6
-0
mysql-test/include/ndb_setup_slave.inc
mysql-test/include/ndb_setup_slave.inc
+27
-0
No files found.
mysql-test/include/master-slave-end.inc
0 → 100644
View file @
7c911106
--
connection
master
--
sync_slave_with_master
--
connection
slave
--
disable_query_log
STOP
SLAVE
;
--
enable_query_log
mysql-test/include/ndb_setup_slave.inc
0 → 100644
View file @
7c911106
#
# now setup replication to continue from last epoch
# 1. get apply_status epoch from slave
# 2. get corresponding _next_ binlog postition from master
# 3. change master on slave
# 1.
--
connection
slave
--
replace_column
1
<
the_epoch
>
SELECT
@
the_epoch
:=
MAX
(
epoch
)
FROM
cluster
.
apply_status
;
--
let
$the_epoch
=
`select @the_epoch`
# 2.
--
connection
master
--
replace_result
$the_epoch
<
the_epoch
>
--
replace_column
1
<
the_pos
>
eval
SELECT
@
the_pos
:=
Position
,
@
the_file
:=
SUBSTRING_INDEX
(
FILE
,
'/'
,
-
1
)
FROM
cluster
.
binlog_index
WHERE
epoch
>
$the_epoch
ORDER
BY
epoch
ASC
LIMIT
1
;
--
let
$the_pos
=
`SELECT @the_pos`
--
let
$the_file
=
`SELECT @the_file`
# 3.
--
connection
slave
--
replace_result
$the_pos
<
the_pos
>
eval
CHANGE
MASTER
TO
master_log_file
=
'$the_file'
,
master_log_pos
=
$the_pos
;
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