summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-10-04 13:32:38 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-10-04 13:32:38 +0200
commitbb76dcbec77d31818ec7dfc0d0dc1f4b49185bc5 (patch)
tree0c288f685ac6fbc8d4bd4cdbc60bcf9942f019f7 /sql/sql_repl.cc
parent1ac8149b83f002cd4754e1eca225560bc02b22e4 (diff)
parent55e07d9ade51e9e969f528d903509806142f4d1e (diff)
downloadmariadb-git-bb76dcbec77d31818ec7dfc0d0dc1f4b49185bc5.tar.gz
Merge branch '10.9' into 10.10
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 352d5ab8ae9..d338dc302e6 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2008, 2020, MariaDB Corporation
+ Copyright (c) 2008, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2876,6 +2876,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
info->error= ER_UNKNOWN_ERROR;
goto err;
}
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("simulate_delay_at_shutdown",
{
const char act[]=
@@ -2884,6 +2885,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
DBUG_ASSERT(!debug_sync_set_action(thd,
STRING_WITH_LEN(act)));
};);
+#endif
/*
heartbeat_period from @master_heartbeat_period user variable
@@ -2973,12 +2975,14 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
if (should_stop(info))
break;
+#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("wait_after_binlog_EOF",
{
const char act[]= "now wait_for signal.rotate_finished";
DBUG_ASSERT(!debug_sync_set_action(current_thd,
STRING_WITH_LEN(act)));
};);
+#endif
THD_STAGE_INFO(thd,
stage_finished_reading_one_binlog_switching_to_next_binlog);
@@ -4203,7 +4207,7 @@ bool mysql_show_binlog_events(THD* thd)
binlog_size= s.st_size;
if (lex_mi->pos > binlog_size)
{
- sprintf(errmsg_buf, "Invalid pos specified. Requested from pos:%llu is "
+ snprintf(errmsg_buf, sizeof(errmsg_buf), "Invalid pos specified. Requested from pos:%llu is "
"greater than actual file size:%lu\n", lex_mi->pos,
(ulong)s.st_size);
errmsg= errmsg_buf;