summaryrefslogtreecommitdiff
path: root/plugin/handler_socket
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-05-04 15:23:26 +0200
committerSergei Golubchik <serg@mariadb.org>2016-05-04 15:23:26 +0200
commit87e3e67f434628768b5125fbab7e8862fa60da1a (patch)
treedf19b8bcac9988d83270ed1da05f765bfc4e8624 /plugin/handler_socket
parent80da57cc4f0c717ee3e01ac5abccc859b88a2fbf (diff)
parentcee9ab9d85a8d75290b0d60bc7af26c8cf179a1d (diff)
downloadmariadb-git-87e3e67f434628768b5125fbab7e8862fa60da1a.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'plugin/handler_socket')
-rw-r--r--plugin/handler_socket/client/hslongrun.cpp6
-rw-r--r--plugin/handler_socket/libhsclient/fatal.cpp8
-rw-r--r--plugin/handler_socket/libhsclient/fatal.hpp1
-rw-r--r--plugin/handler_socket/libhsclient/socket.cpp2
4 files changed, 4 insertions, 13 deletions
diff --git a/plugin/handler_socket/client/hslongrun.cpp b/plugin/handler_socket/client/hslongrun.cpp
index e82c12b166b..b7c02951340 100644
--- a/plugin/handler_socket/client/hslongrun.cpp
+++ b/plugin/handler_socket/client/hslongrun.cpp
@@ -39,7 +39,7 @@ struct auto_mysql : private noncopyable {
mysql_close(db);
}
if ((db = mysql_init(0)) == 0) {
- fatal_exit("failed to initialize mysql client");
+ fatal_abort("failed to initialize mysql client");
}
}
operator MYSQL *() const { return db; }
@@ -870,7 +870,7 @@ mysql_do(MYSQL *db, const char *query)
{
if (mysql_real_query(db, query, strlen(query)) != 0) {
fprintf(stderr, "mysql: e=[%s] q=[%s]\n", mysql_error(db), query);
- fatal_exit("mysql_do");
+ fatal_abort("mysql_do");
}
}
@@ -886,7 +886,7 @@ hs_longrun_init_table(const config& conf, int num_prepare,
if (!mysql_real_connect(db, mysql_host.c_str(), mysql_user.c_str(),
mysql_passwd.c_str(), mysql_dbname.c_str(), mysql_port, 0, 0)) {
fprintf(stderr, "mysql: error=[%s]\n", mysql_error(db));
- fatal_exit("hs_longrun_init_table");
+ fatal_abort("hs_longrun_init_table");
}
mysql_do(db, "drop database if exists hstestdb");
mysql_do(db, "create database hstestdb");
diff --git a/plugin/handler_socket/libhsclient/fatal.cpp b/plugin/handler_socket/libhsclient/fatal.cpp
index 5cdd8879ab1..8e109cf13ba 100644
--- a/plugin/handler_socket/libhsclient/fatal.cpp
+++ b/plugin/handler_socket/libhsclient/fatal.cpp
@@ -18,14 +18,6 @@ namespace dena {
const int opt_syslog = LOG_ERR | LOG_PID | LOG_CONS;
void
-fatal_exit(const std::string& message)
-{
- fprintf(stderr, "FATAL_EXIT: %s\n", message.c_str());
- syslog(opt_syslog, "FATAL_EXIT: %s", message.c_str());
- _exit(1);
-}
-
-void
fatal_abort(const std::string& message)
{
fprintf(stderr, "FATAL_COREDUMP: %s\n", message.c_str());
diff --git a/plugin/handler_socket/libhsclient/fatal.hpp b/plugin/handler_socket/libhsclient/fatal.hpp
index 8a630fab1cb..5eaa3db8687 100644
--- a/plugin/handler_socket/libhsclient/fatal.hpp
+++ b/plugin/handler_socket/libhsclient/fatal.hpp
@@ -13,7 +13,6 @@
namespace dena {
-void fatal_exit(const std::string& message);
void fatal_abort(const std::string& message);
};
diff --git a/plugin/handler_socket/libhsclient/socket.cpp b/plugin/handler_socket/libhsclient/socket.cpp
index cf19d4bbe14..2c93a3b4846 100644
--- a/plugin/handler_socket/libhsclient/socket.cpp
+++ b/plugin/handler_socket/libhsclient/socket.cpp
@@ -43,7 +43,7 @@ socket_args::set(const config& conf)
} else {
const char *nd = node.empty() ? 0 : node.c_str();
if (resolve(nd, port.c_str()) != 0) {
- fatal_exit("getaddrinfo failed: " + node + ":" + port);
+ fatal_abort("getaddrinfo failed: " + node + ":" + port);
}
}
}