summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorSujatha Sivakumar <sujatha.sivakumar@oracle.com>2012-07-10 14:37:35 +0530
committerSujatha Sivakumar <sujatha.sivakumar@oracle.com>2012-07-10 14:37:35 +0530
commit2e84cf867498479a2d7ff8144eefd561abd027bd (patch)
treeafa3cece38781f7a02d767695e524a0b1229c945 /sql/log.cc
parent8941847704f6f679a8557cee2d386fe25d01868b (diff)
parent13f7f002886c18fc911f6cf6d5bd672f8c96d844 (diff)
downloadmariadb-git-2e84cf867498479a2d7ff8144eefd561abd027bd.tar.gz
merge from 5.1 to 5.5
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 24cee143c71..fc11dcc77ce 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2762,7 +2762,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) ||