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);
2485
/* need to configure logging before initializing storage engines */
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.
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.
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.");
2521
opt_sql_bin_update= 1;
2523
if (opt_update_logname)
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);
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.");
2538
if (opt_log_slave_updates && !opt_bin_log)
2540
sql_print_error("You need to use --log-bin to make "
2541
"--log-slave-updates work.");
2544
2485
if (!opt_bin_log)
2545
2486
if (opt_binlog_format_id != BINLOG_FORMAT_UNSPEC)
2547
sql_print_error("You need to use --log-bin to make "
2548
"--binlog-format work.");
2488
sql_print_error("You need to use --log-bin to make "
2489
"--binlog-format work.");
2553
2494
global_system_variables.binlog_format= BINLOG_FORMAT_MIXED;
3562
3503
REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ULONG_MAX, 0,
3563
3504
TC_LOG_PAGE_SIZE, 0},
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;
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;