MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
save_io_thread_pos.inc
1 # ==== Purpose ====
2 #
3 # Save the current position of the IO thread, just like
4 # save_master_pos.inc does for the master's position.
5 #
6 #
7 # ==== Usage ====
8 #
9 # [--let $use_gtids= 1]
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 #
18 # $use_gtids
19 # By default, this script saves the binlog file and offset. If
20 # $use_gtids is set, this script saves the gtids.
21 #
22 # $rpl_debug
23 # See include/rpl_init.inc
24 
25 
26 --let $include_filename= save_io_thread_pos.inc
27 --source include/begin_include_file.inc
28 
29 if ($use_gtids)
30 {
31  --let $_saved_gtids= query_get_value(SHOW SLAVE STATUS, Retrieved_Gtid_set, 1)
32  if ($rpl_debug)
33  {
34  --echo save_io_thread_pos.inc saved gtid='$_saved_gtids'
35  }
36 }
37 if (!$use_gtids)
38 {
39  --let $_saved_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1)
40  --let $_saved_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1)
41 
42  if ($rpl_debug)
43  {
44  --echo save_io_thread_pos.inc saved file='$_saved_file', pos='$_saved_pos'
45  }
46 }
47 
48 --let $include_filename= save_io_thread_pos.inc
49 --source include/end_include_file.inc