Commit 83d331a5 authored by unknown's avatar unknown

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.
parent b9b60d6f
...@@ -1522,7 +1522,7 @@ bool show_binlogs(THD* thd) ...@@ -1522,7 +1522,7 @@ bool show_binlogs(THD* thd)
if (!mysql_bin_log.is_open()) if (!mysql_bin_log.is_open())
{ {
my_message(ER_NO_BINARY_LOGGING, ER(ER_NO_BINARY_LOGGING), MYF(0)); 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)); field_list.push_back(new Item_empty_string("Log_name", 255));
......
...@@ -104,7 +104,7 @@ int (*default_error_handler_hook)(uint my_err, const char *str, ...@@ -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 */ /* 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; CONTROL_FILE_ERROR error;
error_handler_hook= my_ignore_message; error_handler_hook= my_ignore_message;
...@@ -205,7 +205,7 @@ static int close_file() ...@@ -205,7 +205,7 @@ static int close_file()
static int create_or_open_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 */ /* Check that the module reports expected information */
RET_ERR_UNLESS(verify_module_values_match_expected() == 0); RET_ERR_UNLESS(verify_module_values_match_expected() == 0);
return 0; return 0;
...@@ -362,7 +362,7 @@ static int test_bad_magic_string() ...@@ -362,7 +362,7 @@ static int test_bad_magic_string()
MYF(MY_FNABP | MY_WME)) == 0); MYF(MY_FNABP | MY_WME)) == 0);
/* Check that control file module sees the problem */ /* 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); CONTROL_FILE_BAD_MAGIC_STRING);
/* Restore magic string */ /* Restore magic string */
RET_ERR_UNLESS(my_pwrite(fd, buffer, 4, 0, MYF(MY_FNABP | MY_WME)) == 0); RET_ERR_UNLESS(my_pwrite(fd, buffer, 4, 0, MYF(MY_FNABP | MY_WME)) == 0);
...@@ -388,7 +388,7 @@ static int test_bad_checksum() ...@@ -388,7 +388,7 @@ static int test_bad_checksum()
buffer[0]+= 3; /* mangle checksum */ buffer[0]+= 3; /* mangle checksum */
RET_ERR_UNLESS(my_pwrite(fd, buffer, 1, 30, MYF(MY_FNABP | MY_WME)) == 0); RET_ERR_UNLESS(my_pwrite(fd, buffer, 1, 30, MYF(MY_FNABP | MY_WME)) == 0);
/* Check that control file module sees the problem */ /* 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); CONTROL_FILE_BAD_CHECKSUM);
/* Restore checksum */ /* Restore checksum */
buffer[0]-= 3; buffer[0]-= 3;
...@@ -403,7 +403,7 @@ static int test_bad_blocksize() ...@@ -403,7 +403,7 @@ static int test_bad_blocksize()
{ {
maria_block_size<<= 1; maria_block_size<<= 1;
/* Check that control file module sees the problem */ /* 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); CONTROL_FILE_WRONG_BLOCKSIZE);
/* Restore blocksize */ /* Restore blocksize */
maria_block_size>>= 1; maria_block_size>>= 1;
...@@ -478,7 +478,7 @@ static int test_bad_hchecksum() ...@@ -478,7 +478,7 @@ static int test_bad_hchecksum()
buffer[0]+= 3; /* mangle checksum */ buffer[0]+= 3; /* mangle checksum */
RET_ERR_UNLESS(my_pwrite(fd, buffer, 1, 26, MYF(MY_FNABP | MY_WME)) == 0); RET_ERR_UNLESS(my_pwrite(fd, buffer, 1, 26, MYF(MY_FNABP | MY_WME)) == 0);
/* Check that control file module sees the problem */ /* 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); CONTROL_FILE_BAD_HEAD_CHECKSUM);
/* Restore checksum */ /* Restore checksum */
buffer[0]-= 3; buffer[0]-= 3;
...@@ -502,14 +502,14 @@ static int test_bad_size() ...@@ -502,14 +502,14 @@ static int test_bad_size()
MYF(MY_WME))) >= 0); MYF(MY_WME))) >= 0);
RET_ERR_UNLESS(my_write(fd, buffer, 10, MYF(MY_FNABP | 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 */ /* 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); CONTROL_FILE_TOO_SMALL);
for (i= 0; i < 8; i++) for (i= 0; i < 8; i++)
{ {
RET_ERR_UNLESS(my_write(fd, buffer, 66, MYF(MY_FNABP | MY_WME)) == 0); RET_ERR_UNLESS(my_write(fd, buffer, 66, MYF(MY_FNABP | MY_WME)) == 0);
} }
/* Check that control file module sees the problem */ /* 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); CONTROL_FILE_TOO_BIG);
RET_ERR_UNLESS(my_close(fd, MYF(MY_WME)) == 0); RET_ERR_UNLESS(my_close(fd, MYF(MY_WME)) == 0);
......
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