mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Safety and speedup fixes:
Changed is_open() to work as before. Added back inited argument to LOG
This commit is contained in:
@@ -269,7 +269,7 @@ int purge_master_logs(THD* thd, const char* to_log)
|
||||
const char* errmsg = 0;
|
||||
int res;
|
||||
|
||||
if (!mysql_bin_log.is_open(1))
|
||||
if (!mysql_bin_log.is_open())
|
||||
goto end;
|
||||
|
||||
mysql_bin_log.make_log_name(search_file_name, to_log);
|
||||
@@ -333,7 +333,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!mysql_bin_log.is_open(1))
|
||||
if (!mysql_bin_log.is_open())
|
||||
{
|
||||
errmsg = "Binary log is not open";
|
||||
my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;
|
||||
@@ -970,7 +970,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
|
||||
|
||||
int reset_master(THD* thd)
|
||||
{
|
||||
if (!mysql_bin_log.is_open(1))
|
||||
if (!mysql_bin_log.is_open())
|
||||
{
|
||||
my_error(ER_FLUSH_MASTER_BINLOG_CLOSED, MYF(ME_BELL+ME_WAITTANG));
|
||||
return 1;
|
||||
@@ -1008,7 +1008,7 @@ int show_binlog_events(THD* thd)
|
||||
if (send_fields(thd, field_list, 1))
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
if (mysql_bin_log.is_open(1))
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
LEX_MASTER_INFO *lex_mi = &thd->lex.mi;
|
||||
ha_rows event_count, limit_start, limit_end;
|
||||
@@ -1108,7 +1108,7 @@ int show_binlog_info(THD* thd)
|
||||
String* packet = &thd->packet;
|
||||
packet->length(0);
|
||||
|
||||
if (mysql_bin_log.is_open(1))
|
||||
if (mysql_bin_log.is_open())
|
||||
{
|
||||
LOG_INFO li;
|
||||
mysql_bin_log.get_current_log(&li);
|
||||
@@ -1146,7 +1146,7 @@ int show_binlogs(THD* thd)
|
||||
String *packet = &thd->packet;
|
||||
uint length;
|
||||
|
||||
if (!mysql_bin_log.is_open(1))
|
||||
if (!mysql_bin_log.is_open())
|
||||
{
|
||||
//TODO: Replace with ER() error message
|
||||
send_error(net, 0, "You are not using binary logging");
|
||||
|
Reference in New Issue
Block a user