diff options
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc index 3714f1190be..57c14b24782 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2388,7 +2388,10 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time, { end= strxmov(buff, "# administrator command: ", NullS); 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) || my_b_write(&log_file, (uchar*) ";\n",2) || |