1# ==== Purpose ====
2#
3# Save the current binlog position on the master, just like the
4# built-in mysqltest command save_master_pos.  The advantage of this
5# script is that the saved position is available to the test script.
6#
7#
8# ==== Usage ====
9#
10# [--let $rpl_debug= 1]
11# --source include/save_master_pos.inc
12#
13# Typically, you would use this script together with
14# include/sync_io_with_master.inc
15#
16# Parameters:
17#   $rpl_debug
18#     See include/rpl_init.inc
19
20
21--let $include_filename= save_master_pos.inc
22--source include/begin_include_file.inc
23
24let $_master_file= query_get_value("SHOW MASTER STATUS", File, 1);
25let $_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1);
26
27if ($rpl_debug)
28{
29  --echo save_master_pos saved file='$_master_file', pos='$_master_pos'
30}
31
32--let $include_filename= save_master_pos.inc
33--source include/end_include_file.inc
34