Skip to content

Commit

Permalink
Fix a compiler warning
Browse files Browse the repository at this point in the history
fil_space_verify_crypt_checksum(): Add a dummy return statement
in case memory is corrupted and innodb_checksum_algorithm has
an invalid value.
  • Loading branch information
dr-m committed Dec 17, 2018
1 parent 8c43f96 commit 51a1fc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions storage/innobase/fil/fil0crypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2630,4 +2630,7 @@ bool fil_space_verify_crypt_checksum(const byte* page, ulint zip_size)
return checksum == buf_calc_page_crc32(page)
|| checksum == buf_calc_page_new_checksum(page);
}

ut_ad(!"unhandled innodb_checksum_algorithm");
return false;
}
3 changes: 3 additions & 0 deletions storage/xtradb/fil/fil0crypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2630,4 +2630,7 @@ bool fil_space_verify_crypt_checksum(const byte* page, ulint zip_size)
return checksum == buf_calc_page_crc32(page)
|| checksum == buf_calc_page_new_checksum(page);
}

ut_ad(!"unhandled innodb_checksum_algorithm");
return false;
}

0 comments on commit 51a1fc7

Please sign in to comment.