diff options
author | Sujatha Sivakumar <sujatha.sivakumar@oracle.com> | 2012-07-10 14:37:35 +0530 |
---|---|---|
committer | Sujatha Sivakumar <sujatha.sivakumar@oracle.com> | 2012-07-10 14:37:35 +0530 |
commit | 94d68d30bf45f14f7cfc56fd67f196821019efd1 (patch) | |
tree | afa3cece38781f7a02d767695e524a0b1229c945 /sql/log_event.cc | |
parent | 556a508f4a2335798a912a4028adc3fdf93bc908 (diff) | |
parent | cf858b71ce0cc18909983d7f928a6961a580d77b (diff) | |
download | mariadb-git-94d68d30bf45f14f7cfc56fd67f196821019efd1.tar.gz |
merge from 5.1 to 5.5
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 0c0d331a947..f74c89aef45 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -6470,11 +6470,18 @@ void Create_file_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info { Load_log_event::print(file, print_event_info, !check_fname_outside_temp_buf()); - /* - That one is for "file_id: etc" below: in mysqlbinlog we want the #, in - SHOW BINLOG EVENTS we don't. - */ - my_b_printf(&cache, "#"); + /** + 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 + SHOW BINLOG EVENTS we don't. + */ + my_b_printf(&cache, "#"); } my_b_printf(&cache, " file_id: %d block_len: %d\n", file_id, block_len); @@ -7161,6 +7168,13 @@ void Execute_load_query_log_event::print(FILE* file, Write_on_release_cache cache(&print_event_info->head_cache, file); 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) { |