Probably working auto reconnect to mysql database

This commit is contained in:
HanzZ 2011-10-19 19:58:56 +02:00
parent c86358c64f
commit 30cec7bb55

View file

@ -257,6 +257,8 @@ MySQLBackend::Statement& MySQLBackend::Statement::operator >> (std::string& t) {
MySQLBackend::MySQLBackend(Config *config) {
m_config = config;
mysql_init(&m_conn);
my_bool my_true = 1;
mysql_options(&m_conn, MYSQL_OPT_RECONNECT, &my_true);
m_prefix = CONFIG_STRING(m_config, "database.prefix");
}