Commit caecbf1f authored by unknown's avatar unknown

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

parent 7b38f1c3
......@@ -4,9 +4,9 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb;
INSERT INTO t1 VALUES(0);
SET SESSION debug='+d,fail_binlog_write_1';
INSERT INTO t1 VALUES(1);
ERROR HY000: Error writing file 'master-bin' (errno: 22)
ERROR HY000: Error writing file 'master-bin' (errno: 28)
INSERT INTO t1 VALUES(2);
ERROR HY000: Error writing file 'master-bin' (errno: 22)
ERROR HY000: Error writing file 'master-bin' (errno: 28)
SET SESSION debug='';
INSERT INTO t1 VALUES(3);
SELECT * FROM t1;
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment