From 04ff96f7891cf4a714a3f60a4ec15b5ead7a3f31 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 8 Apr 2010 12:47:31 +0300 Subject: [PATCH] Fixed syntax error and some timeing issues in test suite mysql-test/r/func_time.result: Updated result mysql-test/t/func_time.test: sysdate() could be same even with one sleep(1) in between. storage/maria/ma_loghandler.c: Fixed syntax error --- mysql-test/r/func_time.result | 2 +- mysql-test/t/func_time.test | 2 +- storage/maria/ma_loghandler.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 2ac549a5abd..22c8a6e4b6f 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1120,7 +1120,7 @@ drop function t_slow_sysdate; drop table t1; SET GLOBAL log_bin_trust_function_creators = 0; create table t1 (a datetime, i int, b datetime); -insert into t1 select sysdate(), sleep(1), sysdate() from dual; +insert into t1 select sysdate(), sleep(2), sysdate() from dual; select a != b from t1; a != b 1 diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index b9da946a55f..2f9a48ffd6a 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -650,7 +650,7 @@ drop table t1; SET GLOBAL log_bin_trust_function_creators = 0; create table t1 (a datetime, i int, b datetime); -insert into t1 select sysdate(), sleep(1), sysdate() from dual; +insert into t1 select sysdate(), sleep(2), sysdate() from dual; select a != b from t1; drop table t1; diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c index 5e316e2d776..8ffaf22d1b0 100644 --- a/storage/maria/ma_loghandler.c +++ b/storage/maria/ma_loghandler.c @@ -1211,9 +1211,10 @@ static my_bool translog_set_lsn_for_files(uint32 from_file, uint32 to_file, for (file= from_file; file <= to_file; file++) { LOGHANDLER_FILE_INFO info; + File fd; LINT_INIT(info.max_lsn); - File fd= open_logfile_by_number_no_cache(file); + fd= open_logfile_by_number_no_cache(file); if ((fd < 0) || ((translog_read_file_header(&info, fd) || (cmp_translog_addr(lsn, info.max_lsn) > 0 &&