Commit 4b390e98 authored by unknown's avatar unknown
Browse files

InnoDB: Make UNIV_LOG_DEBUG work


innobase/buf/buf0flu.c:
  buf_flush_write_block_low(): Warn about UNIV_LOG_DEBUG only once
innobase/log/log0recv.c:
  log_block_checksum_is_ok_or_old_format(): Disable the check
  if UNIV_LOG_DEBUG is defined
parent 5b370022
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -412,6 +412,9 @@ buf_flush_write_block_low(
/*======================*/
	buf_block_t*	block)	/* in: buffer block to write */
{
#ifdef UNIV_LOG_DEBUG
	static ibool univ_log_debug_warned;
#endif /* UNIV_LOG_DEBUG */
	ut_a(block->state == BUF_BLOCK_FILE_PAGE);

#ifdef UNIV_IBUF_DEBUG
@@ -420,8 +423,13 @@ buf_flush_write_block_low(
	ut_ad(!ut_dulint_is_zero(block->newest_modification));

#ifdef UNIV_LOG_DEBUG
	fputs("Warning: cannot force log to disk in the log debug version!\n",
	if (!univ_log_debug_warned) {
		univ_log_debug_warned = TRUE;
		fputs(
	"Warning: cannot force log to disk if UNIV_LOG_DEBUG is defined!\n"
	"Crash recovery will not work!\n",
			stderr);
	}
#else
	/* Force the log to the disk before writing the modified block */
	log_write_up_to(block->newest_modification, LOG_WAIT_ALL_GROUPS, TRUE);
+3 −0
Original line number Diff line number Diff line
@@ -628,6 +628,9 @@ log_block_checksum_is_ok_or_old_format(
			format of InnoDB version < 3.23.52 */
	byte*	block)	/* in: pointer to a log block */
{
#ifdef UNIV_LOG_DEBUG
	return(TRUE);
#endif /* UNIV_LOG_DEBUG */
	if (log_block_calc_checksum(block) == log_block_get_checksum(block)) {

		return(TRUE);