mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Set timeout values in MYSQLC::Open
modified: storage/connect/myconn.cpp
This commit is contained in:
@@ -311,6 +311,8 @@ int MYSQLC::Open(PGLOBAL g, const char *host, const char *db,
|
||||
const char *user, const char *pwd,
|
||||
int pt)
|
||||
{
|
||||
uint cto = 60, nrt = 120;
|
||||
|
||||
m_DB = mysql_init(NULL);
|
||||
|
||||
if (!m_DB) {
|
||||
@@ -323,6 +325,9 @@ int MYSQLC::Open(PGLOBAL g, const char *host, const char *db,
|
||||
// client's options, and vice versa.
|
||||
mysql_options(m_DB, MYSQL_READ_DEFAULT_GROUP, "PlugDB_CLIENT");
|
||||
mysql_options(m_DB, MYSQL_OPT_USE_REMOTE_CONNECTION, NULL);
|
||||
mysql_options(m_DB, MYSQL_OPT_CONNECT_TIMEOUT, &cto);
|
||||
mysql_options(m_DB, MYSQL_OPT_READ_TIMEOUT, &nrt);
|
||||
//mysql_options(m_DB, MYSQL_OPT_WRITE_TIMEOUT, ...);
|
||||
|
||||
#if 0
|
||||
if (pwd && !strcmp(pwd, "*")) {
|
||||
|
Reference in New Issue
Block a user