summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2016-10-16 23:44:44 +0200
committerKristian Nielsen <knielsen@knielsen-hq.org>2016-10-16 23:44:44 +0200
commite1ef99c3dcb8bb6fdea290e319d14f5a983d1785 (patch)
tree6118948d076e16868b46bc8b14646eee4de610da /sql/sql_lex.h
parent057c560ee45c61d172ed0ed762b0b33b37349e5c (diff)
parentfb13616518975b84eea9b9e0d5a91122bb1abe7a (diff)
downloadmariadb-git-e1ef99c3dcb8bb6fdea290e319d14f5a983d1785.tar.gz
MDEV-7145: Delayed replication
Merge feature into 10.2 from feature branch. Delayed replication adds an option CHANGE MASTER TO master_delay=<seconds> Replication will then delay applying events with that many seconds. This creates a replication slave that reflects the state of the master some time in the past. Feature is ported from MySQL source tree. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 63feef92445..e5f77b23e55 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -246,11 +246,12 @@ struct LEX_MASTER_INFO
ulong server_id;
uint port, connect_retry;
float heartbeat_period;
+ int sql_delay;
/*
Enum is used for making it possible to detect if the user
changed variable or if it should be left at old value
*/
- enum {LEX_MI_UNCHANGED, LEX_MI_DISABLE, LEX_MI_ENABLE}
+ enum {LEX_MI_UNCHANGED= 0, LEX_MI_DISABLE, LEX_MI_ENABLE}
ssl, ssl_verify_server_cert, heartbeat_opt, repl_ignore_server_ids_opt,
repl_do_domain_ids_opt, repl_ignore_domain_ids_opt;
enum {
@@ -266,6 +267,7 @@ struct LEX_MASTER_INFO
sizeof(ulong), 0, 16, MYF(0));
my_init_dynamic_array(&repl_ignore_domain_ids,
sizeof(ulong), 0, 16, MYF(0));
+ sql_delay= -1;
}
void reset(bool is_change_master)
{
@@ -286,6 +288,7 @@ struct LEX_MASTER_INFO
repl_ignore_domain_ids_opt= LEX_MI_UNCHANGED;
gtid_pos_str= null_lex_str;
use_gtid_opt= LEX_GTID_UNCHANGED;
+ sql_delay= -1;
}
};