diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /storage/spider/hs_client/fatal.cpp | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-upstream.tar.xz mariadb-10.5-upstream.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/spider/hs_client/fatal.cpp')
-rw-r--r-- | storage/spider/hs_client/fatal.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/storage/spider/hs_client/fatal.cpp b/storage/spider/hs_client/fatal.cpp new file mode 100644 index 00000000..cfbc14df --- /dev/null +++ b/storage/spider/hs_client/fatal.cpp @@ -0,0 +1,49 @@ + +// vim:sw=2:ai + +/* + * Copyright (C) 2010-2011 DeNA Co.,Ltd.. All rights reserved. + * Copyright (C) 2011-2017 Kentoku SHIBA + * See COPYRIGHT.txt for details. + */ + +#include <my_global.h> +#include "mysql_version.h" +#if MYSQL_VERSION_ID < 50500 +#include "mysql_priv.h" +#include <mysql/plugin.h> +#else +#include "sql_priv.h" +#include "probes_mysql.h" +#endif + +#include "fatal.hpp" + +namespace dena { + +/* +const int opt_syslog = LOG_ERR | LOG_PID | LOG_CONS; +*/ + +void +fatal_abort(const String& message) +{ + fprintf(stderr, "FATAL_COREDUMP: %s\n", message.ptr()); +/* + syslog(opt_syslog, "FATAL_COREDUMP: %s", message.ptr()); +*/ + abort(); +} + +void +fatal_abort(const char *message) +{ + fprintf(stderr, "FATAL_COREDUMP: %s\n", message); +/* + syslog(opt_syslog, "FATAL_COREDUMP: %s", message); +*/ + abort(); +} + +}; + |