提交 81029157 编写于 作者: F freemine

typo correction,and bugfix

上级 f43bbfea
...@@ -167,7 +167,8 @@ do { \ ...@@ -167,7 +167,8 @@ do { \
TSDB_CONV_CODE code_0c80 = (statement); \ TSDB_CONV_CODE code_0c80 = (statement); \
switch (code_0c80) { \ switch (code_0c80) { \
case TSDB_CONV_OK: return SQL_SUCCESS; \ case TSDB_CONV_OK: return SQL_SUCCESS; \
case TSDB_CONV_OOM: { \ case TSDB_CONV_OOM: \
case TSDB_CONV_NOT_AVAIL: { \
SET_ERROR(sql, "HY001", TSDB_CODE_ODBC_OOM, ""); \ SET_ERROR(sql, "HY001", TSDB_CODE_ODBC_OOM, ""); \
return SQL_ERROR; \ return SQL_ERROR; \
} break; \ } break; \
...@@ -175,7 +176,8 @@ do { \ ...@@ -175,7 +176,8 @@ do { \
SET_ERROR(sql, "22003", TSDB_CODE_ODBC_CONV_OOR, ""); \ SET_ERROR(sql, "22003", TSDB_CODE_ODBC_CONV_OOR, ""); \
return SQL_ERROR; \ return SQL_ERROR; \
} break; \ } break; \
case TSDB_CONV_CHAR_NOT_NUM: { \ case TSDB_CONV_CHAR_NOT_NUM: \
case TSDB_CONV_CHAR_NOT_TS: { \
SET_ERROR(sql, "22018", TSDB_CODE_ODBC_CONV_CHAR_NOT_NUM, ""); \ SET_ERROR(sql, "22018", TSDB_CODE_ODBC_CONV_CHAR_NOT_NUM, ""); \
return SQL_ERROR; \ return SQL_ERROR; \
} break; \ } break; \
...@@ -187,8 +189,12 @@ do { \ ...@@ -187,8 +189,12 @@ do { \
SET_ERROR(sql, "22001", TSDB_CODE_ODBC_CONV_TRUNC, ""); \ SET_ERROR(sql, "22001", TSDB_CODE_ODBC_CONV_TRUNC, ""); \
return SQL_ERROR; \ return SQL_ERROR; \
} break; \ } break; \
case TSDB_CONV_BAD_CHAR: { \
SET_ERROR(sql, "22001", TSDB_CODE_ODBC_CONV_TRUNC, ""); \
return SQL_ERROR; \
} break; \
default: { \ default: { \
DASSERTX(0, "internal logic error"); \ DASSERTX(0, "internal logic error: %d", code_0c80); \
return SQL_ERROR; /* never reached here */ \ return SQL_ERROR; /* never reached here */ \
} break; \ } break; \
} \ } \
......
...@@ -64,12 +64,12 @@ do { \ ...@@ -64,12 +64,12 @@ do { \
} \ } \
if (strcasecmp(yyextra->key, "SERVER_ENC")==0) { \ if (strcasecmp(yyextra->key, "SERVER_ENC")==0) { \
free(yyextra->svr_enc); \ free(yyextra->svr_enc); \
yyextra->host = strdup(yytext); \ yyextra->svr_enc = strdup(yytext); \
break; \ break; \
} \ } \
if (strcasecmp(yyextra->key, "CLIENT_ENC")==0) { \ if (strcasecmp(yyextra->key, "CLIENT_ENC")==0) { \
free(yyextra->cli_enc); \ free(yyextra->cli_enc); \
yyextra->host = strdup(yytext); \ yyextra->cli_enc = strdup(yytext); \
break; \ break; \
} \ } \
} while (0) } while (0)
...@@ -98,7 +98,7 @@ do { \ ...@@ -98,7 +98,7 @@ do { \
if (state == VAL) yyterminate(); if (state == VAL) yyterminate();
return -1; } return -1; }
[[:space:]]+ { } [[:space:]]+ { }
[[:alnum:]]+ { set_key(); PUSH_STATE(KEY); } [[:alnum:]_]+ { set_key(); PUSH_STATE(KEY); }
.|\n { return -1; } .|\n { return -1; }
<KEY>[[:space:]]+ { } <KEY>[[:space:]]+ { }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册