summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-08-31 06:53:45 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-08-31 06:53:45 +0300
commitdb4a27ab738c3ab43173368117583402f995c4f1 (patch)
tree01a367ede38cc8ede00038a904c96b76e570de5f /include
parentd1ef02e9592b744d6c8dbca9231152f0a58d4384 (diff)
parent396da1a70548f80ecf781cf352b0d4a5740c54f6 (diff)
downloadmariadb-git-db4a27ab738c3ab43173368117583402f995c4f1.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'include')
-rw-r--r--include/my_dbug.h8
-rw-r--r--include/my_global.h28
-rw-r--r--include/my_sys.h3
3 files changed, 22 insertions, 17 deletions
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 4b69787c2fe..bce33285788 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates.
- Copyright (C) 2000, 2017, MariaDB Corporation Ab
+ Copyright (C) 2000, 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
@@ -35,6 +35,7 @@ struct _db_stack_frame_ {
};
struct _db_code_state_;
+extern MYSQL_PLUGIN_IMPORT my_bool my_assert;
extern my_bool _dbug_on_;
extern my_bool _db_keyword_(struct _db_code_state_ *, const char *, int);
extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len);
@@ -103,7 +104,10 @@ extern int (*dbug_sanity)(void);
#define DBUG_END() _db_end_ ()
#define DBUG_LOCK_FILE _db_lock_file_()
#define DBUG_UNLOCK_FILE _db_unlock_file_()
-#define DBUG_ASSERT(A) do { if (!(A)) { _db_flush_(); assert(A); }} while (0)
+#define DBUG_ASSERT(A) do { if (!(A)) { _db_flush_(); \
+ if (my_assert) assert(A); \
+ else fprintf(stderr, "%s:%d: assert: %s\n", __FILE__, __LINE__, #A); \
+}} while (0)
#define DBUG_SLOW_ASSERT(A) DBUG_ASSERT(A)
#define DBUG_ASSERT_EXISTS
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
diff --git a/include/my_global.h b/include/my_global.h
index 248320e301f..cc513cc1be0 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
@@ -1037,6 +1037,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 */
@@ -1163,19 +1176,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
diff --git a/include/my_sys.h b/include/my_sys.h
index eb6129ea238..76f425375bc 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
@@ -266,6 +266,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() */