diff --git a/lib/MySQL_HostGroups_Manager.cpp b/lib/MySQL_HostGroups_Manager.cpp index 2a3dd6c17..b78558547 100644 --- a/lib/MySQL_HostGroups_Manager.cpp +++ b/lib/MySQL_HostGroups_Manager.cpp @@ -872,6 +872,14 @@ void MySrvC::connect_error(int err_num) { return; if (err_num >= 1054 && err_num <= 1075) return; + if (err_num >= 1099 && err_num <= 1104) + return; + if (err_num >= 1106 && err_num <= 1113) + return; + if (err_num >= 1116 && err_num <= 1118) + return; + if (err_num == 1136 || (err_num >= 1138 && err_num <= 1149)) + return; switch (err_num) { case 1007: // Can't create database case 1008: // Can't drop database @@ -884,6 +892,7 @@ void MySrvC::connect_error(int err_num) { case 1051: // Unknown table case 1052: // Column is ambiguous */ + case 1120: case 1203: // User %s already has more than 'max_user_connections' active connections case 1226: // User '%s' has exceeded the '%s' resource (current value: %ld) return; diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index d3917386a..39a2491f6 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -550,6 +550,11 @@ void MySQL_Session::reset() { } } } + if (client_myds) { + if (client_myds->myconn) { + client_myds->myconn->reset(); + } + } } MySQL_Session::~MySQL_Session() { diff --git a/test/tap/tests/sqlite3-t.cpp b/test/tap/tests/sqlite3-t.cpp index 5a25eaf56..010bc6686 100644 --- a/test/tap/tests/sqlite3-t.cpp +++ b/test/tap/tests/sqlite3-t.cpp @@ -11,8 +11,17 @@ #include "sqlite3db.h" int main() { - plan(8); SQLite3DB::LoadPlugin(NULL); + plan(9); + + { + int i=sqlite3_config(SQLITE_CONFIG_URI, 1); + if (i!=SQLITE_OK) { + fprintf(stderr,"SQLITE: Error on sqlite3_config(SQLITE_CONFIG_URI,1)\n"); + } + ok(i==SQLITE_OK, "Setting SQLITE_CONFIG_URI"); + } + SQLite3DB *db; // in memory db = new SQLite3DB(); db->open((char *)"file:mem_db?mode=memory&cache=shared", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX);