File: install_semisync.inc

package info (click to toggle)
mysql-5.5 5.5.60-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 201,012 kB
  • sloc: cpp: 648,063; ansic: 552,041; perl: 48,017; pascal: 25,099; sh: 15,065; yacc: 13,088; cs: 4,647; xml: 4,178; sql: 3,380; makefile: 1,368; lex: 639; awk: 54
file content (39 lines) | stat: -rw-r--r-- 1,105 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
#
--let $include_filename= install_semisync.inc
--source include/begin_include_file.inc

--source include/not_embedded.inc
--source include/have_semisync_plugin.inc

--connection master

--disable_query_log
--let $value = query_get_value(show variables like 'rpl_semi_sync_master_enabled', Value, 1)
if ($value == No such row)
{
    SET sql_log_bin = 0;
    eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
    SET GLOBAL rpl_semi_sync_master_enabled = 1;
    SET sql_log_bin = 1;
}
--enable_query_log

--connection slave
--source include/stop_slave_io.inc

--disable_query_log
--let $value= query_get_value(show variables like 'rpl_semi_sync_slave_enabled', Value, 1)
if ($value == No such row)
{
    SET sql_log_bin = 0;
    eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
    SET GLOBAL rpl_semi_sync_slave_enabled = 1;
    SET sql_log_bin = 1;
}
START SLAVE IO_THREAD;
--source include/wait_for_slave_io_to_start.inc
--enable_query_log

--source include/end_include_file.inc