summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2023-03-08 01:04:49 +0300
committerAleksey Midenkov <midenok@gmail.com>2023-03-08 12:39:07 +0300
commit63a29ddf7f89fd6986a92b3216f63a0d4bc05414 (patch)
treee0e39c1b7262feef50d4404cc6a049e7390069d1
parent97ff62b99b7bc709074540b918142afd75ba6284 (diff)
downloadmariadb-git-bb-11.0-midenok.tar.gz
ERROR_INJECT warning fix for DBUG_OFFbb-11.0-midenok
sql_table.cc:846:53: warning: statement has no effect [-Wunused-value] ERROR_INJECT("alter_partition_after_create_frm");
-rw-r--r--sql/sql_table.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_table.h b/sql/sql_table.h
index ccde7d87120..02c9bca6044 100644
--- a/sql/sql_table.h
+++ b/sql/sql_table.h
@@ -21,9 +21,13 @@
#include "m_string.h" // LEX_CUSTRING
#include "lex_charset.h"
+#if !defined(DBUG_OFF)
#define ERROR_INJECT(code) \
((DBUG_IF("crash_" code) && (DBUG_SUICIDE(), 0)) || \
(DBUG_IF("fail_" code) && (my_error(ER_UNKNOWN_ERROR, MYF(0)), 1)))
+#else
+#define ERROR_INJECT(code) 0
+#endif
class Alter_info;
class Alter_table_ctx;