mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge from 5.1 to 5.5
This commit is contained in:
@ -792,8 +792,11 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
ce->print(result_file, print_event_info, TRUE);
|
ce->print(result_file, print_event_info, TRUE);
|
||||||
|
if (head->error == -1)
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
// If this binlog is not 3.23 ; why this test??
|
// If this binlog is not 3.23 ; why this test??
|
||||||
if (glob_description_event->binlog_version >= 3)
|
if (glob_description_event->binlog_version >= 3)
|
||||||
{
|
{
|
||||||
@ -844,6 +847,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
|||||||
ce->print(result_file, print_event_info, TRUE);
|
ce->print(result_file, print_event_info, TRUE);
|
||||||
my_free((void*)ce->fname);
|
my_free((void*)ce->fname);
|
||||||
delete ce;
|
delete ce;
|
||||||
|
if (head->error == -1)
|
||||||
|
goto err;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
warning("Ignoring Execute_load_log_event as there is no "
|
warning("Ignoring Execute_load_log_event as there is no "
|
||||||
@ -904,6 +909,12 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
|||||||
{
|
{
|
||||||
convert_path_to_forward_slashes(fname);
|
convert_path_to_forward_slashes(fname);
|
||||||
exlq->print(result_file, print_event_info, fname);
|
exlq->print(result_file, print_event_info, fname);
|
||||||
|
if (head->error == -1)
|
||||||
|
{
|
||||||
|
if (fname)
|
||||||
|
my_free(fname);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
warning("Ignoring Execute_load_query since there is no "
|
warning("Ignoring Execute_load_query since there is no "
|
||||||
|
@ -433,7 +433,11 @@ process_flags:
|
|||||||
memset(buffz, '0', minimum_width - length2);
|
memset(buffz, '0', minimum_width - length2);
|
||||||
else
|
else
|
||||||
memset(buffz, ' ', minimum_width - length2);
|
memset(buffz, ' ', minimum_width - length2);
|
||||||
my_b_write(info, buffz, minimum_width - length2);
|
if (my_b_write(info, buffz, minimum_width - length2))
|
||||||
|
{
|
||||||
|
my_afree(buffz);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
my_afree(buffz);
|
my_afree(buffz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2762,7 +2762,10 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
|
|||||||
{
|
{
|
||||||
end= strxmov(buff, "# administrator command: ", NullS);
|
end= strxmov(buff, "# administrator command: ", NullS);
|
||||||
buff_len= (ulong) (end - buff);
|
buff_len= (ulong) (end - buff);
|
||||||
my_b_write(&log_file, (uchar*) buff, buff_len);
|
DBUG_EXECUTE_IF("simulate_slow_log_write_error",
|
||||||
|
{DBUG_SET("+d,simulate_file_write_error");});
|
||||||
|
if(my_b_write(&log_file, (uchar*) buff, buff_len))
|
||||||
|
tmp_errno= errno;
|
||||||
}
|
}
|
||||||
if (my_b_write(&log_file, (uchar*) sql_text, sql_text_len) ||
|
if (my_b_write(&log_file, (uchar*) sql_text, sql_text_len) ||
|
||||||
my_b_write(&log_file, (uchar*) ";\n",2) ||
|
my_b_write(&log_file, (uchar*) ";\n",2) ||
|
||||||
|
@ -6470,6 +6470,13 @@ void Create_file_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info
|
|||||||
{
|
{
|
||||||
Load_log_event::print(file, print_event_info,
|
Load_log_event::print(file, print_event_info,
|
||||||
!check_fname_outside_temp_buf());
|
!check_fname_outside_temp_buf());
|
||||||
|
/**
|
||||||
|
reduce the size of io cache so that the write function is called
|
||||||
|
for every call to my_b_printf().
|
||||||
|
*/
|
||||||
|
DBUG_EXECUTE_IF ("simulate_create_event_write_error",
|
||||||
|
{(&cache)->write_pos= (&cache)->write_end;
|
||||||
|
DBUG_SET("+d,simulate_file_write_error");});
|
||||||
/*
|
/*
|
||||||
That one is for "file_id: etc" below: in mysqlbinlog we want the #, in
|
That one is for "file_id: etc" below: in mysqlbinlog we want the #, in
|
||||||
SHOW BINLOG EVENTS we don't.
|
SHOW BINLOG EVENTS we don't.
|
||||||
@ -7161,6 +7168,13 @@ void Execute_load_query_log_event::print(FILE* file,
|
|||||||
Write_on_release_cache cache(&print_event_info->head_cache, file);
|
Write_on_release_cache cache(&print_event_info->head_cache, file);
|
||||||
|
|
||||||
print_query_header(&cache, print_event_info);
|
print_query_header(&cache, print_event_info);
|
||||||
|
/**
|
||||||
|
reduce the size of io cache so that the write function is called
|
||||||
|
for every call to my_b_printf().
|
||||||
|
*/
|
||||||
|
DBUG_EXECUTE_IF ("simulate_execute_event_write_error",
|
||||||
|
{(&cache)->write_pos= (&cache)->write_end;
|
||||||
|
DBUG_SET("+d,simulate_file_write_error");});
|
||||||
|
|
||||||
if (local_fname)
|
if (local_fname)
|
||||||
{
|
{
|
||||||
|
@ -271,7 +271,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
Deferred_log_events(Relay_log_info *rli);
|
Deferred_log_events(Relay_log_info *rli);
|
||||||
~Deferred_log_events();
|
~Deferred_log_events();
|
||||||
/* queue for exection at Query-log-event time prior the Query */;
|
/* queue for exection at Query-log-event time prior the Query */
|
||||||
int add(Log_event *ev);
|
int add(Log_event *ev);
|
||||||
bool is_empty();
|
bool is_empty();
|
||||||
bool execute(Relay_log_info *rli);
|
bool execute(Relay_log_info *rli);
|
||||||
|
Reference in New Issue
Block a user