Backport from the Falcon tree.

When opening/creating the transaction coordinator's log, if binlog is
used, the tc log is the binlog so we use the binlog's name; otherwise
we use the mmap-based log, named after the mandatory argument of the
--log-tc option (meant for that).
parent 8b1609a6
......@@ -2523,7 +2523,7 @@ int TC_LOG_MMAP::open(const char *opt_name)
goto err;
if (using_heuristic_recover())
return 1;
if ((fd= my_create(logname, O_RDWR, 0, MYF(MY_WME))) < 0)
if ((fd= my_create(logname, CREATE_MODE, O_RDWR, MYF(MY_WME))) < 0)
goto err;
inited=1;
file_length= opt_tc_log_size;
......
......@@ -3171,7 +3171,7 @@ server.");
(TC_LOG *) &tc_log_mmap) :
(TC_LOG *) &tc_log_dummy);
if (tc_log->open(opt_bin_logname))
if (tc_log->open(opt_bin_log ? opt_bin_logname : opt_tc_log_file))
{
sql_print_error("Can't init tc log");
unireg_abort(1);
......
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