Commit 9dfb1d90 authored by unknown's avatar unknown

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).


sql/log.cc:
  fixing wrong order of arguments to my_create()
  (3rd param is the desired modes of the file; "0" lead to no rights
  for anybody on the file).
sql/mysqld.cc:
  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 f6834c02
...@@ -2523,7 +2523,7 @@ int TC_LOG_MMAP::open(const char *opt_name) ...@@ -2523,7 +2523,7 @@ int TC_LOG_MMAP::open(const char *opt_name)
goto err; goto err;
if (using_heuristic_recover()) if (using_heuristic_recover())
return 1; 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; goto err;
inited=1; inited=1;
file_length= opt_tc_log_size; file_length= opt_tc_log_size;
......
...@@ -3171,7 +3171,7 @@ server."); ...@@ -3171,7 +3171,7 @@ server.");
(TC_LOG *) &tc_log_mmap) : (TC_LOG *) &tc_log_mmap) :
(TC_LOG *) &tc_log_dummy); (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"); sql_print_error("Can't init tc log");
unireg_abort(1); 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