--- parser3/src/main/pa_sql_driver_manager.C 2013/07/05 21:09:58 1.92 +++ parser3/src/main/pa_sql_driver_manager.C 2017/02/07 22:00:44 1.97 @@ -1,7 +1,7 @@ /** @file Parser: sql driver manager implementation. - Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ @@ -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.92 2013/07/05 21:09:58 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.97 2017/02/07 22:00:44 moko Exp $" IDENT_PA_SQL_DRIVER_MANAGER_H IDENT_PA_SQL_CONNECTION_H; // globals @@ -65,18 +65,16 @@ void SQL_Driver_services_impl::transcode charset_from_object=cache[0].object; } else { cache[0].name=charset_from_name; - cache[0].object=charset_from_object=&charsets.get(charset_from_name); + cache[0].object=charset_from_object=&pa_charsets.get_direct(charset_from_name); } if(charset_to_name==cache[1].name) { charset_to_object=cache[1].object; } else { cache[1].name=charset_to_name; - cache[1].object=charset_to_object=&charsets.get(charset_to_name); + cache[1].object=charset_to_object=&pa_charsets.get_direct(charset_to_name); } - String::C result=Charset::transcode(String::C(src, src_length), - *charset_from_object, - *charset_to_object); + String::C result=Charset::transcode(String::C(src, src_length), *charset_from_object, *charset_to_object); dst=result.str; dst_length=result.length; } catch(const Exception& e) { @@ -116,7 +114,7 @@ SQL_Connection* SQL_Driver_manager::get_ if(!protocol2driver_and_client) throw Exception(PARSER_RUNTIME, &aurl, - "$"MAIN_SQL_NAME":"MAIN_SQL_DRIVERS_NAME" table must be defined"); + "$" MAIN_SQL_NAME ":" MAIN_SQL_DRIVERS_NAME " table must be defined"); // first trying to get cached connection SQL_Connection* connection=get_connection_from_cache(aurl); @@ -181,7 +179,7 @@ SQL_Connection* SQL_Driver_manager::get_ if(!create) throw Exception(0, library, - "function '"SQL_DRIVER_CREATE_NAME"' was not found"); + "function '" SQL_DRIVER_CREATE_NAME "' was not found"); // create library-driver! driver=(*create)();