Commit bd7312cc authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix Aria unit tests on Windows.

Replace statements connected with bitwise OR with series of "if"s.
The later is guaranteed to execute in order, bitwise OR does not have
specific order for statement execution.
parent 3bb552ea
...@@ -1445,12 +1445,24 @@ LSN translog_get_file_max_lsn_stored(uint32 file) ...@@ -1445,12 +1445,24 @@ LSN translog_get_file_max_lsn_stored(uint32 file)
File fd; File fd;
fd= open_logfile_by_number_no_cache(file); fd= open_logfile_by_number_no_cache(file);
if ((fd < 0) || if(fd < 0)
(translog_read_file_header(&info, fd) | mysql_file_close(fd, MYF(MY_WME)))) {
DBUG_PRINT("error", ("Can't open file"));
DBUG_RETURN(LSN_ERROR);
}
if (translog_read_file_header(&info, fd))
{ {
DBUG_PRINT("error", ("Can't read file header")); DBUG_PRINT("error", ("Can't read file header"));
DBUG_RETURN(LSN_ERROR); DBUG_RETURN(LSN_ERROR);
} }
if (mysql_file_close(fd, MYF(MY_WME)))
{
DBUG_PRINT("error", ("Can't close file"));
DBUG_RETURN(LSN_ERROR);
}
DBUG_PRINT("info", ("Max lsn: (%lu,0x%lx)", DBUG_PRINT("info", ("Max lsn: (%lu,0x%lx)",
LSN_IN_PARTS(info.max_lsn))); LSN_IN_PARTS(info.max_lsn)));
DBUG_RETURN(info.max_lsn); DBUG_RETURN(info.max_lsn);
......
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