1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixes to get all test to run on MacosX Lion 10.7

This includes fixing all utilities to not have any memory leaks,
as safemalloc warnings stopped tests from passing on MacOSX.

- Ensure that all clients takes character-set-dir, as the
  libmysqlclient library will use it.
- mysql-test-run now passes character-set-dir to all external clients.
- Changed dynstr_free() so that it can be called twice (made freeing code easier)
- Changed rpl_global_gtid_slave_state to be allocated dynamicly as it
  includes a mutex that needs to be initizlied/destroyed before my_end() is called.
- Removed rpl_slave_state::init() and rpl_slave_stage::deinit() as
  their job are better handling by constructor and delete.
- Print alias instead of table_name in check_duplicate_key as
  table_name may have been converted to lower case.

Other things:
- Fixed a case in time_to_datetime_with_warn() where we where
  using && instead of & in tests
This commit is contained in:
Monty
2015-11-29 17:51:23 +02:00
parent 654547b5b4
commit c3018b0ff4
34 changed files with 368 additions and 257 deletions

View File

@ -986,8 +986,8 @@ check_slave_start_position(binlog_send_info *info, const char **errormsg,
rpl_gtid master_replication_gtid;
rpl_gtid start_gtid;
bool start_at_own_slave_pos=
rpl_global_gtid_slave_state.domain_to_gtid(slave_gtid->domain_id,
&master_replication_gtid) &&
rpl_global_gtid_slave_state->domain_to_gtid(slave_gtid->domain_id,
&master_replication_gtid) &&
slave_gtid->server_id == master_replication_gtid.server_id &&
slave_gtid->seq_no == master_replication_gtid.seq_no;
@ -4032,14 +4032,14 @@ int log_loaded_block(IO_CACHE* file)
void
rpl_init_gtid_slave_state()
{
rpl_global_gtid_slave_state.init();
rpl_global_gtid_slave_state= new rpl_slave_state;
}
void
rpl_deinit_gtid_slave_state()
{
rpl_global_gtid_slave_state.deinit();
delete rpl_global_gtid_slave_state;
}
@ -4075,7 +4075,7 @@ rpl_append_gtid_state(String *dest, bool use_binlog)
(err= mysql_bin_log.get_most_recent_gtid_list(&gtid_list, &num_gtids)))
return err;
err= rpl_global_gtid_slave_state.tostring(dest, gtid_list, num_gtids);
err= rpl_global_gtid_slave_state->tostring(dest, gtid_list, num_gtids);
my_free(gtid_list);
return err;
@ -4100,7 +4100,7 @@ rpl_load_gtid_state(slave_connection_state *state, bool use_binlog)
(err= mysql_bin_log.get_most_recent_gtid_list(&gtid_list, &num_gtids)))
return err;
err= state->load(&rpl_global_gtid_slave_state, gtid_list, num_gtids);
err= state->load(rpl_global_gtid_slave_state, gtid_list, num_gtids);
my_free(gtid_list);
return err;
@ -4197,7 +4197,7 @@ rpl_gtid_pos_check(THD *thd, char *str, size_t len)
bool
rpl_gtid_pos_update(THD *thd, char *str, size_t len)
{
if (rpl_global_gtid_slave_state.load(thd, str, len, true, true))
if (rpl_global_gtid_slave_state->load(thd, str, len, true, true))
{
my_error(ER_FAILED_GTID_STATE_INIT, MYF(0));
return true;