diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-11-30 00:26:32 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-11-30 00:26:32 +0100 |
commit | 5d67eb6b5cc8d3643489acc39c545c0993d9777c (patch) | |
tree | ecae56025d414375814bb47503ef82f42509ffb5 | |
parent | 25a9b335912e5b9a26a6e1fc6ec7b211aa3822b2 (diff) | |
download | mariadb-git-5d67eb6b5cc8d3643489acc39c545c0993d9777c.tar.gz |
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.
-rw-r--r-- | storage/maria/ma_loghandler.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index b3e4acb2995..4814ab23799 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -1445,12 +1445,24 @@ LSN translog_get_file_max_lsn_stored(uint32 file) File fd; fd= open_logfile_by_number_no_cache(file); - if ((fd < 0) || - (translog_read_file_header(&info, fd) | mysql_file_close(fd, MYF(MY_WME)))) + if(fd < 0) + { + 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_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)", LSN_IN_PARTS(info.max_lsn))); DBUG_RETURN(info.max_lsn); |