summaryrefslogtreecommitdiff
path: root/include/srv0srv.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/srv0srv.h')
-rw-r--r--include/srv0srv.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/srv0srv.h b/include/srv0srv.h
index 53dbdf8bd8f..c4fb9712b51 100644
--- a/include/srv0srv.h
+++ b/include/srv0srv.h
@@ -266,9 +266,22 @@ extern ulint srv_adaptive_flushing_method;
extern ulint srv_expand_import;
extern ulint srv_pass_corrupt_table;
-extern ulint srv_dict_size_limit;
+/* Helper macro to support srv_pass_corrupt_table checks. If 'cond' is FALSE,
+execute 'code' if srv_pass_corrupt_table is non-zero, or trigger a fatal error
+otherwise. The break statement in 'code' will obviously not work as expected. */
+
+#define SRV_CORRUPT_TABLE_CHECK(cond,code) \
+ do { \
+ if (UNIV_UNLIKELY(!(cond))) { \
+ if (srv_pass_corrupt_table) { \
+ code \
+ } else { \
+ ut_error; \
+ } \
+ } \
+ } while(0)
-extern ulint srv_lazy_drop_table;
+extern ulint srv_dict_size_limit;
/*-------------------------------------------*/
extern ulint srv_n_rows_inserted;