Diff for /sql/odbc/parser3odbc.C between versions 1.2 and 1.3

version 1.2, 2001/10/29 08:36:51 version 1.3, 2001/11/16 12:38:59
Line 49  public: Line 49  public:
   
         /// get api version          /// get api version
         int api_version() { return SQL_DRIVER_API_VERSION; }          int api_version() { return SQL_DRIVER_API_VERSION; }
         const char *initialize(const char *dlopen_file_spec) { return 0; }          const char *initialize(char *dlopen_file_spec) { return 0; }
         /**     connect          /**     connect
                 @param used_only_in_connect_url                  @param used_only_in_connect_url
                         format: @b DSN=dsn;UID=user;PWD=password (ODBC connect string)                          format: @b DSN=dsn;UID=user;PWD=password (ODBC connect string)
Line 112  public: Line 112  public:
         unsigned int quote(          unsigned int quote(
                 SQL_Driver_services&, void *connection,                  SQL_Driver_services&, void *connection,
                 char *to, const char *from, unsigned int length) {                  char *to, const char *from, unsigned int length) {
                 /*                  if(to) { // store mode
                         You must allocate the to buffer to be at least length*2+1 bytes long.                           unsigned int result=length;
                         (In the worse case, each character may need to be encoded as using two bytes,                           while(length--) {
                         and you need room for the terminating null byte.)                                  if(*from=='\'') { // ' -> ''
                                           *to++='\''; result++;
                         it's already UNTAINT_TIMES_BIGGER                                  }
                 */                                  *to++=*from++;
                 // ' -> ''                          }
                 unsigned int result=length;                          return result;
                 while(length--) {                  } else // estimate mode
                         if(*from=='\'')                          return length*2;
                                 *to++='\'';  
                         *to++=*from++;  
                 }  
                 return result;  
         }          }
         void query(          void query(
                 SQL_Driver_services& services, void *connection,                   SQL_Driver_services& services, void *connection, 

Removed from v.1.2  
changed lines
  Added in v.1.3


E-mail: