mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 15:25:33 +02:00
Merge branch '10.0' into 10.1
This commit is contained in:
commit
87e3e67f43
218 changed files with 3609 additions and 1022 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -17,14 +17,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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
|
||||
namespace dena {
|
||||
|
||||
void fatal_exit(const std::string& message);
|
||||
void fatal_abort(const std::string& message);
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,13 +97,11 @@ static void closelog() {}
|
|||
#define FLOGGER_NO_PSI
|
||||
|
||||
/* How to access the pthread_mutex in mysql_mutex_t */
|
||||
//#ifdef SAFE_MUTEX
|
||||
//#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
|
||||
//#elif defined(MY_PTHREAD_FASTMUTEX)
|
||||
//#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
|
||||
//#else
|
||||
#if defined(SAFE_MUTEX) || defined(MY_PTHREAD_FASTMUTEX)
|
||||
#define mysql_mutex_real_mutex(A) &(A)->m_mutex.mutex
|
||||
#else
|
||||
#define mysql_mutex_real_mutex(A) &(A)->m_mutex
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
#define flogger_mutex_init(A,B,C) do{}while(0)
|
||||
#define flogger_mutex_destroy(A) do{}while(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue