Diff for /sql/mysql/parser3mysql.C between versions 1.18 and 1.33

version 1.18, 2004/01/30 07:30:40 version 1.33, 2008/06/26 14:30:48
Line 29  static const char *RCSId="$Id$"; Line 29  static const char *RCSId="$Id$";
 #endif  #endif
   
 static char *lsplit(char *string, char delim) {  static char *lsplit(char *string, char delim) {
     if(string) {          if(string) {
                 char *v=strchr(string, delim);                  char *v=strchr(string, delim);
                 if(v) {                  if(v) {
                         *v=0;                          *v=0;
                         return v+1;                          return v+1;
                 }                  }
     }          }
     return 0;          return 0;
 }  }
   
 static char *lsplit(char **string_ref, char delim) {  static char *lsplit(char **string_ref, char delim) {
     char *result=*string_ref;          char *result=*string_ref;
         char *next=lsplit(*string_ref, delim);          char *next=lsplit(*string_ref, delim);
     *string_ref=next;          *string_ref=next;
     return result;          return result;
   }
   
   static char* rsplit(char* string, char delim) {
           if(string) {
                   char* v=strrchr(string, delim); 
                   if(v) {
                           *v=0;
                           return v+1;
                   }
           }
           return NULL;    
   }
   
   static void toupper_str(char *out, const char *in, size_t size) {
           while(size--)
                   *out++=(char)toupper(*in++);
 }  }
   
 struct Connection {  struct Connection {
         SQL_Driver_services* services;          SQL_Driver_services* services;
   
         MYSQL* handle;          MYSQL* handle;
           const char* client_charset;
         bool autocommit;          bool autocommit;
           bool multi_statements;
 };  };
   
    
 /**  /**
         MySQL server driver          MySQL server driver
 */  */
 class MySQL_Driver : public SQL_Driver {  class MySQL_Driver : public SQL_Driver {
 public:  public:
   
         MySQL_Driver() : SQL_Driver() {          MySQL_Driver() : SQL_Driver() {}
   
           ~MySQL_Driver() {
                   if(mysql_server_end)
                           mysql_server_end();
         }          }
   
         /// get api version          /// get api version
         int api_version() { return SQL_DRIVER_API_VERSION; }          int api_version() { return SQL_DRIVER_API_VERSION; }
   
         /// initialize driver by loading sql dynamic link library          /// initialize driver by loading sql dynamic link library
         const char *initialize(char *dlopen_file_spec) {          const char *initialize(char *dlopen_file_spec) {
                 return dlopen_file_spec?                  return dlopen_file_spec?
                         dlink(dlopen_file_spec):"client library column is empty";                          dlink(dlopen_file_spec):"client library column is empty";
         }          }
   
         /**     connect          /**     connect
                 @param used_only_in_connect_url                  @param url
                         format: @b user:pass@host[:port]|[/unix/socket]/database?                          format: @b user:pass@host[:port]|[/unix/socket]/database?
                                 charset=cp1251_koi8&                                  charset=value&  // transcode by server with command 'SET CHARACTER SET value'
                                   ClientCharset=charset&  // transcode by parser
                                 timeout=3&                                  timeout=3&
                                 compress=1&                                  compress=0&
                                 named_pipe=1                                  named_pipe=1&
                         3.23.22b                                  autocommit=1&
                         Currently the only option for @b character_set_name is cp1251_koi8.                                  multi_statements=0      // allow more then one statement in one query
                         WARNING: must be used only to connect, for buffer doesn't live long                          3.x, 4.0 
                                   only option for charset is cp1251_koi8.
                           4.1+ accept not 'cp1251_koi8' but 'cp1251', 'utf8' and much more
                                   it is usable for transcoding using sql server
         */          */
         void connect(          void connect(
                 char *used_only_in_connect_url,                                   char *url, 
                 SQL_Driver_services& services,                                   SQL_Driver_services& services, 
                 void **connection_ref ///< output: Connection*                                  void **connection_ref ///< output: Connection*
                 ) {          ){
                 char *user=used_only_in_connect_url;                  char *user=url;
                 char *s=lsplit(user, '@');                  char *s=rsplit(user, '@');
                 char *host=0;                  char *host=0;
                 char *unix_socket=0;                  char *unix_socket=0;
                 if(s && s[0]=='[') { // unix socket                  if(s && s[0]=='[') { // unix socket
Line 104  public: Line 133  public:
   
                 char *charset=0;                  char *charset=0;
   
                 Connection& connection=*(Connection  *)services.malloc(sizeof(Connection));                  Connection& connection=*(Connection *)services.malloc(sizeof(Connection));
                   *connection_ref=&connection;
                 connection.services=&services;                  connection.services=&services;
             connection.handle=mysql_init(NULL);                  connection.handle=mysql_init(NULL);
                   connection.client_charset=0;    
                 connection.autocommit=true;                  connection.autocommit=true;
                 *connection_ref=&connection;                  connection.multi_statements=false;
   
                 while(options) {                  while(options){
                         if(char *key=lsplit(&options, '&')) {                          if(char *key=lsplit(&options, '&')){
                                 if(*key) {                                  if(*key){
                                         if(char *value=lsplit(key, '=')) {                                          if(char *value=lsplit(key, '=')){
                                                 if(strcasecmp(key, "charset")==0) {                                                  if(strcmp(key, "ClientCharset")==0){ // transcoding with parser
                                                           toupper_str(value, value, strlen(value));
                                                           connection.client_charset=value;
                                                   } else if(strcasecmp(key, "charset")==0){ // transcoding with server
                                                         charset=value;                                                          charset=value;
                                                 } else if(strcasecmp(key, "timeout")==0) {                                                  } else if(strcasecmp(key, "timeout")==0){
                                                         unsigned int timeout=(unsigned int)atoi(value);                                                          unsigned int timeout=(unsigned int)atoi(value);
                                                         if(mysql_options(connection.handle, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&timeout)!=0)                                                          if(mysql_options(connection.handle, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&timeout)!=0)
                                                                 services._throw(mysql_error(connection.handle));                                                                  services._throw(mysql_error(connection.handle));
                                                 } else if(strcasecmp(key, "compress")==0) {                                                  } else if(strcasecmp(key, "compress")==0){
                                                         if(atoi(value))                                                          if(atoi(value))
                                                                 if(mysql_options(connection.handle, MYSQL_OPT_COMPRESS, 0)!=0)                                                                  if(mysql_options(connection.handle, MYSQL_OPT_COMPRESS, 0)!=0)
                                                                         services._throw(mysql_error(connection.handle));                                                                          services._throw(mysql_error(connection.handle));
                                                 } else if(strcasecmp(key, "named_pipe")==0) {                                                  } else if(strcasecmp(key, "named_pipe")==0){
                                                         if(atoi(value))                                                          if(atoi(value))
                                                                 if(mysql_options(connection.handle, MYSQL_OPT_NAMED_PIPE , 0)!=0)                                                                  if(mysql_options(connection.handle, MYSQL_OPT_NAMED_PIPE, 0)!=0)
                                                                         services._throw(mysql_error(connection.handle));                                                                          services._throw(mysql_error(connection.handle));
                                                 } else if(strcasecmp(key, "autocommit")==0) {                                                  } else if(strcasecmp(key, "multi_statements")==0) {
                                                         if(atoi(value)==0) {                                                          if(atoi(value)!=0)
                                                                   connection.multi_statements=true;
                                                   } else if(strcasecmp(key, "autocommit")==0){
                                                           if(atoi(value)==0)
                                                                 connection.autocommit=false;                                                                  connection.autocommit=false;
                                                         }  
                                                 } else                                                  } else
                                                         services._throw("unknown connect option" /*key*/);                                                          services._throw("unknown connect option" /*key*/);
                                         } else                                           } else 
Line 140  public: Line 176  public:
                         }                          }
                 }                  }
   
                 if(!mysql_real_connect(connection.handle,                   if(!mysql_real_connect(
                         host, user, pwd, db, port?port:MYSQL_PORT, unix_socket, 0))                                          connection.handle, 
                                           host, user, pwd, db,
                                           port?port:MYSQL_PORT,
                                           unix_socket,
                                           (connection.multi_statements) ? CLIENT_MULTI_STATEMENTS : CLIENT_MULTI_RESULTS
                                   )
                   ){
                         services._throw(mysql_error(connection.handle));                          services._throw(mysql_error(connection.handle));
                   }
   
                 if(charset) {                  if(charset){
                         // set charset                          char statement[MAX_STRING]="SET CHARACTER SET ";
                         char statement[MAX_STRING]="set CHARACTER SET "; // cp1251_koi8  
                         strncat(statement, charset, MAX_STRING);                          strncat(statement, charset, MAX_STRING);
                                                   _exec(connection, statement);
                         exec(connection, statement);  
                 }                  }
   
                 if(!connection.autocommit)                  if(!connection.autocommit)
                         exec(connection, "set autocommit=0");                          _exec(connection, "SET AUTOCOMMIT=0");
         }  
   
         void exec(Connection& connection, const char* statement) {  
                 if(mysql_query(connection.handle, statement))   
                         connection.services->_throw(mysql_error(connection.handle));  
                 (*mysql_store_result)(connection.handle); // throw out the result [don't need but must call]  
         }          }
   
         void disconnect(void *aconnection) {          void disconnect(void *aconnection) {
                 Connection& connection=*static_cast<Connection*>(aconnection);                  Connection& connection=*static_cast<Connection*>(aconnection);
   
                 mysql_close(connection.handle);                  mysql_close(connection.handle);
                 connection.handle=0;                  connection.handle=0;
         }          }
   
         void commit(void *aconnection) {          void commit(void *aconnection) {
                 Connection& connection=*static_cast<Connection*>(aconnection);                  Connection& connection=*static_cast<Connection*>(aconnection);
   
                 if(!connection.autocommit)                  if(!connection.autocommit)
                         exec(connection, "commit");                          _exec(connection, "COMMIT");
         }          }
   
         void rollback(void *aconnection) {          void rollback(void *aconnection) {
                 Connection& connection=*static_cast<Connection*>(aconnection);                  Connection& connection=*static_cast<Connection*>(aconnection);
   
                 if(!connection.autocommit)                  if(!connection.autocommit)
                         exec(connection, "rollback");                          _exec(connection, "ROLLBACK");
         }          }
   
         bool ping(void *aconnection) {          bool ping(void *aconnection) {
                 Connection& connection=*static_cast<Connection*>(aconnection);                  Connection& connection=*static_cast<Connection*>(aconnection);
   
                 return mysql_ping(connection.handle)==0;                  return mysql_ping(connection.handle)==0;
         }          }
   
Line 199  public: Line 232  public:
                 mysql_escape_string(result, from, length);                  mysql_escape_string(result, from, length);
                 return result;                  return result;
         }          }
         void query(  
                 void *aconnection,           void query(void *aconnection, 
                 const char *astatement, unsigned long offset, unsigned long limit,                                  const char *astatement, 
                 SQL_Driver_query_event_handlers& handlers) {                                  size_t placeholders_count, Placeholder* placeholders, 
                                   unsigned long offset, unsigned long limit,
                                   SQL_Driver_query_event_handlers& handlers
           ){
                 Connection& connection=*static_cast<Connection*>(aconnection);                  Connection& connection=*static_cast<Connection*>(aconnection);
                 SQL_Driver_services& services=*connection.services;                  SQL_Driver_services& services=*connection.services;
                 MYSQL_RES *res=NULL;                  MYSQL_RES *res=NULL;
   
                   if(placeholders_count>0)
                           services._throw("bind variables not supported (yet)");
   
                   bool transcode_needed=_transcode_required(connection);
   
                   // transcode query from $request:charset to ?ClientCharset
                   if(transcode_needed){
                           size_t length=strlen(astatement);
                           services.transcode(astatement, length,
                                   astatement, length,
                                   services.request_charset(),
                                   connection.client_charset);
                   }
   
                 const char *statement;                  const char *statement;
                 if(offset || limit) {                  if(offset || limit!=SQL_NO_LIMIT){
                         size_t statement_size=strlen(astatement);                          size_t statement_size=strlen(astatement);
                         char *statement_limited=(char *)services.malloc_atomic(                          char *statement_limited=(char *)services.malloc_atomic(
                                 statement_size+MAX_NUMBER*2+8/* limit #,#*/+1);                                  statement_size+MAX_NUMBER*2+8/* LIMIT #,#*/+1);
                         char *cur=statement_limited;                          char *cur=statement_limited;
                         memcpy(cur, astatement, statement_size); cur+=statement_size;                          memcpy(cur, astatement, statement_size); cur+=statement_size;
                         cur+=sprintf(cur, " limit ");                          cur+=sprintf(cur, " LIMIT ");
                         if(offset)                          if(offset)
                                 cur+=snprintf(cur, MAX_NUMBER+1, "%u,", offset);                                  cur+=snprintf(cur, MAX_NUMBER+1, "%u,", offset);
                         if(limit)                          if(limit!=SQL_NO_LIMIT)
                                 cur+=snprintf(cur, MAX_NUMBER, "%u", limit);                                  cur+=snprintf(cur, MAX_NUMBER, "%u", limit);
                         statement=statement_limited;                          statement=statement_limited;
                 } else                  } else
                         statement=astatement;                          statement=astatement;
   
                 if(mysql_query(connection.handle, statement))                   if(mysql_query(connection.handle, statement)) 
                         services._throw(mysql_error(connection.handle));                          _throw(connection, mysql_error(connection.handle));
                 if(!(res=mysql_store_result(connection.handle)) && mysql_field_count(connection.handle))                   if(!(res=mysql_store_result(connection.handle)) && mysql_field_count(connection.handle)) 
                         services._throw(mysql_error(connection.handle));                          _throw(connection, mysql_error(connection.handle));
                 if(!res) // empty result: insert|delete|update|...                  if(!res) // empty result: insert|delete|update|...
                         return;                          return;
                                   
Line 234  public: Line 284  public:
                 if(!column_count) // old client                  if(!column_count) // old client
                         column_count=mysql_field_count(connection.handle);                          column_count=mysql_field_count(connection.handle);
   
                 if(!column_count) {                  if(!column_count){
                         mysql_free_result(res);                          mysql_free_result(res);
                         services._throw("result contains no columns");                          services._throw("result contains no columns");
                 }                  }
Line 248  public: Line 298  public:
                 }                  }
   
                 for(int i=0; i<column_count; i++){                  for(int i=0; i<column_count; i++){
                         if(MYSQL_FIELD *field=mysql_fetch_field(res)) {                          if(MYSQL_FIELD *field=mysql_fetch_field(res)){
                             size_t length=strlen(field->name);                                  size_t length=strlen(field->name);
                             char* str=(char*)services.malloc_atomic(length+1);                                  char* strm=(char*)services.malloc_atomic(length+1);
                             memcpy(str, field->name, length+1);                                  memcpy(strm, field->name, length+1);
                             CHECK(handlers.add_column(sql_error, str, length));                                  const char* str=strm;
   
                                   // transcode column name from ?ClientCharset to $request:charset 
                                   if(transcode_needed){
                                           services.transcode(str, length,
                                                   str, length,
                                                   connection.client_charset,
                                                   services.request_charset());
                                   }
                                   
                                   CHECK(handlers.add_column(sql_error, str, length));
                         } else {                          } else {
                             // seen some broken client,                                   // seen some broken client, 
                             // which reported "44" for column count of response to "select 2+2"                                  // which reported "44" for column count of response to "select 2+2"
                             column_count=i;                                  column_count=i;
                             break;                                  break;
                         }                          }
                 }                  }
   
                 CHECK(handlers.before_rows(sql_error));                  CHECK(handlers.before_rows(sql_error));
                                   
                 while(MYSQL_ROW mysql_row=mysql_fetch_row(res)) {                  while(MYSQL_ROW mysql_row=mysql_fetch_row(res)){
                         CHECK(handlers.add_row(sql_error));                          CHECK(handlers.add_row(sql_error));
                         unsigned long *lengths=mysql_fetch_lengths(res);                          unsigned long *lengths=mysql_fetch_lengths(res);
                         for(int i=0; i<column_count; i++){                          for(int i=0; i<column_count; i++){
                                 size_t length=(size_t)lengths[i];                                  size_t length=(size_t)lengths[i];
                                 char* str;                                  const char* str;
                                 if(length) {                                  if(length){
                                         str=(char*)services.malloc_atomic(length+1);                                          char *strm=(char*)services.malloc_atomic(length+1);
                                         memcpy(str, mysql_row[i], length);                                          memcpy(strm, mysql_row[i], length);
                                         str[length]=0;                                          strm[length]=0;
                                 } else                                          str=strm;
                                         str=0;  
                                 CHECK(handlers.add_row_cell(sql_error, str, length));                                          // transcode cell value from ?ClientCharset to $request:charset
                         }                                          if(transcode_needed)
                 }                                                  services.transcode(str, length,
                                                           str, length,
                                                           connection.client_charset,
                                                           services.request_charset());
                                   } else
                                           str=0;
                                   CHECK(handlers.add_row_cell(sql_error, str, length));
                           }
                   }
 cleanup:  cleanup:
                 mysql_free_result(res);                  mysql_free_result(res);
                 if(failed)                  if(failed)
                         services._throw(sql_error);                          services._throw(sql_error);
         }          }
   
   private:
           void _exec(Connection& connection, const char* statement) {
                   if(mysql_query(connection.handle, statement)) 
                           _throw(connection, mysql_error(connection.handle));
                   (*mysql_store_result)(connection.handle); // throw out the result [don't need but must call]
           }
   
           void _throw(Connection& connection, const char* aerr_msg) {
                   size_t length=strlen(aerr_msg);
                   if(length && _transcode_required(connection)) {
                           connection.services->transcode(aerr_msg, length,
                                   aerr_msg, length,
                                   connection.client_charset,
                                   connection.services->request_charset());
                   }
                   connection.services->_throw(aerr_msg);
           }
   
           bool _transcode_required(Connection& connection){
                   return (connection.client_charset && strcmp(connection.client_charset, connection.services->request_charset())!=0);
           }
   
 private: // mysql client library funcs  private: // mysql client library funcs
   
         typedef MYSQL* (STDCALL *t_mysql_init)(MYSQL *);        t_mysql_init mysql_init;          typedef MYSQL*  (STDCALL *t_mysql_init)(MYSQL *);       t_mysql_init mysql_init;
                   
         typedef int (STDCALL *t_mysql_options)(MYSQL *mysql, enum mysql_option option, const char *arg); t_mysql_options mysql_options;          typedef void    (STDCALL *t_mysql_server_end)();        t_mysql_server_end mysql_server_end;
   
           typedef int             (STDCALL *t_mysql_options)(MYSQL *mysql, enum mysql_option option, const char *arg); t_mysql_options mysql_options;
                   
         typedef MYSQL_RES* (STDCALL *t_mysql_store_result)(MYSQL *); t_mysql_store_result mysql_store_result;          typedef MYSQL_RES* (STDCALL *t_mysql_store_result)(MYSQL *); t_mysql_store_result mysql_store_result;
                   
         typedef int             (STDCALL *t_mysql_query)(MYSQL *, const char *q); t_mysql_query mysql_query;          typedef int             (STDCALL *t_mysql_query)(MYSQL *, const char *q); t_mysql_query mysql_query;
                   
         typedef char * (STDCALL *t_mysql_error)(MYSQL *); t_mysql_error mysql_error;          typedef char*   (STDCALL *t_mysql_error)(MYSQL *); t_mysql_error mysql_error;
         static char* STDCALL subst_mysql_error(MYSQL *mysql) { return (mysql)->net.last_error; }          static char* STDCALL subst_mysql_error(MYSQL *mysql) { return (mysql)->net.last_error; }
   
         typedef MYSQL*          (STDCALL *t_mysql_real_connect)(MYSQL *, const char *host,          typedef MYSQL*  (STDCALL *t_mysql_real_connect)(MYSQL *, const char *host,
                                            const char *user,                                                  const char *user,
                                            const char *passwd,                                                  const char *passwd,
                                            const char *db,                                                  const char *db,
                                            unsigned int port,                                                  unsigned int port,
                                            const char *unix_socket,                                                  const char *unix_socket,
                                            unsigned int clientflag); t_mysql_real_connect mysql_real_connect;                                                  unsigned int clientflag); t_mysql_real_connect mysql_real_connect;
   
         typedef void            (STDCALL *t_mysql_close)(MYSQL *); t_mysql_close mysql_close;          typedef void    (STDCALL *t_mysql_close)(MYSQL *); t_mysql_close mysql_close;
                   
         typedef int             (STDCALL *t_mysql_ping)(MYSQL *); t_mysql_ping mysql_ping;          typedef int             (STDCALL *t_mysql_ping)(MYSQL *); t_mysql_ping mysql_ping;
                   
         typedef unsigned long   (STDCALL *t_mysql_escape_string)(char *to,const char *from,          typedef unsigned long   (STDCALL *t_mysql_escape_string)(char *to,const char *from,
                                             unsigned long from_length); t_mysql_escape_string mysql_escape_string;                                                  unsigned long from_length); t_mysql_escape_string mysql_escape_string;
                   
         typedef void            (STDCALL *t_mysql_free_result)(MYSQL_RES *result); t_mysql_free_result mysql_free_result;          typedef void    (STDCALL *t_mysql_free_result)(MYSQL_RES *result); t_mysql_free_result mysql_free_result;
                   
         typedef unsigned long* (STDCALL *t_mysql_fetch_lengths)(MYSQL_RES *result); t_mysql_fetch_lengths mysql_fetch_lengths;          typedef unsigned long* (STDCALL *t_mysql_fetch_lengths)(MYSQL_RES *result); t_mysql_fetch_lengths mysql_fetch_lengths;
                   
Line 320  private: // mysql client library funcs Line 412  private: // mysql client library funcs
                   
         typedef MYSQL_FIELD*    (STDCALL *t_mysql_fetch_field)(MYSQL_RES *result); t_mysql_fetch_field mysql_fetch_field;          typedef MYSQL_FIELD*    (STDCALL *t_mysql_fetch_field)(MYSQL_RES *result); t_mysql_fetch_field mysql_fetch_field;
                   
         typedef unsigned int (STDCALL *t_mysql_num_fields)(MYSQL_RES *); t_mysql_num_fields mysql_num_fields;          typedef unsigned int    (STDCALL *t_mysql_num_fields)(MYSQL_RES *); t_mysql_num_fields mysql_num_fields;
         static unsigned int STDCALL subst_mysql_num_fields(MYSQL_RES *res) { return res->field_count; }          typedef unsigned int    (STDCALL *t_mysql_field_count)(MYSQL *); t_mysql_field_count mysql_field_count;
   
         typedef unsigned int (STDCALL *t_mysql_field_count)(MYSQL *); t_mysql_field_count mysql_field_count;          static unsigned int     STDCALL subst_mysql_num_fields(MYSQL_RES *res) { return res->field_count; }
         static unsigned int STDCALL subst_mysql_field_count(MYSQL *mysql) { return mysql->field_count; }          static unsigned int     STDCALL subst_mysql_field_count(MYSQL *mysql) { return mysql->field_count; }
   
 private: // mysql client library funcs linking  private: // mysql client library funcs linking
   
         const char *dlink(const char *dlopen_file_spec) {          const char *dlink(const char *dlopen_file_spec) {
                 if(lt_dlinit())                  if(lt_dlinit())
                         return lt_dlerror();                          return lt_dlerror();
         lt_dlhandle handle=lt_dlopen(dlopen_file_spec);  
         if (!handle)                  lt_dlhandle handle=lt_dlopen(dlopen_file_spec);
   
                   if(!handle){
                           if(const char* result=lt_dlerror())
                                   return result;
                         return "can not open the dynamic link module";                          return "can not open the dynamic link module";
                   }
   
                   #define GLINK(name) \
                           name=(t_##name)lt_dlsym(handle, #name);
   
                 #define DSLINK(name, action) \                  #define DSLINK(name, action) \
                         name=(t_##name)lt_dlsym(handle, #name); \                          GLINK(name) \
                                 if(!name) \                                  if(!name) \
                                         action;                                          action;
   
Line 344  private: // mysql client library funcs l Line 444  private: // mysql client library funcs l
                 #define SLINK(name) DSLINK(name, name=subst_##name)                  #define SLINK(name) DSLINK(name, name=subst_##name)
                                   
                 DLINK(mysql_init);                  DLINK(mysql_init);
                   GLINK(mysql_server_end);
                 DLINK(mysql_options);                  DLINK(mysql_options);
                 DLINK(mysql_store_result);                  DLINK(mysql_store_result);
                 DLINK(mysql_query);                  DLINK(mysql_query);
Line 364  private: // mysql client library funcs l Line 465  private: // mysql client library funcs l
 };  };
   
 extern "C" SQL_Driver *SQL_DRIVER_CREATE() {  extern "C" SQL_Driver *SQL_DRIVER_CREATE() {
         return new MySQL_Driver();          static MySQL_Driver Driver;
           return &Driver;
 }  }

Removed from v.1.18  
changed lines
  Added in v.1.33


E-mail: