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_global.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_global.h')
-rw-r--r-- | include/my_global.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/my_global.h b/include/my_global.h index da3ce121fb0..819d388f367 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1,6 +1,6 @@ /* Copyright (c) 2001, 2013, Oracle and/or its affiliates. - Copyright (c) 2009, 2017, MariaDB Corporation + Copyright (c) 2009, 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 @@ -1043,6 +1043,19 @@ typedef ulong myf; /* Type of MyFlags in my_funcs */ #define reg16 register #endif +/* + MYSQL_PLUGIN_IMPORT macro is used to export mysqld data + (i.e variables) for usage in storage engine loadable plugins. + Outside of Windows, it is dummy. +*/ +#ifndef MYSQL_PLUGIN_IMPORT +#if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN)) +#define MYSQL_PLUGIN_IMPORT __declspec(dllimport) +#else +#define MYSQL_PLUGIN_IMPORT +#endif +#endif + #include <my_dbug.h> /* Some helper macros */ @@ -1169,19 +1182,6 @@ typedef struct { const char *dli_fname, dli_fbase; } Dl_info; #endif #endif /* !defined(__func__) */ -/* - MYSQL_PLUGIN_IMPORT macro is used to export mysqld data - (i.e variables) for usage in storage engine loadable plugins. - Outside of Windows, it is dummy. -*/ -#ifndef MYSQL_PLUGIN_IMPORT -#if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN)) -#define MYSQL_PLUGIN_IMPORT __declspec(dllimport) -#else -#define MYSQL_PLUGIN_IMPORT -#endif -#endif - /* Defines that are unique to the embedded version of MySQL */ #ifdef EMBEDDED_LIBRARY |