From 83d331a5535c14d3ce6a81e5c31d2d622624744b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 14:31:37 +0100 Subject: [PATCH] Small fixes; the missing DBUG_RETURN() fixes BUG#34741 "prepared show master logs without binlogging debug assert" sql/sql_repl.cc: missing DBUG_RETURN storage/maria/unittest/ma_control_file-t.c: fix for icc warning. --- sql/sql_repl.cc | 2 +- storage/maria/unittest/ma_control_file-t.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index cdce2fa695b..280598e8557 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1522,7 +1522,7 @@ bool show_binlogs(THD* thd) if (!mysql_bin_log.is_open()) { my_message(ER_NO_BINARY_LOGGING, ER(ER_NO_BINARY_LOGGING), MYF(0)); - return 1; + DBUG_RETURN(TRUE); } field_list.push_back(new Item_empty_string("Log_name", 255)); diff --git a/storage/maria/unittest/ma_control_file-t.c b/storage/maria/unittest/ma_control_file-t.c index fa996fdc58b..75db86d90e8 100644 --- a/storage/maria/unittest/ma_control_file-t.c +++ b/storage/maria/unittest/ma_control_file-t.c @@ -104,7 +104,7 @@ int (*default_error_handler_hook)(uint my_err, const char *str, /* like ma_control_file_create_or_open(), but without error messages */ -static CONTROL_FILE_ERROR local_ma_control_file_create_or_open() +static CONTROL_FILE_ERROR local_ma_control_file_create_or_open(void) { CONTROL_FILE_ERROR error; error_handler_hook= my_ignore_message; @@ -205,7 +205,7 @@ static int close_file() static int create_or_open_file() { - RET_ERR_UNLESS(local_ma_control_file_create_or_open(TRUE) == CONTROL_FILE_OK); + RET_ERR_UNLESS(local_ma_control_file_create_or_open() == CONTROL_FILE_OK); /* Check that the module reports expected information */ RET_ERR_UNLESS(verify_module_values_match_expected() == 0); return 0; @@ -362,7 +362,7 @@ static int test_bad_magic_string() MYF(MY_FNABP | MY_WME)) == 0); /* Check that control file module sees the problem */ - RET_ERR_UNLESS(local_ma_control_file_create_or_open(TRUE) == + RET_ERR_UNLESS(local_ma_control_file_create_or_open() == CONTROL_FILE_BAD_MAGIC_STRING); /* Restore magic string */ RET_ERR_UNLESS(my_pwrite(fd, buffer, 4, 0, MYF(MY_FNABP | MY_WME)) == 0); @@ -388,7 +388,7 @@ static int test_bad_checksum() buffer[0]+= 3; /* mangle checksum */ RET_ERR_UNLESS(my_pwrite(fd, buffer, 1, 30, MYF(MY_FNABP | MY_WME)) == 0); /* Check that control file module sees the problem */ - RET_ERR_UNLESS(local_ma_control_file_create_or_open(TRUE) == + RET_ERR_UNLESS(local_ma_control_file_create_or_open() == CONTROL_FILE_BAD_CHECKSUM); /* Restore checksum */ buffer[0]-= 3; @@ -403,7 +403,7 @@ static int test_bad_blocksize() { maria_block_size<<= 1; /* Check that control file module sees the problem */ - RET_ERR_UNLESS(local_ma_control_file_create_or_open(TRUE) == + RET_ERR_UNLESS(local_ma_control_file_create_or_open() == CONTROL_FILE_WRONG_BLOCKSIZE); /* Restore blocksize */ maria_block_size>>= 1; @@ -478,7 +478,7 @@ static int test_bad_hchecksum() buffer[0]+= 3; /* mangle checksum */ RET_ERR_UNLESS(my_pwrite(fd, buffer, 1, 26, MYF(MY_FNABP | MY_WME)) == 0); /* Check that control file module sees the problem */ - RET_ERR_UNLESS(local_ma_control_file_create_or_open(TRUE) == + RET_ERR_UNLESS(local_ma_control_file_create_or_open() == CONTROL_FILE_BAD_HEAD_CHECKSUM); /* Restore checksum */ buffer[0]-= 3; @@ -502,14 +502,14 @@ static int test_bad_size() MYF(MY_WME))) >= 0); RET_ERR_UNLESS(my_write(fd, buffer, 10, MYF(MY_FNABP | MY_WME)) == 0); /* Check that control file module sees the problem */ - RET_ERR_UNLESS(local_ma_control_file_create_or_open(TRUE) == + RET_ERR_UNLESS(local_ma_control_file_create_or_open() == CONTROL_FILE_TOO_SMALL); for (i= 0; i < 8; i++) { RET_ERR_UNLESS(my_write(fd, buffer, 66, MYF(MY_FNABP | MY_WME)) == 0); } /* Check that control file module sees the problem */ - RET_ERR_UNLESS(local_ma_control_file_create_or_open(TRUE) == + RET_ERR_UNLESS(local_ma_control_file_create_or_open() == CONTROL_FILE_TOO_BIG); RET_ERR_UNLESS(my_close(fd, MYF(MY_WME)) == 0);