--- parser3/src/main/pa_sql_driver_manager.C 2020/12/10 23:21:09 1.99 +++ parser3/src/main/pa_sql_driver_manager.C 2024/11/04 03:53:25 1.105 @@ -1,8 +1,8 @@ /** @file Parser: sql driver manager implementation. - Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ #include "pa_sql_driver_manager.h" @@ -15,7 +15,7 @@ #include "pa_vtable.h" #include "pa_charsets.h" -volatile const char * IDENT_PA_SQL_DRIVER_MANAGER_C="$Id: pa_sql_driver_manager.C,v 1.99 2020/12/10 23:21:09 moko Exp $" IDENT_PA_SQL_DRIVER_MANAGER_H IDENT_PA_SQL_CONNECTION_H; +volatile const char * IDENT_PA_SQL_DRIVER_MANAGER_C="$Id: pa_sql_driver_manager.C,v 1.105 2024/11/04 03:53:25 moko Exp $" IDENT_PA_SQL_DRIVER_MANAGER_H IDENT_PA_SQL_CONNECTION_H; // globals @@ -23,7 +23,7 @@ SQL_Driver_manager* SQL_driver_manager=0 // consts -const time_t EXPIRE_UNUSED_CONNECTION_SECONDS=60; +const time_t EXPIRE_UNUSED_CONNECTION_SECONDS=10; const time_t CHECK_EXPIRED_CONNECTIONS_SECONDS=EXPIRE_UNUSED_CONNECTION_SECONDS*2; // helpers @@ -154,7 +154,7 @@ SQL_Connection* SQL_Driver_manager::get_ lt_dlhandle handle=lt_dlopen(filename); if (!handle) { const char* error=lt_dlerror(); - throw Exception(0, library, error ? error : "can not open the module"); + throw Exception(0, library, error ? error : "cannot open the module"); } SQL_Driver_create_func create=(SQL_Driver_create_func)(lt_dlsym(handle, @@ -262,7 +262,7 @@ static void add_connection_to_status_cac } } static void add_connections_to_status_cache_table(SQL_Driver_manager::connection_cache_type::key_type /*key*/, SQL_Driver_manager::connection_cache_type::value_type stack, Table* table) { - for(Array_iterator i(*stack); i.has_next(); ) + for(Array_iterator i(*stack); i; ) add_connection_to_status_cache_table(*i.next(), table); }