diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-29 13:10:40 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-08-29 13:13:17 +0300 |
commit | e50b2bdbcf045e46d1a84ffeb9872d81e3aa5eff (patch) | |
tree | a6e8b1fae0fa313d05682901cf022ff3bd0dffe7 /include/my_sys.h | |
parent | 1a3c36595320bd4cf94ba5ab6c5127129269af67 (diff) | |
download | mariadb-git-e50b2bdbcf045e46d1a84ffeb9872d81e3aa5eff.tar.gz |
MDEV-20425 Implement Boolean debug build option debug_assertbb-10.3-MDEV-20425
Commit 536215e32fc43aa423684e9807640dcf3453924b in MariaDB Server 10.3.1
introduced the compiler flag (not cmake option) DBUG_ASSERT_AS_PRINTF
that converts DBUG_ASSERT in non-debug builds into printouts.
For debug builds, it could be useful to be able to convert DBUG_ASSERT
into a warning or error printout, to allow execution to continue.
This would allow debug builds to be used for reproducing hard failures
that occur with release builds.
my_assert: A Boolean flag (set by default), tied to the new option
debug_assert that is available on debug builds only.
When set, DBUG_ASSERT() will invoke assert(), like it did until now.
When unset, DBUG_ASSERT() will invoke fprintf(stderr, ...)
with the file name, line number and assertion expression.
Diffstat (limited to 'include/my_sys.h')
-rw-r--r-- | include/my_sys.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 62c76adedfc..a746dd9de1b 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2017, MariaDB Corporation. + Copyright (c) 2010, 2019, 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 @@ -267,6 +267,7 @@ extern ulong my_sync_count; extern uint mysys_usage_id; extern int32 my_file_opened; extern my_bool my_init_done, my_thr_key_mysys_exists; +extern MYSQL_PLUGIN_IMPORT my_bool my_assert; extern my_bool my_assert_on_error; extern myf my_global_flags; /* Set to MY_WME for more error messages */ /* Point to current my_message() */ |