mysqlxx: fixed error in prev. revision.

This commit is contained in:
Alexey Milovidov 2011-05-13 17:48:30 +00:00
parent b45adb47fc
commit 5c023f20e3

View File

@ -43,8 +43,8 @@ void Connection::connect(const char* db,
/// Установим таймауты /// Установим таймауты
unsigned int timeout = MYSQLXX_TIMEOUT; unsigned int timeout = MYSQLXX_TIMEOUT;
if (!mysql_options(&driver, MYSQL_OPT_CONNECT_TIMEOUT, &timeout) if (!mysql_options(&driver, MYSQL_OPT_CONNECT_TIMEOUT, reinterpret_cast<const char *>(&timeout))
|| !mysql_options(&driver, MYSQL_OPT_READ_TIMEOUT, &timeout)) || !mysql_options(&driver, MYSQL_OPT_READ_TIMEOUT, reinterpret_cast<const char *>(&timeout)))
throw ConnectionFailed(mysql_error(&driver), mysql_errno(&driver)); throw ConnectionFailed(mysql_error(&driver), mysql_errno(&driver));
if (!mysql_real_connect(&driver, server, user, password, db, port, NULL, driver.client_flag)) if (!mysql_real_connect(&driver, server, user, password, db, port, NULL, driver.client_flag))