mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Safety and speedup fixes:
Changed is_open() to work as before. Added back inited argument to LOG mysql-test/r/rpl_flush_log_loop.result: Fixed results (probably bug in previous rpatch) sql/handler.cc: Changed is_open() to work as before sql/item_func.cc: Changed is_open() to work as before sql/log.cc: Part revert of previous patch. The reason for adding back 'inited' is that is that we can't be 100 % sure that init_pthread_objects() is called before mysqld dies (for example on windows) I removed mutex lock handling in is_open() as the new code didn't have ANY affect except beeing slower. Added back checking of is_open() to some functions as we don't want to do a mutex lock when we are not using logging. Indentation/comment fixes sql/log_event.cc: Changed is_open() to work as before sql/repl_failsafe.cc: Changed is_open() to work as before sql/sql_base.cc: Changed is_open() to work as before sql/sql_class.h: Changed is_open() to work as before. Added back 'inited' variable sql/sql_db.cc: Changed is_open() to work as before sql/sql_delete.cc: Changed is_open() to work as before sql/sql_insert.cc: Changed is_open() to work as before sql/sql_load.cc: Changed is_open() to work as before sql/sql_parse.cc: Changed is_open() to work as before sql/sql_rename.cc: Changed is_open() to work as before sql/sql_repl.cc: Changed is_open() to work as before sql/sql_table.cc: Changed is_open() to work as before sql/sql_update.cc: Changed is_open() to work as before
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