mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
MySQL fixes/additions/improvements
- fixed GH #187: MySQL: allow access to the underlying connection handle - added GH #186: MySQL: support for MYSQL_SECURE_AUTH - fixed GH #174: MySQL: 4GB allocated when reading any largetext or largeblob field
This commit is contained in:
@@ -95,8 +95,13 @@ void SessionHandle::options(mysql_option opt, unsigned int i)
|
||||
|
||||
void SessionHandle::connect(const char* host, const char* user, const char* password, const char* db, unsigned int port)
|
||||
{
|
||||
#ifdef HAVE_MYSQL_REAL_CONNECT
|
||||
if (!mysql_real_connect(_pHandle, host, user, password, db, port, 0, 0))
|
||||
throw ConnectionFailedException(mysql_error(_pHandle));
|
||||
#else
|
||||
if (!mysql_connect(_pHandle, host, user, password))
|
||||
throw ConnectionFailedException(mysql_error(_pHandle))
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user