mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Made max_relay_log_size depending on master connection.
Changed names of multi-source log files so that original suffixes are kept. include/my_sys.h: Added fn_ext2(), which returns pointer to last '.' in file name mysql-test/extra/rpl_tests/rpl_max_relay_size.test: Updated test mysql-test/suite/multi_source/info_logs-master.opt: Test with strange file names mysql-test/suite/multi_source/info_logs.result: Updated results mysql-test/suite/multi_source/info_logs.test: Changed to test with complex names to be able to verify the filename generator code mysql-test/suite/multi_source/relaylog_events.result: Updated results mysql-test/suite/multi_source/reset_slave.result: Updated results mysql-test/suite/multi_source/skip_counter.result: Updated results mysql-test/suite/multi_source/skip_counter.test: Added testing of max_relay_log_size mysql-test/suite/rpl/r/rpl_row_max_relay_size.result: Updated results mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result: Updated results mysql-test/suite/sys_vars/r/max_relay_log_size_basic.result: Updated results mysql-test/suite/sys_vars/t/max_relay_log_size_basic.test: Updated results mysys/mf_fn_ext.c: Added fn_ext2(), which returns pointer to last '.' in file name sql/log.cc: Removed some wrong casts sql/log.h: Updated comment to reflect new code sql/log_event.cc: Updated DBUG_PRINT sql/mysqld.cc: Added that max_relay_log_size copies it's values from max_binlog_size sql/mysqld.h: Removed max_relay_log_size sql/rpl_mi.cc: Changed names of multi-source log files so that original suffixes are kept. sql/rpl_mi.h: Updated prototype sql/rpl_rli.cc: Updated comment to reflect new code Made max_relay_log_size depending on master connection. sql/rpl_rli.h: Made max_relay_log_size depending on master connection. sql/set_var.h: Made option global so that one can check and change min & max values (sorry Sergei) sql/sql_class.h: Made max_relay_log_size depending on master connection. sql/sql_repl.cc: Updated calls to create_signed_file_name() sql/sys_vars.cc: Made max_relay_log_size depending on master connection. Made old code more reusable sql/sys_vars.h: Changed Sys_var_multi_source_uint to ulong to be able to handle max_relay_log_size Made old code more reusable
This commit is contained in:
@ -1308,10 +1308,10 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
|
||||
|
||||
create_signed_file_name(master_info_file_tmp,
|
||||
sizeof(master_info_file_tmp),
|
||||
master_info_file, '.', &mi->connection_name);
|
||||
master_info_file, 0, &mi->connection_name);
|
||||
create_signed_file_name(relay_log_info_file_tmp,
|
||||
sizeof(relay_log_info_file_tmp),
|
||||
relay_log_info_file, '.', &mi->connection_name);
|
||||
relay_log_info_file, 0, &mi->connection_name);
|
||||
|
||||
if (check_access(thd, SUPER_ACL, any_db, NULL, NULL, 0, 0))
|
||||
DBUG_RETURN(1);
|
||||
@ -1557,10 +1557,10 @@ int reset_slave(THD *thd, Master_info* mi)
|
||||
// and delete these two files
|
||||
create_signed_file_name(master_info_file_tmp,
|
||||
sizeof(master_info_file_tmp),
|
||||
master_info_file, '.', &mi->connection_name);
|
||||
master_info_file, 0, &mi->connection_name);
|
||||
create_signed_file_name(relay_log_info_file_tmp,
|
||||
sizeof(relay_log_info_file_tmp),
|
||||
relay_log_info_file, '.', &mi->connection_name);
|
||||
relay_log_info_file, 0, &mi->connection_name);
|
||||
|
||||
fn_format(fname, master_info_file_tmp, mysql_data_home, "", 4+32);
|
||||
if (mysql_file_stat(key_file_master_info, fname, &stat_area, MYF(0)) &&
|
||||
@ -1697,10 +1697,10 @@ bool change_master(THD* thd, Master_info* mi)
|
||||
|
||||
create_signed_file_name(master_info_file_tmp,
|
||||
sizeof(master_info_file_tmp),
|
||||
master_info_file, '.', &mi->connection_name);
|
||||
master_info_file, 0, &mi->connection_name);
|
||||
create_signed_file_name(relay_log_info_file_tmp,
|
||||
sizeof(relay_log_info_file_tmp),
|
||||
relay_log_info_file, '.', &mi->connection_name);
|
||||
relay_log_info_file, 0, &mi->connection_name);
|
||||
|
||||
/* if new Master_info doesn't exists, add it */
|
||||
if (!master_info_index->get_master_info(&mi->connection_name,
|
||||
|
Reference in New Issue
Block a user