diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 8116b3f499a..b78ae1a694c 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -1886,16 +1886,16 @@ static void sst_disable_innodb_writes()
   buf_flush_page_cleaner(). Let us prevent that by invoking another
   checkpoint (which will write the FILE_CHECKPOINT record). */
   log_make_checkpoint();
-  ut_d(recv_no_log_write= true);
+  recv_no_log_write= true;
   /* If this were not a no-op, an assertion would fail due to
   recv_no_log_write. */
-  ut_d(log_make_checkpoint());
+  log_make_checkpoint();
 }
 
 static void sst_enable_innodb_writes()
 {
-  ut_ad(recv_no_log_write);
-  ut_d(recv_no_log_write= false);
+  ut_a(recv_no_log_write);
+  recv_no_log_write= false;
   purge_sys.resume();
   wsrep_sst_disable_writes= false;
   const uint old_count= srv_n_fil_crypt_threads;
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h
index 716bc12b5d1..7192d8b359a 100644
--- a/storage/innobase/include/log0recv.h
+++ b/storage/innobase/include/log0recv.h
@@ -329,11 +329,9 @@ are allowed yet: the variable name is misleading. */
 extern bool		recv_no_ibuf_operations;
 /** TRUE when recv_init_crash_recovery() has been called. */
 extern bool		recv_needed_recovery;
-#ifdef UNIV_DEBUG
 /** TRUE if writing to the redo log (mtr_commit) is forbidden.
 Protected by log_sys.mutex. */
 extern bool		recv_no_log_write;
-#endif /* UNIV_DEBUG */
 
 /** TRUE if buf_page_is_corrupted() should check if the log sequence
 number (FIL_PAGE_LSN) is in the future.  Initially FALSE, and set by
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
index 433483b662e..c1a9e9fe728 100644
--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -622,7 +622,7 @@ log_file_header_flush(
 	lsn_t	dest_offset;
 
 	ut_ad(log_write_mutex_own());
-	ut_ad(!recv_no_log_write);
+	ut_a(!recv_no_log_write);
 	ut_a(nth_file < log_sys.log.n_files);
 	ut_ad(log_sys.log.format == log_t::FORMAT_10_4
 	      || log_sys.log.format == log_t::FORMAT_ENC_10_4);
@@ -699,7 +699,7 @@ log_write_buf(
 	ulint		i;
 
 	ut_ad(log_write_mutex_own());
-	ut_ad(!recv_no_log_write);
+	ut_a(!recv_no_log_write);
 	ut_a(len % OS_FILE_LOG_BLOCK_SIZE == 0);
 	ut_a(start_lsn % OS_FILE_LOG_BLOCK_SIZE == 0);
 
@@ -890,7 +890,7 @@ void log_write_up_to(lsn_t lsn, bool flush_to_disk, bool rotate_key)
 		return;
 	}
 
-	ut_ad(!recv_no_log_write);
+	ut_a(!recv_no_log_write);
 
 	/* If it is a write call we should just go ahead and do it
 	as we checked that write_lsn is not where we'd like it to
@@ -1050,7 +1050,7 @@ void log_buffer_flush_to_disk(bool sync)
 ATTRIBUTE_COLD void log_write_and_flush()
 {
   ut_ad(!srv_read_only_mode);
-  ut_ad(!recv_no_log_write);
+  ut_a(!recv_no_log_write);
   ut_ad(!recv_recovery_is_on());
 
   /* The following code is adapted from log_write_up_to(). */
@@ -1481,7 +1481,7 @@ bool log_checkpoint(bool sync)
 		return(true);
 	}
 
-	ut_ad(!recv_no_log_write);
+	ut_a(!recv_no_log_write);
 
 	/* Repeat the MLOG_FILE_NAME records after the checkpoint, in
 	case some log records between the checkpoint and log_sys.lsn
@@ -1572,7 +1572,7 @@ log_checkpoint_margin(void)
 	advance = 0;
 
 	log_mutex_enter();
-	ut_ad(!recv_no_log_write);
+	ut_a(!recv_no_log_write);
 
 	if (!log_sys.check_flush_or_checkpoint) {
 		log_mutex_exit();
@@ -1651,7 +1651,7 @@ log_check_margins(void)
 		log_flush_margin();
 		log_checkpoint_margin();
 		log_mutex_enter();
-		ut_ad(!recv_no_log_write);
+		ut_a(!recv_no_log_write);
 		check = log_sys.check_flush_or_checkpoint;
 		log_mutex_exit();
 	} while (check);
@@ -2054,7 +2054,7 @@ log_pad_current_log_block(void)
 	ulint		i;
 	lsn_t		lsn;
 
-	ut_ad(!recv_no_log_write);
+	ut_a(!recv_no_log_write);
 	/* We retrieve lsn only because otherwise gcc crashed on HP-UX */
 	lsn = log_reserve_and_open(OS_FILE_LOG_BLOCK_SIZE);
 
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index 5645e56903d..4bb82cea16e 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -75,11 +75,9 @@ volatile bool	recv_recovery_on;
 
 /** TRUE when recv_init_crash_recovery() has been called. */
 bool	recv_needed_recovery;
