Diff for /parser3/src/main/pa_sql_driver_manager.C between versions 1.86 and 1.88

version 1.86, 2006/04/09 13:38:47 version 1.88, 2008/06/26 09:41:55
Line 115  SQL_Driver_manager::~SQL_Driver_manager( Line 115  SQL_Driver_manager::~SQL_Driver_manager(
 /// @param aurl protocol://[driver-dependent]  /// @param aurl protocol://[driver-dependent]
 SQL_Connection* SQL_Driver_manager::get_connection(const String& aurl,  SQL_Connection* SQL_Driver_manager::get_connection(const String& aurl,
                                                    Table *protocol2driver_and_client,                                                     Table *protocol2driver_and_client,
                                                    const char* arequest_charset) {                                                     const char* arequest_charset,
                                                      const char* adocument_root) {
         // we have table for locating protocol's library          // we have table for locating protocol's library
         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");
   
Line 138  SQL_Connection* SQL_Driver_manager::get_ Line 139  SQL_Connection* SQL_Driver_manager::get_
         else { // no cached connection or it were unpingabe: connect/reconnect          else { // no cached connection or it were unpingabe: connect/reconnect
                 url_cstr=aurl.cstrm();                  url_cstr=aurl.cstrm();
                 if(!strstr(url_cstr, "://"))                  if(!strstr(url_cstr, "://"))
                         throw Exception("parser.runtime",                          throw Exception(PARSER_RUNTIME,
                                 aurl.length()?&aurl:0,                                  aurl.length()?&aurl:0,
                                 "connection string must start with protocol://");                                  "connection string must start with protocol://");
   
Line 158  SQL_Connection* SQL_Driver_manager::get_ Line 159  SQL_Connection* SQL_Driver_manager::get_
                         Table::Action_options options;                          Table::Action_options options;
                         if(protocol2driver_and_client->locate(0, protocol, options)) {                          if(protocol2driver_and_client->locate(0, protocol, options)) {
                                 if(!(library=protocol2driver_and_client->item(1)) || library->length()==0)                                  if(!(library=protocol2driver_and_client->item(1)) || library->length()==0)
                                         throw Exception("parser.runtime",                                          throw Exception(PARSER_RUNTIME,
                                                 0,                                                  0,
                                                 "driver library column for protocol '%s' is empty",                                                   "driver library column for protocol '%s' is empty", 
                                                         protocol_cstr);                                                          protocol_cstr);
                                 dlopen_file_spec=protocol2driver_and_client->item(2);                                  dlopen_file_spec=protocol2driver_and_client->item(2);
                         } else                          } else
                                 throw Exception("parser.runtime",                                  throw Exception(PARSER_RUNTIME,
                                         &aurl,                                          &aurl,
                                         "undefined protocol '%s'",                                           "undefined protocol '%s'", 
                                                 protocol_cstr);                                                  protocol_cstr);
Line 220  SQL_Connection* SQL_Driver_manager::get_ Line 221  SQL_Connection* SQL_Driver_manager::get_
                         put_driver_to_cache(protocol, driver);                          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)                  // associate with pool[request]  (deassociates at close)
                 connection->set_url();                   connection->set_url(); 
         }          }

Removed from v.1.86  
changed lines
  Added in v.1.88


E-mail: