summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-04-21 10:20:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-04-21 10:20:20 +0300
commit28f01f82e1cb682566017b52017469be7638dd49 (patch)
treed496cb0936d25973b95f6eb591508c2e493032b8 /sql/sys_vars.cc
parenta3099a3b4a394da360b5c1e7ae6dc985ae2f7f2f (diff)
parent80ed136e6dd4a021b1fc9b7bd7077bf989c3d247 (diff)
downloadmariadb-git-bb-10.6-merge.tar.gz
WIP merge 10.5 to 10.6bb-10.6-merge
FIXME: Disabled tests due to upgrading libmariadb: main.mysql_client_test main.mysql_client_test_nonblock main.mysql_client_test_comp
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc22
1 files changed, 15 insertions, 7 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index b72d4a3c358..ebec2a203aa 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2002, 2015, Oracle and/or its affiliates.
- Copyright (c) 2012, 2020, MariaDB Corporation.
+ Copyright (c) 2012, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -5051,15 +5051,23 @@ static Sys_var_have Sys_have_symlink(
"--skip-symbolic-links option.",
READ_ONLY GLOBAL_VAR(have_symlink), NO_CMD_LINE);
+#if defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN)
+
#ifdef __SANITIZE_ADDRESS__
+#define SANITIZER_MODE "ASAN"
+#else
+#define SANITIZER_MODE "UBSAN"
+#endif /* __SANITIZE_ADDRESS__ */
+
static char *have_sanitizer;
-static Sys_var_charptr_fscs Sys_have_santitizer(
+static Sys_var_charptr Sys_have_santitizer(
"have_sanitizer",
- "If the server is compiled with ASan (Address sanitizer) this will be "
- "set to ASAN",
- READ_ONLY GLOBAL_VAR(have_sanitizer), NO_CMD_LINE,
- DEFAULT("ASAN"));
-#endif
+ "If the server is compiled with sanitize (compiler option), this "
+ "variable is set to the sanitizer mode used. Possible values are "
+ "ASAN (Address sanitizer) or UBSAN (The Undefined Behavior Sanitizer).",
+ READ_ONLY GLOBAL_VAR(have_sanitizer), NO_CMD_LINE,
+ DEFAULT(SANITIZER_MODE));
+#endif /* defined(__SANITIZE_ADDRESS__) || defined(WITH_UBSAN) */
static bool fix_log_state(sys_var *self, THD *thd, enum_var_type type);