Merge naruto.:C:/cpp/bug17733/my50-bug17733

into  naruto.:C:/cpp/bug17733/my51-bug17733
This commit is contained in:
Kristofer.Pettersson@naruto. 2006-12-01 11:17:34 +01:00
commit 70c450a18a
4 changed files with 41 additions and 2 deletions

View file

@ -0,0 +1,24 @@
flush logs;
set global expire_logs_days = 3;
show variables like 'log%';
Variable_name Value
log ON
log_bin OFF
log_bin_trust_function_creators ON
log_error
log_queries_not_using_indexes OFF
log_slave_updates OFF
log_slow_queries OFF
log_warnings 1
flush logs;
show variables like 'log%';
Variable_name Value
log ON
log_bin OFF
log_bin_trust_function_creators ON
log_error
log_queries_not_using_indexes OFF
log_slave_updates OFF
log_slow_queries OFF
log_warnings 1
set global expire_logs_days = 0;

View file

@ -0,0 +1 @@
--disable-log-bin

9
mysql-test/t/flush2.test Normal file
View file

@ -0,0 +1,9 @@
#
# Bug#17733 Flushing logs causes daily server crash
#
flush logs;
set global expire_logs_days = 3;
show variables like 'log%';
flush logs;
show variables like 'log%';
set global expire_logs_days = 0;

View file

@ -4161,6 +4161,7 @@ end_with_restore_list:
bool write_to_binlog;
if (check_global_access(thd,RELOAD_ACL))
goto error;
/*
reload_acl_and_cache() will tell us if we are allowed to write to the
binlog or not.
@ -4181,7 +4182,8 @@ end_with_restore_list:
}
}
send_ok(thd);
}
}
break;
}
case SQLCOM_KILL:
@ -6907,7 +6909,10 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
than it would help them)
*/
tmp_write_to_binlog= 0;
mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
if( mysql_bin_log.is_open() )
{
mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
}
#ifdef HAVE_REPLICATION
pthread_mutex_lock(&LOCK_active_mi);
rotate_relay_log(active_mi);