From e8877f5f2165a57c51e312e79fda6c043788173e Mon Sep 17 00:00:00 2001 From: liu0x54 Date: Sat, 20 Jun 2020 08:42:49 +0000 Subject: [PATCH 1/3] [TD-711] fix the token define conflicts --- src/inc/ttokendef.h | 10 ++++++++++ src/util/inc/tstoken.h | 9 +-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index d388bc9dbe..7648aadc60 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -221,6 +221,16 @@ #define TK_INTO 203 #define TK_VALUES 204 + +#define TK_SPACE 300 +#define TK_COMMENT 301 +#define TK_ILLEGAL 302 +#define TK_HEX 303 // hex number 0x123 +#define TK_OCT 304 // oct number +#define TK_BIN 305 // bin format data 0b111 +#define TK_FILE 306 +#define TK_QUESTION 307 // denoting the placeholder of "?",when invoking statement bind query + #endif diff --git a/src/util/inc/tstoken.h b/src/util/inc/tstoken.h index 74687e9c18..7b0e498d76 100644 --- a/src/util/inc/tstoken.h +++ b/src/util/inc/tstoken.h @@ -24,14 +24,7 @@ extern "C" { #include "tutil.h" #include "ttokendef.h" -#define TK_SPACE 200 -#define TK_COMMENT 201 -#define TK_ILLEGAL 202 -#define TK_HEX 203 // hex number 0x123 -#define TK_OCT 204 // oct number -#define TK_BIN 205 // bin format data 0b111 -#define TK_FILE 206 -#define TK_QUESTION 207 // denoting the placeholder of "?",when invoking statement bind query + #define TSQL_TBNAME "TBNAME" #define TSQL_TBNAME_L "tbname" From dba77aa8e3cc600847ccf34ebce39f34203209c7 Mon Sep 17 00:00:00 2001 From: liu0x54 Date: Sat, 20 Jun 2020 08:51:06 +0000 Subject: [PATCH 2/3] [TD-711] fix the token define conflicts --- src/query/src/qtokenizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/src/qtokenizer.c b/src/query/src/qtokenizer.c index aa9f6fddca..80d59a384e 100644 --- a/src/query/src/qtokenizer.c +++ b/src/query/src/qtokenizer.c @@ -25,7 +25,7 @@ // All the keywords of the SQL language are stored in a hash table typedef struct SKeyword { const char* name; // The keyword name - uint8_t type; // type + uint16_t type; // type uint8_t len; // length } SKeyword; From c9d13a431688b49138439ee77f9ac9f00c6bdd46 Mon Sep 17 00:00:00 2001 From: liu0x54 Date: Sat, 20 Jun 2020 08:55:30 +0000 Subject: [PATCH 3/3] [TD-711] fix the token define conflicts --- src/inc/ttokendef.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 7648aadc60..b313d6ebb1 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -222,14 +222,14 @@ #define TK_VALUES 204 -#define TK_SPACE 300 -#define TK_COMMENT 301 -#define TK_ILLEGAL 302 -#define TK_HEX 303 // hex number 0x123 -#define TK_OCT 304 // oct number -#define TK_BIN 305 // bin format data 0b111 -#define TK_FILE 306 -#define TK_QUESTION 307 // denoting the placeholder of "?",when invoking statement bind query +#define TK_SPACE 300 +#define TK_COMMENT 301 +#define TK_ILLEGAL 302 +#define TK_HEX 303 // hex number 0x123 +#define TK_OCT 304 // oct number +#define TK_BIN 305 // bin format data 0b111 +#define TK_FILE 306 +#define TK_QUESTION 307 // denoting the placeholder of "?",when invoking statement bind query #endif