Commit 54ffc499 authored by mkaruza's avatar mkaruza Committed by Jan Lindström

MDEV-18588 Segfault during SST on joiner with bin-log, no bin-log-index

When node is JOINER and bin-log is enabled but bin-log-index is not set in configuration, we use NULL pointer which causes segfault. 
Fixed by checking for NULL pointer before using variable.
parent 32202277
......@@ -337,7 +337,7 @@ static int generate_binlog_index_opt_val(char** ret)
{
DBUG_ASSERT(ret);
*ret= NULL;
if (opt_bin_log)
if (opt_binlog_index_name)
{
*ret= strcmp(opt_binlog_index_name, "0") ?
my_strdup(opt_binlog_index_name, MYF(0)) : my_strdup("", MYF(0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment