diff options
author | Monty <monty@mariadb.org> | 2015-11-29 17:51:23 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2015-11-29 17:51:23 +0200 |
commit | c3018b0ff4fb02c029787d03867adf0530607bab (patch) | |
tree | c3497838c222af9445a16312ecbd0e78ebc62f66 /sql/slave.cc | |
parent | 654547b5b4b21aec719a84149595464364c96eea (diff) | |
download | mariadb-git-c3018b0ff4fb02c029787d03867adf0530607bab.tar.gz |
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
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index f1ca76d1692..3f8bc066378 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2185,8 +2185,8 @@ after_set_capability: (master_row= mysql_fetch_row(master_res)) && (master_row[0] != NULL)) { - rpl_global_gtid_slave_state.load(mi->io_thd, master_row[0], - strlen(master_row[0]), false, false); + rpl_global_gtid_slave_state->load(mi->io_thd, master_row[0], + strlen(master_row[0]), false, false); } else if (check_io_slave_killed(mi, NULL)) goto slave_killed_err; @@ -2496,7 +2496,7 @@ bool show_master_info(THD *thd, Master_info *mi, bool full) DBUG_ENTER("show_master_info"); String gtid_pos; - if (full && rpl_global_gtid_slave_state.tostring(>id_pos, NULL, 0)) + if (full && rpl_global_gtid_slave_state->tostring(>id_pos, NULL, 0)) DBUG_RETURN(TRUE); if (send_show_master_info_header(thd, full, gtid_pos.length())) DBUG_RETURN(TRUE); @@ -3593,7 +3593,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, if (opt_gtid_ignore_duplicates) { - int res= rpl_global_gtid_slave_state.check_duplicate_gtid + int res= rpl_global_gtid_slave_state->check_duplicate_gtid (&serial_rgi->current_gtid, serial_rgi); if (res < 0) { @@ -4548,7 +4548,7 @@ pthread_handler_t handle_slave_sql(void *arg) It will then be updated as required by GTID and GTID_LIST events found while applying events read from relay logs. */ - rli->relay_log_state.load(&rpl_global_gtid_slave_state); + rli->relay_log_state.load(rpl_global_gtid_slave_state); } rli->gtid_skip_flag = GTID_SKIP_NOT; if (init_relay_log_pos(rli, @@ -4779,9 +4779,9 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME, To handle this when we restart the SQL thread, mark the current per-domain position in the Relay_log_info. */ - mysql_mutex_lock(&rpl_global_gtid_slave_state.LOCK_slave_state); - domain_count= rpl_global_gtid_slave_state.count(); - mysql_mutex_unlock(&rpl_global_gtid_slave_state.LOCK_slave_state); + mysql_mutex_lock(&rpl_global_gtid_slave_state->LOCK_slave_state); + domain_count= rpl_global_gtid_slave_state->count(); + mysql_mutex_unlock(&rpl_global_gtid_slave_state->LOCK_slave_state); if (domain_count > 1) { inuse_relaylog *ir; @@ -4792,7 +4792,7 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME, the relay log back to a known safe place to start (prior to any not yet applied transaction in any domain). */ - rli->restart_gtid_pos.load(&rpl_global_gtid_slave_state, NULL, 0); + rli->restart_gtid_pos.load(rpl_global_gtid_slave_state, NULL, 0); if ((ir= rli->inuse_relaylog_list)) { rpl_gtid *gtid= ir->relay_log_state; |