mirror of
https://github.com/MariaDB/server.git
synced 2026-04-18 06:15:32 +02:00
automerging bugfixes in latest mysql-trunk-bugfixing.
This commit is contained in:
commit
31e46bae52
3 changed files with 24 additions and 1 deletions
|
|
@ -2032,6 +2032,7 @@ int main(int argc, char** argv)
|
|||
{
|
||||
usage();
|
||||
free_defaults(defaults_argv);
|
||||
my_thread_end();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,29 @@ int init_master_info(Master_info* mi, const char* master_info_fname,
|
|||
*/
|
||||
if (thread_mask & SLAVE_SQL)
|
||||
{
|
||||
bool hot_log= FALSE;
|
||||
/*
|
||||
my_b_seek does an implicit flush_io_cache, so we need to:
|
||||
|
||||
1. check if this log is active (hot)
|
||||
2. if it is we keep log_lock until the seek ends, otherwise
|
||||
release it right away.
|
||||
|
||||
If we did not take log_lock, SQL thread might race with IO
|
||||
thread for the IO_CACHE mutex.
|
||||
|
||||
*/
|
||||
mysql_mutex_t *log_lock= mi->rli.relay_log.get_log_lock();
|
||||
mysql_mutex_lock(log_lock);
|
||||
hot_log= mi->rli.relay_log.is_active(mi->rli.linfo.log_file_name);
|
||||
|
||||
if (!hot_log)
|
||||
mysql_mutex_unlock(log_lock);
|
||||
|
||||
my_b_seek(mi->rli.cur_log, (my_off_t) 0);
|
||||
|
||||
if (hot_log)
|
||||
mysql_mutex_unlock(log_lock);
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2202,7 +2202,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
|
|||
if (some_tables_deleted || tmp_table_deleted || !error)
|
||||
{
|
||||
query_cache_invalidate3(thd, tables, 0);
|
||||
if (!dont_log_query)
|
||||
if (!dont_log_query && mysql_bin_log.is_open())
|
||||
{
|
||||
if (!thd->is_current_stmt_binlog_format_row() ||
|
||||
(non_temp_tables_count > 0 && !tmp_table_deleted))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue