--- parser3/src/main/pa_sql_driver_manager.C 2007/04/23 10:30:32 1.87 +++ parser3/src/main/pa_sql_driver_manager.C 2009/07/06 12:07:04 1.90 @@ -1,11 +1,11 @@ /** @file Parser: sql driver manager implementation. - Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_SQL_DRIVER_MANAGER_C="$Date: 2007/04/23 10:30:32 $"; +static const char * const IDENT_SQL_DRIVER_MANAGER_C="$Date: 2009/07/06 12:07:04 $"; #include "pa_sql_driver_manager.h" #include "ltdl.h" @@ -115,7 +115,8 @@ SQL_Driver_manager::~SQL_Driver_manager( /// @param aurl protocol://[driver-dependent] SQL_Connection* SQL_Driver_manager::get_connection(const String& aurl, Table *protocol2driver_and_client, - const char* arequest_charset) { + const char* arequest_charset, + const char* adocument_root) { // we have table for locating protocol's library if(!protocol2driver_and_client) throw Exception(PARSER_RUNTIME, @@ -178,7 +179,7 @@ SQL_Connection* SQL_Driver_manager::get_ is_dlinited=true; } - const char* filename=library->cstr(String::L_FILE_SPEC); + const char* filename=library->taint_cstr(String::L_FILE_SPEC); lt_dlhandle handle=lt_dlopen(filename); if (!handle) { const char* error=lt_dlerror(); @@ -208,7 +209,7 @@ SQL_Connection* SQL_Driver_manager::get_ // initialise by connecting to sql client dynamic link library char* dlopen_file_spec_cstr= dlopen_file_spec && dlopen_file_spec->length()? - dlopen_file_spec->cstrm(String::L_AS_IS):0; + dlopen_file_spec->taint_cstrm(String::L_AS_IS):0; if(const char* error=driver->initialize(dlopen_file_spec_cstr)) throw Exception(0, library, @@ -220,7 +221,7 @@ SQL_Connection* SQL_Driver_manager::get_ put_driver_to_cache(protocol, driver); } - connection=new SQL_Connection(aurl, *driver, arequest_charset); + connection=new SQL_Connection(aurl, *driver, arequest_charset, adocument_root); // associate with pool[request] (deassociates at close) connection->set_url(); }