getArg("group"),
mustDo("innodb-read-committed"),
getArgAsNum("timeout"),
- mustDo("thread-cleanup")));
+ mustDo("thread-cleanup"),
+ mustDo("ssl")));
}
class gMySQLFactory : public BackendFactory
declare(suffix,"innodb-read-committed","Use InnoDB READ-COMMITTED transaction isolation level","yes");
declare(suffix,"timeout", "The timeout in seconds for each attempt to read/write to the server", "10");
declare(suffix,"thread-cleanup","Explicitly call mysql_thread_end() when threads end","no");
+ declare(suffix,"ssl","Send the SSL capability flag to the server","no");
declare(suffix,"dnssec","Enable DNSSEC processing","no");
d_database.empty() ? NULL : d_database.c_str(),
d_port,
d_msocket.empty() ? NULL : d_msocket.c_str(),
- CLIENT_MULTI_RESULTS)) {
+ (d_clientSSL ? CLIENT_SSL : 0) | CLIENT_MULTI_RESULTS)) {
if (retry == 0)
throw sPerrorException("Unable to connect to database");
}
SMySQL::SMySQL(const string &database, const string &host, uint16_t port, const string &msocket, const string &user,
- const string &password, const string &group, bool setIsolation, unsigned int timeout, bool threadCleanup):
- d_database(database), d_host(host), d_msocket(msocket), d_user(user), d_password(password), d_group(group), d_timeout(timeout), d_port(port), d_setIsolation(setIsolation), d_threadCleanup(threadCleanup)
+ const string &password, const string &group, bool setIsolation, unsigned int timeout, bool threadCleanup, bool clientSSL):
+ d_database(database), d_host(host), d_msocket(msocket), d_user(user), d_password(password), d_group(group), d_timeout(timeout), d_port(port), d_setIsolation(setIsolation), d_threadCleanup(threadCleanup), d_clientSSL(clientSSL)
{
connect();
}
const string &msocket="",const string &user="",
const string &password="", const string &group="",
bool setIsolation=false, unsigned int timeout=10,
- bool threadCleanup=false);
+ bool threadCleanup=false, bool clientSSL=false);
~SMySQL();
uint16_t d_port;
bool d_setIsolation;
bool d_threadCleanup;
+ bool d_clientSSL;
};
#endif /* SSMYSQL_HH */