Diff for /parser3/src/main/pa_sql_driver_manager.C between versions 1.92 and 1.97

version 1.92, 2013/07/05 21:09:58 version 1.97, 2017/02/07 22:00:44
Line 1 Line 1
 /** @file  /** @file
         Parser: sql driver manager implementation.          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 <paf@design.ru> (http://paf.design.ru)          Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
 */  */
   
Line 65  void SQL_Driver_services_impl::transcode Line 65  void SQL_Driver_services_impl::transcode
                         charset_from_object=cache[0].object;                          charset_from_object=cache[0].object;
                 } else {                  } else {
                         cache[0].name=charset_from_name;                          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) {                  if(charset_to_name==cache[1].name) {
                         charset_to_object=cache[1].object;                          charset_to_object=cache[1].object;
                 } else {                  } else {
                         cache[1].name=charset_to_name;                          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),                   String::C result=Charset::transcode(String::C(src, src_length), *charset_from_object, *charset_to_object);
                         *charset_from_object,  
                         *charset_to_object);  
                 dst=result.str;                  dst=result.str;
                 dst_length=result.length;                  dst_length=result.length;
         } catch(const Exception& e) {          } catch(const Exception& e) {
Line 116  SQL_Connection* SQL_Driver_manager::get_ Line 114  SQL_Connection* SQL_Driver_manager::get_
         if(!protocol2driver_and_client)          if(!protocol2driver_and_client)
                 throw Exception(PARSER_RUNTIME,                  throw Exception(PARSER_RUNTIME,
                         &aurl,                          &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          // first trying to get cached connection
         SQL_Connection* connection=get_connection_from_cache(aurl);          SQL_Connection* connection=get_connection_from_cache(aurl);
Line 181  SQL_Connection* SQL_Driver_manager::get_ Line 179  SQL_Connection* SQL_Driver_manager::get_
                         if(!create)                          if(!create)
                                 throw Exception(0,                                  throw Exception(0,
                                         library,                                          library,
                                         "function '"SQL_DRIVER_CREATE_NAME"' was not found");                                          "function '" SQL_DRIVER_CREATE_NAME "' was not found");
   
                         // create library-driver!                          // create library-driver!
                         driver=(*create)();                          driver=(*create)();

Removed from v.1.92  
changed lines
  Added in v.1.97


E-mail: