Commit 9dfb1d90 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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);