[Commits] Rev 2862: Fix error insert to have deterministic errno (fixes test failure on mac). in http://bazaar.launchpad.net/~maria-captains/maria/5.1

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Tue Nov 2 09:40:27 EET 2010


At http://bazaar.launchpad.net/~maria-captains/maria/5.1

------------------------------------------------------------
revno: 2862
revision-id: knielsen at knielsen-hq.org-20101102074027-jlnx0rnbdpovl122
parent: knielsen at knielsen-hq.org-20101101150125-g27nl7u2bhlrjhs4
committer: knielsen at knielsen-hq.org
branch nick: work-5.1-mwl116
timestamp: Tue 2010-11-02 08:40:27 +0100
message:
  Fix error insert to have deterministic errno (fixes test failure on mac).
=== modified file 'mysql-test/suite/binlog/r/binlog_ioerr.result'
--- a/mysql-test/suite/binlog/r/binlog_ioerr.result	2010-09-30 13:20:15 +0000
+++ b/mysql-test/suite/binlog/r/binlog_ioerr.result	2010-11-02 07:40:27 +0000
@@ -4,9 +4,9 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGI
 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;

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2010-11-01 14:41:09 +0000
+++ b/sql/log.cc	2010-11-02 07:40:27 +0000
@@ -4772,7 +4772,8 @@ int MYSQL_BIN_LOG::write_cache(IO_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



More information about the commits mailing list