Diff for /sql/pgsql/parser3pgsql.C between versions 1.19 and 1.22

version 1.19, 2004/03/26 13:29:40 version 1.22, 2004/06/23 07:32:07
Line 58  static char *lsplit(char **string_ref, c Line 58  static char *lsplit(char **string_ref, c
     return result;      return result;
 }  }
   
 static void toupper(char *out, const char *in, size_t size) {  static void toupper_str(char *out, const char *in, size_t size) {
         while(size--)          while(size--)
                 *out++=(char)toupper(*in++);                  *out++=(char)toupper(*in++);
 }  }
Line 95  public: Line 95  public:
         #define PQclear_throwPQerror PQclear_throw(PQerrorMessage(connection.conn))          #define PQclear_throwPQerror PQclear_throw(PQerrorMessage(connection.conn))
   
         /**     connect          /**     connect
                 @param used_only_in_connect_url                  @param url
                         format: @b user:pass@host[:port]|[local]/database                          format: @b user:pass@host[:port]|[local]/database
         */          */
         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 *host=lsplit(user, '@');                  char *host=lsplit(user, '@');
                 char *db=lsplit(host, '/');                  char *db=lsplit(host, '/');
                 char *pwd=lsplit(user, ':');                  char *pwd=lsplit(user, ':');
Line 133  public: Line 133  public:
                                 if(*key) {                                  if(*key) {
                                         if(char *value=lsplit(key, '=')) {                                          if(char *value=lsplit(key, '=')) {
                                                 if(strcmp(key, "ClientCharset" ) == 0) {                                                  if(strcmp(key, "ClientCharset" ) == 0) {
                                                         toupper(value, value, strlen(value));                                                          toupper_str(value, value, strlen(value));
                                                         connection.cstrClientCharset=value;                                                          connection.cstrClientCharset=value;
                                                 } else if(strcasecmp(key, "charset")==0) { // left for backward compatibility, consider using ClientCharset                                                  } else if(strcasecmp(key, "charset")==0) { // left for backward compatibility, consider using ClientCharset
                                                         cstrBackwardCompAskServerToTranscode=value;                                                          cstrBackwardCompAskServerToTranscode=value;
Line 228  public: Line 228  public:
                 return result;                  return result;
                 }                  }
         void query(void *aconnection,           void query(void *aconnection, 
                 const char *astatement, unsigned long offset, unsigned long limit,                  const char *astatement, 
                   size_t placeholders_count, Placeholder* placeholders, 
                   unsigned long offset, unsigned long limit,
                 SQL_Driver_query_event_handlers& handlers) {                  SQL_Driver_query_event_handlers& handlers) {
 //              _asm int 3;  //              _asm int 3;
                 Connection& connection=*static_cast<Connection*>(aconnection);                  Connection& connection=*static_cast<Connection*>(aconnection);
Line 236  public: Line 238  public:
                 SQL_Driver_services& services=*connection.services;                  SQL_Driver_services& services=*connection.services;
                 PGconn *conn=connection.conn;                  PGconn *conn=connection.conn;
   
                   if(placeholders_count>0)
                           services._throw("bind variables not supported (yet)");
   
                 // transcode from $request:charset to connect-string?client_charset                  // transcode from $request:charset to connect-string?client_charset
                 if(cstrClientCharset) {                  if(cstrClientCharset) {
                         size_t transcoded_statement_size;                          size_t transcoded_statement_size;

Removed from v.1.19  
changed lines
  Added in v.1.22


E-mail: