Fix error insert to have deterministic errno (fixes test failure on mac).

This commit is contained in:
unknown 2010-11-02 08:40:27 +01:00
commit 805f009360
2 changed files with 4 additions and 3 deletions

View file

@ -4772,7 +4772,8 @@ int MYSQL_BIN_LOG::write_cache(IO_CACHE *cache)
}
/* Write data to the binary log file */
DBUG_EXECUTE_IF("fail_binlog_write_1", return ER_ERROR_ON_WRITE;);
DBUG_EXECUTE_IF("fail_binlog_write_1",
errno= 28; return ER_ERROR_ON_WRITE;);
if (my_b_write(&log_file, cache->read_pos, length))
return ER_ERROR_ON_WRITE;
cache->read_pos=cache->read_end; // Mark buffer used up