~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/mysqld.cc

  • Committer: Brian Aker
  • Date: 2008-07-08 00:23:50 UTC
  • Revision ID: brian@tangent.org-20080708002350-5qc0z47769sw67sg
RemovedĀ opt_update_log

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
 
243
243
/* Global variables */
244
244
 
245
 
bool opt_update_log, opt_bin_log;
 
245
bool opt_bin_log;
246
246
my_bool opt_log, opt_slow_log;
247
247
ulong log_output_options;
248
248
my_bool opt_log_queries_not_using_indexes= 0;
460
460
static my_bool opt_bootstrap, opt_myisam_log;
461
461
static int cleanup_done;
462
462
static ulong opt_specialflag, opt_myisam_block_size;
463
 
static char *opt_update_logname, *opt_binlog_index_name;
 
463
static char *opt_binlog_index_name;
464
464
static char *opt_tc_heuristic_recover;
465
465
static char *mysql_home_ptr, *pidfile_name_ptr;
466
466
static int defaults_argc;
2482
2482
    unireg_abort(1);
2483
2483
  }
2484
2484
 
2485
 
  /* need to configure logging before initializing storage engines */
2486
 
  if (opt_update_log)
2487
 
  {
2488
 
    /*
2489
 
      Update log is removed since 5.0. But we still accept the option.
2490
 
      The idea is if the user already uses the binlog and the update log,
2491
 
      we completely ignore any option/variable related to the update log, like
2492
 
      if the update log did not exist. But if the user uses only the update
2493
 
      log, then we translate everything into binlog for him (with warnings).
2494
 
      Implementation of the above :
2495
 
      - If mysqld is started with --log-update and --log-bin,
2496
 
      ignore --log-update (print a warning), push a warning when SQL_LOG_UPDATE
2497
 
      is used, and turn off --sql-bin-update-same.
2498
 
      This will completely ignore SQL_LOG_UPDATE
2499
 
      - If mysqld is started with --log-update only,
2500
 
      change it to --log-bin (with the filename passed to log-update,
2501
 
      plus '-bin') (print a warning), push a warning when SQL_LOG_UPDATE is
2502
 
      used, and turn on --sql-bin-update-same.
2503
 
      This will translate SQL_LOG_UPDATE to SQL_LOG_BIN.
2504
 
 
2505
 
      Note that we tell the user that --sql-bin-update-same is deprecated and
2506
 
      does nothing, and we don't take into account if he used this option or
2507
 
      not; but internally we give this variable a value to have the behaviour
2508
 
      we want (i.e. have SQL_LOG_UPDATE influence SQL_LOG_BIN or not).
2509
 
      As sql-bin-update-same, log-update and log-bin cannot be changed by the
2510
 
      user after starting the server (they are not variables), the user will
2511
 
      not later interfere with the settings we do here.
2512
 
    */
2513
 
    if (opt_bin_log)
2514
 
    {
2515
 
      opt_sql_bin_update= 0;
2516
 
      sql_print_error("The update log is no longer supported by MySQL in \
2517
 
version 5.0 and above. It is replaced by the binary log.");
2518
 
    }
2519
 
    else
2520
 
    {
2521
 
      opt_sql_bin_update= 1;
2522
 
      opt_bin_log= 1;
2523
 
      if (opt_update_logname)
2524
 
      {
2525
 
        /* as opt_bin_log==0, no need to free opt_bin_logname */
2526
 
        if (!(opt_bin_logname= my_strdup(opt_update_logname, MYF(MY_WME))))
2527
 
          exit(EXIT_OUT_OF_MEMORY);
2528
 
        sql_print_error("The update log is no longer supported by MySQL in \
2529
 
version 5.0 and above. It is replaced by the binary log. Now starting MySQL \
2530
 
with --log-bin='%s' instead.",opt_bin_logname);
2531
 
      }
2532
 
      else
2533
 
        sql_print_error("The update log is no longer supported by MySQL in \
2534
 
version 5.0 and above. It is replaced by the binary log. Now starting MySQL \
2535
 
with --log-bin instead.");
2536
 
    }
2537
 
  }
2538
 
  if (opt_log_slave_updates && !opt_bin_log)
2539
 
  {
2540
 
    sql_print_error("You need to use --log-bin to make "
2541
 
                    "--log-slave-updates work.");
2542
 
    unireg_abort(1);
2543
 
  }
2544
2485
  if (!opt_bin_log)
2545
2486
    if (opt_binlog_format_id != BINLOG_FORMAT_UNSPEC)
2546
 
  {
2547
 
    sql_print_error("You need to use --log-bin to make "
2548
 
                    "--binlog-format work.");
2549
 
    unireg_abort(1);
2550
 
  }
 
2487
    {
 
2488
      sql_print_error("You need to use --log-bin to make "
 
2489
                      "--binlog-format work.");
 
2490
      unireg_abort(1);
 
2491
    }
2551
2492
    else
2552
 
  {
 
2493
    {
2553
2494
      global_system_variables.binlog_format= BINLOG_FORMAT_MIXED;
2554
2495
    }
2555
2496
  else
3562
3503
   REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ULONG_MAX, 0,
3563
3504
   TC_LOG_PAGE_SIZE, 0},
3564
3505
#endif
3565
 
  {"log-update", OPT_UPDATE_LOG,
3566
 
   "The update log is deprecated since version 5.0, is replaced by the binary \
3567
 
log and this option justs turns on --log-bin instead.",
3568
 
   (uchar**) &opt_update_logname, (uchar**) &opt_update_logname, 0, GET_STR,
3569
 
   OPT_ARG, 0, 0, 0, 0, 0, 0},
3570
3506
  {"log-warnings", 'W', "Log some not critical warnings to the log file.",
3571
3507
   (uchar**) &global_system_variables.log_warnings,
3572
3508
   (uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, 1, 0, 0,
4448
4384
  opt_skip_slave_start= opt_reckless_slave = 0;
4449
4385
  mysql_home[0]= pidfile_name[0]= log_error_file[0]= 0;
4450
4386
  opt_log= opt_slow_log= 0;
4451
 
  opt_update_log= 0;
4452
4387
  log_output_options= find_bit_type(log_output_str, &log_output_typelib);
4453
4388
  opt_bin_log= 0;
4454
4389
  opt_disable_networking= opt_skip_show_db=0;
4455
 
  opt_logname= opt_update_logname= opt_binlog_index_name= opt_slow_logname= 0;
 
4390
  opt_logname= opt_binlog_index_name= opt_slow_logname= 0;
4456
4391
  opt_tc_log_file= (char *)"tc.log";      // no hostname in tc_log file name !
4457
4392
  opt_secure_auth= 0;
4458
4393
  opt_secure_file_priv= 0;
4661
4596
  case (int) OPT_ISAM_LOG:
4662
4597
    opt_myisam_log=1;
4663
4598
    break;
4664
 
  case (int) OPT_UPDATE_LOG:
4665
 
    opt_update_log=1;
4666
 
    break;
4667
4599
  case (int) OPT_BIN_LOG:
4668
4600
    opt_bin_log= test(argument != disabled_my_option);
4669
4601
    break;
5096
5028
  if (!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug"))
5097
5029
    end= strmov(end, "-debug");
5098
5030
#endif
5099
 
  if (opt_log || opt_update_log || opt_slow_log || opt_bin_log)
 
5031
  if (opt_log || opt_slow_log || opt_bin_log)
5100
5032
    strmov(end, "-log");                        // This may slow down system
5101
5033
}
5102
5034