diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp index 9ebf77ff35a..41fdb1f5e98 100644 --- a/storage/connect/myconn.cpp +++ b/storage/connect/myconn.cpp @@ -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, "*")) {