-#ifdef UNIV_DEBUG
 /** TRUE if writing to the redo log (mtr_commit) is forbidden.
 Protected by log_sys.mutex. */
 bool	recv_no_log_write = false;
-#endif /* UNIV_DEBUG */
 
 /** TRUE if buf_page_is_corrupted() should check if the log sequence
 number (FIL_PAGE_LSN) is in the future.  Initially FALSE, and set by
@@ -3886,7 +3884,7 @@ recv_recovery_from_checkpoint_start(lsn_t flush_lsn)
 
 	recv_sys.apply_log_recs = true;
 	recv_no_ibuf_operations = is_mariabackup_restore_or_export();
-	ut_d(recv_no_log_write = recv_no_ibuf_operations);
+	recv_no_log_write = recv_no_ibuf_operations;
 
 	mutex_exit(&recv_sys.mutex);
 
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
index b6e6055bbc4..3a8f28cc7e3 100644
--- a/storage/innobase/mtr/mtr0mtr.cc
+++ b/storage/innobase/mtr/mtr0mtr.cc
@@ -379,7 +379,7 @@ mtr_write_log(
 	const ulint	len = log->size();
 	mtr_write_log_t	write_log;
 
-	ut_ad(!recv_no_log_write);
+	ut_a(!recv_no_log_write);
 	DBUG_PRINT("ib_log",
 		   (ULINTPF " extra bytes written at " LSN_PF,
 		    len, log_sys.lsn));
@@ -426,7 +426,7 @@ mtr_t::commit()
   ut_ad(!is_inside_ibuf());
 
   /* This is a dirty read, for debugging. */
-  ut_ad(!m_modifications || !recv_no_log_write);
+  ut_a(!m_modifications || !recv_no_log_write);
   ut_ad(!m_modifications || m_log_mode != MTR_LOG_NONE);
 
   if (m_modifications
@@ -718,7 +718,7 @@ mtr_t::release_page(const void* ptr, mtr_memo_type_t type)
 @return number of bytes to write in finish_write() */
 inline ulint mtr_t::prepare_write()
 {
-	ut_ad(!recv_no_log_write);
+	ut_a(!recv_no_log_write);
 
 	if (UNIV_UNLIKELY(m_log_mode != MTR_LOG_ALL)) {
 		ut_ad(m_log_mode == MTR_LOG_NO_REDO);
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index b8b74263eba..c0197409008 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -488,7 +488,7 @@ create_log_files(
 	if (log_sys.is_encrypted() && !log_crypt_init()) {
 		return DB_ERROR;
 	}
-	ut_d(recv_no_log_write = false);
+	recv_no_log_write = false;
 	log_sys.lsn = ut_uint64_align_up(lsn, OS_FILE_LOG_BLOCK_SIZE);
 
 	log_sys.log.set_lsn(log_sys.lsn);
@@ -2034,7 +2034,7 @@ dberr_t srv_start(bool create_new_db)
 			InnoDB files is needed. */
 			ut_ad(srv_force_recovery <= SRV_FORCE_IGNORE_CORRUPT);
 			ut_ad(srv_n_log_files_found <= 1);
-			ut_ad(recv_no_log_write);
+			ut_a(recv_no_log_write);
 			buf_flush_sync_all_buf_pools();
 			err = fil_write_flushed_lsn(log_get_lsn());
 			ut_ad(!buf_pool_check_no_pending_io());
@@ -2081,7 +2081,7 @@ dberr_t srv_start(bool create_new_db)
 			/* Prohibit redo log writes from any other
 			threads until creating a log checkpoint at the
 			end of create_log_files(). */
-			ut_d(recv_no_log_write = true);
+			recv_no_log_write = true;
 			ut_ad(!buf_pool_check_no_pending_io());
 
 			DBUG_EXECUTE_IF("innodb_log_abort_3",
