Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cd25d2dc
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
cd25d2dc
编写于
7月 27, 2022
作者:
X
Xiaoyu Wang
提交者:
GitHub
7月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15456 from taosdata/feature/3.0_debug_wxy
fix: db options rename
上级
2d8cd533
25f9b90c
变更
24
展开全部
隐藏空白更改
内联
并排
Showing
24 changed file
with
2959 addition
and
3084 deletion
+2959
-3084
include/common/ttokendef.h
include/common/ttokendef.h
+98
-101
include/libs/nodes/plannodes.h
include/libs/nodes/plannodes.h
+1
-0
include/util/taoserror.h
include/util/taoserror.h
+0
-1
source/common/src/systable.c
source/common/src/systable.c
+2
-2
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+1
-0
source/libs/parser/inc/sql.y
source/libs/parser/inc/sql.y
+6
-6
source/libs/parser/src/parTokenizer.c
source/libs/parser/src/parTokenizer.c
+214
-281
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+2
-1
source/libs/parser/src/parUtil.c
source/libs/parser/src/parUtil.c
+0
-2
source/libs/parser/src/sql.c
source/libs/parser/src/sql.c
+2530
-2579
source/libs/parser/test/parAlterToBalanceTest.cpp
source/libs/parser/test/parAlterToBalanceTest.cpp
+13
-13
source/libs/parser/test/parInitialCTest.cpp
source/libs/parser/test/parInitialCTest.cpp
+4
-10
source/libs/planner/src/planPhysiCreater.c
source/libs/planner/src/planPhysiCreater.c
+1
-0
source/util/src/terror.c
source/util/src/terror.c
+0
-1
tests/pytest/alter/alter_create_exception.py
tests/pytest/alter/alter_create_exception.py
+4
-4
tests/pytest/perfbenchmark/bug3433.py
tests/pytest/perfbenchmark/bug3433.py
+1
-1
tests/pytest/perfbenchmark/joinPerformance.py
tests/pytest/perfbenchmark/joinPerformance.py
+1
-1
tests/pytest/perfbenchmark/taosdemoInsert.py
tests/pytest/perfbenchmark/taosdemoInsert.py
+1
-1
tests/pytest/query/query1970YearsAf.py
tests/pytest/query/query1970YearsAf.py
+1
-1
tests/script/tsim/db/alter_option.sim
tests/script/tsim/db/alter_option.sim
+24
-24
tests/script/tsim/db/basic6.sim
tests/script/tsim/db/basic6.sim
+1
-1
tests/script/tsim/db/create_all_options.sim
tests/script/tsim/db/create_all_options.sim
+16
-16
tests/script/tsim/parser/create_db.sim
tests/script/tsim/parser/create_db.sim
+6
-6
tests/system-test/0-others/fsync.py
tests/system-test/0-others/fsync.py
+32
-32
未找到文件。
include/common/ttokendef.h
浏览文件 @
cd25d2dc
...
...
@@ -84,20 +84,20 @@
#define TK_COMP 66
#define TK_DURATION 67
#define TK_NK_VARIABLE 68
#define TK_
FSYNC
69
#define TK_M
AX
ROWS 70
#define TK_
MINROWS
71
#define TK_
KEEP
72
#define TK_PAGES
73
#define TK_P
AGESIZE
74
#define TK_
PRECISION
75
#define TK_
REPLICA
76
#define TK_
STRICT
77
#define TK_
WAL
78
#define TK_
VGROUPS
79
#define TK_S
INGLE_STABLE
80
#define TK_
RETENTIONS
81
#define TK_
SCHEMALESS
82
#define TK_
MAXROWS
69
#define TK_M
IN
ROWS 70
#define TK_
KEEP
71
#define TK_
PAGES
72
#define TK_PAGES
IZE
73
#define TK_P
RECISION
74
#define TK_
REPLICA
75
#define TK_
STRICT
76
#define TK_
VGROUPS
77
#define TK_
SINGLE_STABLE
78
#define TK_
RETENTIONS
79
#define TK_S
CHEMALESS
80
#define TK_
WAL_LEVEL
81
#define TK_
WAL_FSYNC_PERIOD
82
#define TK_WAL_RETENTION_PERIOD 83
#define TK_WAL_RETENTION_SIZE 84
#define TK_WAL_ROLL_PERIOD 85
...
...
@@ -188,93 +188,90 @@
#define TK_NK_BOOL 170
#define TK_RATIO 171
#define TK_NK_FLOAT 172
#define TK_COMPACT 173
#define TK_VNODES 174
#define TK_IN 175
#define TK_OUTPUTTYPE 176
#define TK_AGGREGATE 177
#define TK_BUFSIZE 178
#define TK_STREAM 179
#define TK_INTO 180
#define TK_TRIGGER 181
#define TK_AT_ONCE 182
#define TK_WINDOW_CLOSE 183
#define TK_IGNORE 184
#define TK_EXPIRED 185
#define TK_KILL 186
#define TK_CONNECTION 187
#define TK_TRANSACTION 188
#define TK_BALANCE 189
#define TK_VGROUP 190
#define TK_MERGE 191
#define TK_REDISTRIBUTE 192
#define TK_SPLIT 193
#define TK_SYNCDB 194
#define TK_DELETE 195
#define TK_INSERT 196
#define TK_NULL 197
#define TK_NK_QUESTION 198
#define TK_NK_ARROW 199
#define TK_ROWTS 200
#define TK_TBNAME 201
#define TK_QSTART 202
#define TK_QEND 203
#define TK_QDURATION 204
#define TK_WSTART 205
#define TK_WEND 206
#define TK_WDURATION 207
#define TK_CAST 208
#define TK_NOW 209
#define TK_TODAY 210
#define TK_TIMEZONE 211
#define TK_CLIENT_VERSION 212
#define TK_SERVER_VERSION 213
#define TK_SERVER_STATUS 214
#define TK_CURRENT_USER 215
#define TK_COUNT 216
#define TK_LAST_ROW 217
#define TK_BETWEEN 218
#define TK_IS 219
#define TK_NK_LT 220
#define TK_NK_GT 221
#define TK_NK_LE 222
#define TK_NK_GE 223
#define TK_NK_NE 224
#define TK_MATCH 225
#define TK_NMATCH 226
#define TK_CONTAINS 227
#define TK_JOIN 228
#define TK_INNER 229
#define TK_SELECT 230
#define TK_DISTINCT 231
#define TK_WHERE 232
#define TK_PARTITION 233
#define TK_BY 234
#define TK_SESSION 235
#define TK_STATE_WINDOW 236
#define TK_SLIDING 237
#define TK_FILL 238
#define TK_VALUE 239
#define TK_NONE 240
#define TK_PREV 241
#define TK_LINEAR 242
#define TK_NEXT 243
#define TK_HAVING 244
#define TK_RANGE 245
#define TK_EVERY 246
#define TK_ORDER 247
#define TK_SLIMIT 248
#define TK_SOFFSET 249
#define TK_LIMIT 250
#define TK_OFFSET 251
#define TK_ASC 252
#define TK_NULLS 253
#define TK_ID 254
#define TK_NK_BITNOT 255
#define TK_VALUES 256
#define TK_IMPORT 257
#define TK_NK_SEMI 258
#define TK_FILE 259
#define TK_OUTPUTTYPE 173
#define TK_AGGREGATE 174
#define TK_BUFSIZE 175
#define TK_STREAM 176
#define TK_INTO 177
#define TK_TRIGGER 178
#define TK_AT_ONCE 179
#define TK_WINDOW_CLOSE 180
#define TK_IGNORE 181
#define TK_EXPIRED 182
#define TK_KILL 183
#define TK_CONNECTION 184
#define TK_TRANSACTION 185
#define TK_BALANCE 186
#define TK_VGROUP 187
#define TK_MERGE 188
#define TK_REDISTRIBUTE 189
#define TK_SPLIT 190
#define TK_DELETE 191
#define TK_INSERT 192
#define TK_NULL 193
#define TK_NK_QUESTION 194
#define TK_NK_ARROW 195
#define TK_ROWTS 196
#define TK_TBNAME 197
#define TK_QSTART 198
#define TK_QEND 199
#define TK_QDURATION 200
#define TK_WSTART 201
#define TK_WEND 202
#define TK_WDURATION 203
#define TK_CAST 204
#define TK_NOW 205
#define TK_TODAY 206
#define TK_TIMEZONE 207
#define TK_CLIENT_VERSION 208
#define TK_SERVER_VERSION 209
#define TK_SERVER_STATUS 210
#define TK_CURRENT_USER 211
#define TK_COUNT 212
#define TK_LAST_ROW 213
#define TK_BETWEEN 214
#define TK_IS 215
#define TK_NK_LT 216
#define TK_NK_GT 217
#define TK_NK_LE 218
#define TK_NK_GE 219
#define TK_NK_NE 220
#define TK_MATCH 221
#define TK_NMATCH 222
#define TK_CONTAINS 223
#define TK_IN 224
#define TK_JOIN 225
#define TK_INNER 226
#define TK_SELECT 227
#define TK_DISTINCT 228
#define TK_WHERE 229
#define TK_PARTITION 230
#define TK_BY 231
#define TK_SESSION 232
#define TK_STATE_WINDOW 233
#define TK_SLIDING 234
#define TK_FILL 235
#define TK_VALUE 236
#define TK_NONE 237
#define TK_PREV 238
#define TK_LINEAR 239
#define TK_NEXT 240
#define TK_HAVING 241
#define TK_RANGE 242
#define TK_EVERY 243
#define TK_ORDER 244
#define TK_SLIMIT 245
#define TK_SOFFSET 246
#define TK_LIMIT 247
#define TK_OFFSET 248
#define TK_ASC 249
#define TK_NULLS 250
#define TK_ID 251
#define TK_NK_BITNOT 252
#define TK_VALUES 253
#define TK_IMPORT 254
#define TK_NK_SEMI 255
#define TK_FILE 256
#define TK_NK_SPACE 300
#define TK_NK_COMMENT 301
...
...
include/libs/nodes/plannodes.h
浏览文件 @
cd25d2dc
...
...
@@ -328,6 +328,7 @@ typedef struct STableScanPhysiNode {
int8_t
triggerType
;
int64_t
watermark
;
int8_t
igExpired
;
bool
assignBlockUid
;
}
STableScanPhysiNode
;
typedef
STableScanPhysiNode
STableSeqScanPhysiNode
;
...
...
include/util/taoserror.h
浏览文件 @
cd25d2dc
...
...
@@ -513,7 +513,6 @@ int32_t* taosGetErrno();
#define TSDB_CODE_PAR_ONLY_ONE_JSON_TAG TAOS_DEF_ERROR_CODE(0, 0x2633)
#define TSDB_CODE_PAR_INCORRECT_NUM_OF_COL TAOS_DEF_ERROR_CODE(0, 0x2634)
#define TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL TAOS_DEF_ERROR_CODE(0, 0x2635)
#define TSDB_CODE_PAR_INVALID_DAYS_VALUE TAOS_DEF_ERROR_CODE(0, 0x2636)
#define TSDB_CODE_PAR_OFFSET_LESS_ZERO TAOS_DEF_ERROR_CODE(0, 0x2637)
#define TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY TAOS_DEF_ERROR_CODE(0, 0x2638)
#define TSDB_CODE_PAR_INVALID_TOPIC_QUERY TAOS_DEF_ERROR_CODE(0, 0x2639)
...
...
source/common/src/systable.c
浏览文件 @
cd25d2dc
...
...
@@ -89,8 +89,8 @@ static const SSysDbTableSchema userDBSchema[] = {
{.
name
=
"status"
,
.
bytes
=
10
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"retention"
,
.
bytes
=
60
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"single_stable"
,
.
bytes
=
1
,
.
type
=
TSDB_DATA_TYPE_BOOL
},
{.
name
=
"cache
_
model"
,
.
bytes
=
TSDB_CACHE_MODEL_STR_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"cache
_
size"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"cachemodel"
,
.
bytes
=
TSDB_CACHE_MODEL_STR_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"cachesize"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"wal_level"
,
.
bytes
=
1
,
.
type
=
TSDB_DATA_TYPE_TINYINT
},
{.
name
=
"wal_fsync_period"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"wal_retention_period"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
cd25d2dc
...
...
@@ -1526,6 +1526,7 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys
pInfo
->
pDeleteDataRes
=
createSpecialDataBlock
(
STREAM_DELETE_DATA
);
pInfo
->
updateWin
=
(
STimeWindow
){.
skey
=
INT64_MAX
,
.
ekey
=
INT64_MAX
};
pInfo
->
pUpdateDataRes
=
createSpecialDataBlock
(
STREAM_CLEAR
);
pInfo
->
assignBlockUid
=
pTableScanNode
->
assignBlockUid
;
pOperator
->
name
=
"StreamScanOperator"
;
pOperator
->
operatorType
=
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
;
...
...
source/libs/parser/inc/sql.y
浏览文件 @
cd25d2dc
...
...
@@ -176,7 +176,6 @@ db_options(A) ::= db_options(B) CACHESIZE NK_INTEGER(C).
db_options(A) ::= db_options(B) COMP NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_COMP, &C); }
db_options(A) ::= db_options(B) DURATION NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_DAYS, &C); }
db_options(A) ::= db_options(B) DURATION NK_VARIABLE(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_DAYS, &C); }
db_options(A) ::= db_options(B) FSYNC NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_FSYNC, &C); }
db_options(A) ::= db_options(B) MAXROWS NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_MAXROWS, &C); }
db_options(A) ::= db_options(B) MINROWS NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_MINROWS, &C); }
db_options(A) ::= db_options(B) KEEP integer_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_KEEP, C); }
...
...
@@ -186,11 +185,12 @@ db_options(A) ::= db_options(B) PAGESIZE NK_INTEGER(C).
db_options(A) ::= db_options(B) PRECISION NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_PRECISION, &C); }
db_options(A) ::= db_options(B) REPLICA NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_REPLICA, &C); }
db_options(A) ::= db_options(B) STRICT NK_STRING(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_STRICT, &C); }
db_options(A) ::= db_options(B) WAL NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_WAL, &C); }
db_options(A) ::= db_options(B) VGROUPS NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_VGROUPS, &C); }
db_options(A) ::= db_options(B) SINGLE_STABLE NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_SINGLE_STABLE, &C); }
db_options(A) ::= db_options(B) RETENTIONS retention_list(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_RETENTIONS, C); }
db_options(A) ::= db_options(B) SCHEMALESS NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_SCHEMALESS, &C); }
db_options(A) ::= db_options(B) WAL_LEVEL NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_WAL, &C); }
db_options(A) ::= db_options(B) WAL_FSYNC_PERIOD NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_FSYNC, &C); }
db_options(A) ::= db_options(B) WAL_RETENTION_PERIOD NK_INTEGER(C). { A = setDatabaseOption(pCxt, B, DB_OPTION_WAL_RETENTION_PERIOD, &C); }
db_options(A) ::= db_options(B) WAL_RETENTION_PERIOD NK_MINUS(D) NK_INTEGER(C). {
SToken t = D;
...
...
@@ -214,13 +214,13 @@ alter_db_options(A) ::= alter_db_options(B) alter_db_option(C).
//alter_db_option(A) ::= BUFFER NK_INTEGER(B). { A.type = DB_OPTION_BUFFER; A.val = B; }
alter_db_option(A) ::= CACHEMODEL NK_STRING(B). { A.type = DB_OPTION_CACHEMODEL; A.val = B; }
alter_db_option(A) ::= CACHESIZE NK_INTEGER(B). { A.type = DB_OPTION_CACHESIZE; A.val = B; }
alter_db_option(A) ::=
FSYNC NK_INTEGER(B).
{ A.type = DB_OPTION_FSYNC; A.val = B; }
alter_db_option(A) ::=
WAL_FSYNC_PERIOD NK_INTEGER(B).
{ A.type = DB_OPTION_FSYNC; A.val = B; }
alter_db_option(A) ::= KEEP integer_list(B). { A.type = DB_OPTION_KEEP; A.pList = B; }
alter_db_option(A) ::= KEEP variable_list(B). { A.type = DB_OPTION_KEEP; A.pList = B; }
//alter_db_option(A) ::= PAGES NK_INTEGER(B). { A.type = DB_OPTION_PAGES; A.val = B; }
//alter_db_option(A) ::= REPLICA NK_INTEGER(B). { A.type = DB_OPTION_REPLICA; A.val = B; }
//alter_db_option(A) ::= STRICT NK_STRING(B). { A.type = DB_OPTION_STRICT; A.val = B; }
alter_db_option(A) ::= WAL
NK_INTEGER(B).
{ A.type = DB_OPTION_WAL; A.val = B; }
alter_db_option(A) ::= WAL
_LEVEL NK_INTEGER(B).
{ A.type = DB_OPTION_WAL; A.val = B; }
%type integer_list { SNodeList* }
%destructor integer_list { nodesDestroyList($$); }
...
...
@@ -476,7 +476,7 @@ explain_options(A) ::= explain_options(B) VERBOSE NK_BOOL(C).
explain_options(A) ::= explain_options(B) RATIO NK_FLOAT(C). { A = setExplainRatio(pCxt, B, &C); }
/************************************************ compact *************************************************************/
cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP. { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
//
cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP. { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
/************************************************ create/drop function ************************************************/
cmd ::= CREATE agg_func_opt(A) FUNCTION not_exists_opt(F) function_name(B)
...
...
@@ -525,7 +525,7 @@ dnode_list(A) ::= DNODE NK_INTEGER(B).
dnode_list(A) ::= dnode_list(B) DNODE NK_INTEGER(C). { A = addNodeToList(pCxt, B, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &C)); }
/************************************************ syncdb **************************************************************/
cmd ::= SYNCDB db_name(A) REPLICA. { pCxt->pRootNode = createSyncdbStmt(pCxt, &A); }
//
cmd ::= SYNCDB db_name(A) REPLICA. { pCxt->pRootNode = createSyncdbStmt(pCxt, &A); }
/************************************************ syncdb **************************************************************/
cmd ::= DELETE FROM full_table_name(A) where_clause_opt(B). { pCxt->pRootNode = createDeleteStmt(pCxt, A, B); }
...
...
source/libs/parser/src/parTokenizer.c
浏览文件 @
cd25d2dc
...
...
@@ -29,291 +29,224 @@ typedef struct SKeyword {
// clang-format off
// keywords in sql string
static
SKeyword
keywordTable
[]
=
{
{
"ACCOUNT"
,
TK_ACCOUNT
},
{
"ACCOUNTS"
,
TK_ACCOUNTS
},
{
"ADD"
,
TK_ADD
},
{
"AGGREGATE"
,
TK_AGGREGATE
},
{
"ALL"
,
TK_ALL
},
{
"ALTER"
,
TK_ALTER
},
{
"ANALYZE"
,
TK_ANALYZE
},
{
"AND"
,
TK_AND
},
{
"APPS"
,
TK_APPS
},
{
"AS"
,
TK_AS
},
{
"ASC"
,
TK_ASC
},
{
"AT_ONCE"
,
TK_AT_ONCE
},
{
"BALANCE"
,
TK_BALANCE
},
{
"BETWEEN"
,
TK_BETWEEN
},
{
"BINARY"
,
TK_BINARY
},
{
"BIGINT"
,
TK_BIGINT
},
{
"BNODE"
,
TK_BNODE
},
{
"BNODES"
,
TK_BNODES
},
{
"BOOL"
,
TK_BOOL
},
{
"BUFFER"
,
TK_BUFFER
},
{
"BUFSIZE"
,
TK_BUFSIZE
},
{
"BY"
,
TK_BY
},
{
"CACHE"
,
TK_CACHE
},
{
"CACHEMODEL"
,
TK_CACHEMODEL
},
{
"CACHESIZE"
,
TK_CACHESIZE
},
{
"CAST"
,
TK_CAST
},
{
"CLIENT_VERSION"
,
TK_CLIENT_VERSION
},
{
"CLUSTER"
,
TK_CLUSTER
},
{
"COLUMN"
,
TK_COLUMN
},
{
"COMMENT"
,
TK_COMMENT
},
{
"COMP"
,
TK_COMP
},
{
"COMPACT"
,
TK_COMPACT
},
{
"CONNS"
,
TK_CONNS
},
{
"CONNECTION"
,
TK_CONNECTION
},
{
"CONNECTIONS"
,
TK_CONNECTIONS
},
{
"CONSUMER"
,
TK_CONSUMER
},
{
"CONSUMERS"
,
TK_CONSUMERS
},
{
"CONTAINS"
,
TK_CONTAINS
},
{
"COUNT"
,
TK_COUNT
},
{
"CREATE"
,
TK_CREATE
},
{
"CURRENT_USER"
,
TK_CURRENT_USER
},
{
"DATABASE"
,
TK_DATABASE
},
{
"DATABASES"
,
TK_DATABASES
},
{
"DBS"
,
TK_DBS
},
{
"DELETE"
,
TK_DELETE
},
{
"DESC"
,
TK_DESC
},
{
"DESCRIBE"
,
TK_DESCRIBE
},
{
"DISTINCT"
,
TK_DISTINCT
},
{
"DISTRIBUTED"
,
TK_DISTRIBUTED
},
{
"DNODE"
,
TK_DNODE
},
{
"DNODES"
,
TK_DNODES
},
{
"DOUBLE"
,
TK_DOUBLE
},
{
"DROP"
,
TK_DROP
},
{
"DURATION"
,
TK_DURATION
},
{
"ENABLE"
,
TK_ENABLE
},
{
"EXISTS"
,
TK_EXISTS
},
{
"EXPIRED"
,
TK_EXPIRED
},
{
"EXPLAIN"
,
TK_EXPLAIN
},
{
"EVERY"
,
TK_EVERY
},
{
"FILE"
,
TK_FILE
},
{
"FILL"
,
TK_FILL
},
{
"FIRST"
,
TK_FIRST
},
{
"FLOAT"
,
TK_FLOAT
},
{
"FLUSH"
,
TK_FLUSH
},
{
"FROM"
,
TK_FROM
},
{
"FSYNC"
,
TK_FSYNC
},
{
"FUNCTION"
,
TK_FUNCTION
},
{
"FUNCTIONS"
,
TK_FUNCTIONS
},
{
"GRANT"
,
TK_GRANT
},
{
"GRANTS"
,
TK_GRANTS
},
{
"GROUP"
,
TK_GROUP
},
{
"HAVING"
,
TK_HAVING
},
{
"IF"
,
TK_IF
},
{
"IGNORE"
,
TK_IGNORE
},
{
"IMPORT"
,
TK_IMPORT
},
{
"IN"
,
TK_IN
},
{
"INDEX"
,
TK_INDEX
},
{
"INDEXES"
,
TK_INDEXES
},
{
"INNER"
,
TK_INNER
},
{
"INT"
,
TK_INT
},
{
"INSERT"
,
TK_INSERT
},
{
"INTEGER"
,
TK_INTEGER
},
{
"INTERVAL"
,
TK_INTERVAL
},
{
"INTO"
,
TK_INTO
},
{
"IS"
,
TK_IS
},
{
"JOIN"
,
TK_JOIN
},
{
"JSON"
,
TK_JSON
},
{
"KEEP"
,
TK_KEEP
},
{
"KILL"
,
TK_KILL
},
{
"LAST"
,
TK_LAST
},
{
"LAST_ROW"
,
TK_LAST_ROW
},
{
"LICENCE"
,
TK_LICENCE
},
{
"LIKE"
,
TK_LIKE
},
{
"LIMIT"
,
TK_LIMIT
},
{
"LINEAR"
,
TK_LINEAR
},
{
"LOCAL"
,
TK_LOCAL
},
{
"MATCH"
,
TK_MATCH
},
{
"MAXROWS"
,
TK_MAXROWS
},
{
"MAX_DELAY"
,
TK_MAX_DELAY
},
{
"MERGE"
,
TK_MERGE
},
{
"META"
,
TK_META
},
{
"MINROWS"
,
TK_MINROWS
},
{
"MINUS"
,
TK_MINUS
},
{
"MNODE"
,
TK_MNODE
},
{
"MNODES"
,
TK_MNODES
},
{
"MODIFY"
,
TK_MODIFY
},
{
"MODULES"
,
TK_MODULES
},
{
"NCHAR"
,
TK_NCHAR
},
{
"NEXT"
,
TK_NEXT
},
{
"NMATCH"
,
TK_NMATCH
},
{
"NONE"
,
TK_NONE
},
{
"NOT"
,
TK_NOT
},
{
"NOW"
,
TK_NOW
},
{
"NULL"
,
TK_NULL
},
{
"NULLS"
,
TK_NULLS
},
{
"OFFSET"
,
TK_OFFSET
},
{
"ON"
,
TK_ON
},
{
"OR"
,
TK_OR
},
{
"ORDER"
,
TK_ORDER
},
{
"OUTPUTTYPE"
,
TK_OUTPUTTYPE
},
{
"PARTITION"
,
TK_PARTITION
},
{
"PASS"
,
TK_PASS
},
{
"PAGES"
,
TK_PAGES
},
{
"PAGESIZE"
,
TK_PAGESIZE
},
{
"PORT"
,
TK_PORT
},
{
"PPS"
,
TK_PPS
},
{
"PRECISION"
,
TK_PRECISION
},
// {"PRIVILEGE", TK_PRIVILEGE},
{
"PREV"
,
TK_PREV
},
{
"QNODE"
,
TK_QNODE
},
{
"QNODES"
,
TK_QNODES
},
{
"QTIME"
,
TK_QTIME
},
{
"QUERIES"
,
TK_QUERIES
},
{
"QUERY"
,
TK_QUERY
},
{
"RANGE"
,
TK_RANGE
},
{
"RATIO"
,
TK_RATIO
},
{
"READ"
,
TK_READ
},
{
"REDISTRIBUTE"
,
TK_REDISTRIBUTE
},
{
"RENAME"
,
TK_RENAME
},
{
"REPLICA"
,
TK_REPLICA
},
{
"RESET"
,
TK_RESET
},
{
"RETENTIONS"
,
TK_RETENTIONS
},
{
"REVOKE"
,
TK_REVOKE
},
{
"ROLLUP"
,
TK_ROLLUP
},
{
"SCHEMALESS"
,
TK_SCHEMALESS
},
{
"SCORES"
,
TK_SCORES
},
{
"SELECT"
,
TK_SELECT
},
{
"SERVER_STATUS"
,
TK_SERVER_STATUS
},
{
"SERVER_VERSION"
,
TK_SERVER_VERSION
},
{
"SESSION"
,
TK_SESSION
},
{
"SET"
,
TK_SET
},
{
"SHOW"
,
TK_SHOW
},
{
"SINGLE_STABLE"
,
TK_SINGLE_STABLE
},
{
"SLIDING"
,
TK_SLIDING
},
{
"SLIMIT"
,
TK_SLIMIT
},
{
"SMA"
,
TK_SMA
},
{
"SMALLINT"
,
TK_SMALLINT
},
{
"SNODE"
,
TK_SNODE
},
{
"SNODES"
,
TK_SNODES
},
{
"SOFFSET"
,
TK_SOFFSET
},
{
"SPLIT"
,
TK_SPLIT
},
{
"STABLE"
,
TK_STABLE
},
{
"STABLES"
,
TK_STABLES
},
{
"STATE"
,
TK_STATE
},
{
"STATE_WINDOW"
,
TK_STATE_WINDOW
},
{
"STORAGE"
,
TK_STORAGE
},
{
"STREAM"
,
TK_STREAM
},
{
"STREAMS"
,
TK_STREAMS
},
{
"STRICT"
,
TK_STRICT
},
{
"SUBSCRIPTIONS"
,
TK_SUBSCRIPTIONS
},
{
"SYNCDB"
,
TK_SYNCDB
},
{
"SYSINFO"
,
TK_SYSINFO
},
{
"TABLE"
,
TK_TABLE
},
{
"TABLES"
,
TK_TABLES
},
{
"TAG"
,
TK_TAG
},
{
"TAGS"
,
TK_TAGS
},
{
"TBNAME"
,
TK_TBNAME
},
{
"TIMESTAMP"
,
TK_TIMESTAMP
},
{
"TIMEZONE"
,
TK_TIMEZONE
},
{
"TINYINT"
,
TK_TINYINT
},
{
"TO"
,
TK_TO
},
{
"TODAY"
,
TK_TODAY
},
{
"TOPIC"
,
TK_TOPIC
},
{
"TOPICS"
,
TK_TOPICS
},
{
"TRANSACTION"
,
TK_TRANSACTION
},
{
"TRANSACTIONS"
,
TK_TRANSACTIONS
},
{
"TRIGGER"
,
TK_TRIGGER
},
{
"TRIM"
,
TK_TRIM
},
{
"TSERIES"
,
TK_TSERIES
},
{
"TTL"
,
TK_TTL
},
{
"UNION"
,
TK_UNION
},
{
"UNSIGNED"
,
TK_UNSIGNED
},
{
"USE"
,
TK_USE
},
{
"USER"
,
TK_USER
},
{
"USERS"
,
TK_USERS
},
{
"USING"
,
TK_USING
},
{
"VALUE"
,
TK_VALUE
},
{
"VALUES"
,
TK_VALUES
},
{
"VARCHAR"
,
TK_VARCHAR
},
{
"VARIABLES"
,
TK_VARIABLES
},
{
"VERBOSE"
,
TK_VERBOSE
},
{
"VGROUP"
,
TK_VGROUP
},
{
"VGROUPS"
,
TK_VGROUPS
},
{
"VNODES"
,
TK_VNODES
},
{
"WAL"
,
TK_WAL
},
{
"ACCOUNT"
,
TK_ACCOUNT
},
{
"ACCOUNTS"
,
TK_ACCOUNTS
},
{
"ADD"
,
TK_ADD
},
{
"AGGREGATE"
,
TK_AGGREGATE
},
{
"ALL"
,
TK_ALL
},
{
"ALTER"
,
TK_ALTER
},
{
"ANALYZE"
,
TK_ANALYZE
},
{
"AND"
,
TK_AND
},
{
"APPS"
,
TK_APPS
},
{
"AS"
,
TK_AS
},
{
"ASC"
,
TK_ASC
},
{
"AT_ONCE"
,
TK_AT_ONCE
},
{
"BALANCE"
,
TK_BALANCE
},
{
"BETWEEN"
,
TK_BETWEEN
},
{
"BINARY"
,
TK_BINARY
},
{
"BIGINT"
,
TK_BIGINT
},
{
"BNODE"
,
TK_BNODE
},
{
"BNODES"
,
TK_BNODES
},
{
"BOOL"
,
TK_BOOL
},
{
"BUFFER"
,
TK_BUFFER
},
{
"BUFSIZE"
,
TK_BUFSIZE
},
{
"BY"
,
TK_BY
},
{
"CACHE"
,
TK_CACHE
},
{
"CACHEMODEL"
,
TK_CACHEMODEL
},
{
"CACHESIZE"
,
TK_CACHESIZE
},
{
"CAST"
,
TK_CAST
},
{
"CLIENT_VERSION"
,
TK_CLIENT_VERSION
},
{
"CLUSTER"
,
TK_CLUSTER
},
{
"COLUMN"
,
TK_COLUMN
},
{
"COMMENT"
,
TK_COMMENT
},
{
"COMP"
,
TK_COMP
},
{
"CONNS"
,
TK_CONNS
},
{
"CONNECTION"
,
TK_CONNECTION
},
{
"CONNECTIONS"
,
TK_CONNECTIONS
},
{
"CONSUMER"
,
TK_CONSUMER
},
{
"CONSUMERS"
,
TK_CONSUMERS
},
{
"CONTAINS"
,
TK_CONTAINS
},
{
"COUNT"
,
TK_COUNT
},
{
"CREATE"
,
TK_CREATE
},
{
"CURRENT_USER"
,
TK_CURRENT_USER
},
{
"DATABASE"
,
TK_DATABASE
},
{
"DATABASES"
,
TK_DATABASES
},
{
"DBS"
,
TK_DBS
},
{
"DELETE"
,
TK_DELETE
},
{
"DESC"
,
TK_DESC
},
{
"DESCRIBE"
,
TK_DESCRIBE
},
{
"DISTINCT"
,
TK_DISTINCT
},
{
"DISTRIBUTED"
,
TK_DISTRIBUTED
},
{
"DNODE"
,
TK_DNODE
},
{
"DNODES"
,
TK_DNODES
},
{
"DOUBLE"
,
TK_DOUBLE
},
{
"DROP"
,
TK_DROP
},
{
"DURATION"
,
TK_DURATION
},
{
"ENABLE"
,
TK_ENABLE
},
{
"EXISTS"
,
TK_EXISTS
},
{
"EXPIRED"
,
TK_EXPIRED
},
{
"EXPLAIN"
,
TK_EXPLAIN
},
{
"EVERY"
,
TK_EVERY
},
{
"FILE"
,
TK_FILE
},
{
"FILL"
,
TK_FILL
},
{
"FIRST"
,
TK_FIRST
},
{
"FLOAT"
,
TK_FLOAT
},
{
"FLUSH"
,
TK_FLUSH
},
{
"FROM"
,
TK_FROM
},
{
"FUNCTION"
,
TK_FUNCTION
},
{
"FUNCTIONS"
,
TK_FUNCTIONS
},
{
"GRANT"
,
TK_GRANT
},
{
"GRANTS"
,
TK_GRANTS
},
{
"GROUP"
,
TK_GROUP
},
{
"HAVING"
,
TK_HAVING
},
{
"IF"
,
TK_IF
},
{
"IGNORE"
,
TK_IGNORE
},
{
"IMPORT"
,
TK_IMPORT
},
{
"IN"
,
TK_IN
},
{
"INDEX"
,
TK_INDEX
},
{
"INDEXES"
,
TK_INDEXES
},
{
"INNER"
,
TK_INNER
},
{
"INT"
,
TK_INT
},
{
"INSERT"
,
TK_INSERT
},
{
"INTEGER"
,
TK_INTEGER
},
{
"INTERVAL"
,
TK_INTERVAL
},
{
"INTO"
,
TK_INTO
},
{
"IS"
,
TK_IS
},
{
"JOIN"
,
TK_JOIN
},
{
"JSON"
,
TK_JSON
},
{
"KEEP"
,
TK_KEEP
},
{
"KILL"
,
TK_KILL
},
{
"LAST"
,
TK_LAST
},
{
"LAST_ROW"
,
TK_LAST_ROW
},
{
"LICENCE"
,
TK_LICENCE
},
{
"LIKE"
,
TK_LIKE
},
{
"LIMIT"
,
TK_LIMIT
},
{
"LINEAR"
,
TK_LINEAR
},
{
"LOCAL"
,
TK_LOCAL
},
{
"MATCH"
,
TK_MATCH
},
{
"MAXROWS"
,
TK_MAXROWS
},
{
"MAX_DELAY"
,
TK_MAX_DELAY
},
{
"MERGE"
,
TK_MERGE
},
{
"META"
,
TK_META
},
{
"MINROWS"
,
TK_MINROWS
},
{
"MINUS"
,
TK_MINUS
},
{
"MNODE"
,
TK_MNODE
},
{
"MNODES"
,
TK_MNODES
},
{
"MODIFY"
,
TK_MODIFY
},
{
"MODULES"
,
TK_MODULES
},
{
"NCHAR"
,
TK_NCHAR
},
{
"NEXT"
,
TK_NEXT
},
{
"NMATCH"
,
TK_NMATCH
},
{
"NONE"
,
TK_NONE
},
{
"NOT"
,
TK_NOT
},
{
"NOW"
,
TK_NOW
},
{
"NULL"
,
TK_NULL
},
{
"NULLS"
,
TK_NULLS
},
{
"OFFSET"
,
TK_OFFSET
},
{
"ON"
,
TK_ON
},
{
"OR"
,
TK_OR
},
{
"ORDER"
,
TK_ORDER
},
{
"OUTPUTTYPE"
,
TK_OUTPUTTYPE
},
{
"PARTITION"
,
TK_PARTITION
},
{
"PASS"
,
TK_PASS
},
{
"PAGES"
,
TK_PAGES
},
{
"PAGESIZE"
,
TK_PAGESIZE
},
{
"PORT"
,
TK_PORT
},
{
"PPS"
,
TK_PPS
},
{
"PRECISION"
,
TK_PRECISION
},
{
"PREV"
,
TK_PREV
},
{
"QNODE"
,
TK_QNODE
},
{
"QNODES"
,
TK_QNODES
},
{
"QTIME"
,
TK_QTIME
},
{
"QUERIES"
,
TK_QUERIES
},
{
"QUERY"
,
TK_QUERY
},
{
"RANGE"
,
TK_RANGE
},
{
"RATIO"
,
TK_RATIO
},
{
"READ"
,
TK_READ
},
{
"REDISTRIBUTE"
,
TK_REDISTRIBUTE
},
{
"RENAME"
,
TK_RENAME
},
{
"REPLICA"
,
TK_REPLICA
},
{
"RESET"
,
TK_RESET
},
{
"RETENTIONS"
,
TK_RETENTIONS
},
{
"REVOKE"
,
TK_REVOKE
},
{
"ROLLUP"
,
TK_ROLLUP
},
{
"SCHEMALESS"
,
TK_SCHEMALESS
},
{
"SCORES"
,
TK_SCORES
},
{
"SELECT"
,
TK_SELECT
},
{
"SERVER_STATUS"
,
TK_SERVER_STATUS
},
{
"SERVER_VERSION"
,
TK_SERVER_VERSION
},
{
"SESSION"
,
TK_SESSION
},
{
"SET"
,
TK_SET
},
{
"SHOW"
,
TK_SHOW
},
{
"SINGLE_STABLE"
,
TK_SINGLE_STABLE
},
{
"SLIDING"
,
TK_SLIDING
},
{
"SLIMIT"
,
TK_SLIMIT
},
{
"SMA"
,
TK_SMA
},
{
"SMALLINT"
,
TK_SMALLINT
},
{
"SNODE"
,
TK_SNODE
},
{
"SNODES"
,
TK_SNODES
},
{
"SOFFSET"
,
TK_SOFFSET
},
{
"SPLIT"
,
TK_SPLIT
},
{
"STABLE"
,
TK_STABLE
},
{
"STABLES"
,
TK_STABLES
},
{
"STATE"
,
TK_STATE
},
{
"STATE_WINDOW"
,
TK_STATE_WINDOW
},
{
"STORAGE"
,
TK_STORAGE
},
{
"STREAM"
,
TK_STREAM
},
{
"STREAMS"
,
TK_STREAMS
},
{
"STRICT"
,
TK_STRICT
},
{
"SUBSCRIPTIONS"
,
TK_SUBSCRIPTIONS
},
{
"SYSINFO"
,
TK_SYSINFO
},
{
"TABLE"
,
TK_TABLE
},
{
"TABLES"
,
TK_TABLES
},
{
"TAG"
,
TK_TAG
},
{
"TAGS"
,
TK_TAGS
},
{
"TBNAME"
,
TK_TBNAME
},
{
"TIMESTAMP"
,
TK_TIMESTAMP
},
{
"TIMEZONE"
,
TK_TIMEZONE
},
{
"TINYINT"
,
TK_TINYINT
},
{
"TO"
,
TK_TO
},
{
"TODAY"
,
TK_TODAY
},
{
"TOPIC"
,
TK_TOPIC
},
{
"TOPICS"
,
TK_TOPICS
},
{
"TRANSACTION"
,
TK_TRANSACTION
},
{
"TRANSACTIONS"
,
TK_TRANSACTIONS
},
{
"TRIGGER"
,
TK_TRIGGER
},
{
"TRIM"
,
TK_TRIM
},
{
"TSERIES"
,
TK_TSERIES
},
{
"TTL"
,
TK_TTL
},
{
"UNION"
,
TK_UNION
},
{
"UNSIGNED"
,
TK_UNSIGNED
},
{
"USE"
,
TK_USE
},
{
"USER"
,
TK_USER
},
{
"USERS"
,
TK_USERS
},
{
"USING"
,
TK_USING
},
{
"VALUE"
,
TK_VALUE
},
{
"VALUES"
,
TK_VALUES
},
{
"VARCHAR"
,
TK_VARCHAR
},
{
"VARIABLES"
,
TK_VARIABLES
},
{
"VERBOSE"
,
TK_VERBOSE
},
{
"VGROUP"
,
TK_VGROUP
},
{
"VGROUPS"
,
TK_VGROUPS
},
{
"WAL_FSYNC_PERIOD"
,
TK_WAL_FSYNC_PERIOD
},
{
"WAL_LEVEL"
,
TK_WAL_LEVEL
},
{
"WAL_RETENTION_PERIOD"
,
TK_WAL_RETENTION_PERIOD
},
{
"WAL_RETENTION_SIZE"
,
TK_WAL_RETENTION_SIZE
},
{
"WAL_ROLL_PERIOD"
,
TK_WAL_ROLL_PERIOD
},
{
"WAL_SEGMENT_SIZE"
,
TK_WAL_SEGMENT_SIZE
},
{
"WATERMARK"
,
TK_WATERMARK
},
{
"WHERE"
,
TK_WHERE
},
{
"WINDOW_CLOSE"
,
TK_WINDOW_CLOSE
},
{
"WITH"
,
TK_WITH
},
{
"WRITE"
,
TK_WRITE
},
{
"_C0"
,
TK_ROWTS
},
{
"_QDURATION"
,
TK_QDURATION
},
{
"_QEND"
,
TK_QEND
},
{
"_QSTART"
,
TK_QSTART
},
{
"_ROWTS"
,
TK_ROWTS
},
{
"_WDURATION"
,
TK_WDURATION
},
{
"_WEND"
,
TK_WEND
},
{
"_WSTART"
,
TK_WSTART
},
// {"ID", TK_ID},
// {"STRING", TK_STRING},
// {"EQ", TK_EQ},
// {"NE", TK_NE},
// {"ISNULL", TK_ISNULL},
// {"NOTNULL", TK_NOTNULL},
// {"GLOB", TK_GLOB},
// {"GT", TK_GT},
// {"GE", TK_GE},
// {"LT", TK_LT},
// {"LE", TK_LE},
// {"BITAND", TK_BITAND},
// {"BITOR", TK_BITOR},
// {"LSHIFT", TK_LSHIFT},
// {"RSHIFT", TK_RSHIFT},
// {"PLUS", TK_PLUS},
// {"DIVIDE", TK_DIVIDE},
// {"TIMES", TK_TIMES},
// {"STAR", TK_STAR},
// {"SLASH", TK_SLASH},
// {"REM ", TK_REM},
// {"||", TK_CONCAT},
// {"UMINUS", TK_UMINUS},
// {"UPLUS", TK_UPLUS},
// {"BITNOT", TK_BITNOT},
// {"DOT", TK_DOT},
// {"CTIME", TK_CTIME},
// {"LP", TK_LP},
// {"RP", TK_RP},
// {"COMMA", TK_COMMA},
// {"VARIABLE", TK_VARIABLE},
// {"UPDATE", TK_UPDATE},
// {"CHANGE", TK_CHANGE},
// {"COLON", TK_COLON},
// {"ABORT", TK_ABORT},
// {"AFTER", TK_AFTER},
// {"ATTACH", TK_ATTACH},
// {"BEFORE", TK_BEFORE},
// {"BEGIN", TK_BEGIN},
// {"CASCADE", TK_CASCADE},
// {"CONFLICT", TK_CONFLICT},
// {"COPY", TK_COPY},
// {"DEFERRED", TK_DEFERRED},
// {"DELIMITERS", TK_DELIMITERS},
// {"DETACH", TK_DETACH},
// {"EACH", TK_EACH},
// {"END", TK_END},
// {"FAIL", TK_FAIL},
// {"FOR", TK_FOR},
// {"IMMEDIATE", TK_IMMEDIATE},
// {"INITIALLY", TK_INITIALLY},
// {"INSTEAD", TK_INSTEAD},
// {"KEY", TK_KEY},
// {"OF", TK_OF},
// {"RAISE", TK_RAISE},
// {"REPLACE", TK_REPLACE},
// {"RESTRICT", TK_RESTRICT},
// {"ROW", TK_ROW},
// {"STATEMENT", TK_STATEMENT},
// {"VIEW", TK_VIEW},
// {"SEMI", TK_SEMI},
// {"PARTITIONS", TK_PARTITIONS},
// {"MODE", TK_MODE},
{
"WATERMARK"
,
TK_WATERMARK
},
{
"WHERE"
,
TK_WHERE
},
{
"WINDOW_CLOSE"
,
TK_WINDOW_CLOSE
},
{
"WITH"
,
TK_WITH
},
{
"WRITE"
,
TK_WRITE
},
{
"_C0"
,
TK_ROWTS
},
{
"_QDURATION"
,
TK_QDURATION
},
{
"_QEND"
,
TK_QEND
},
{
"_QSTART"
,
TK_QSTART
},
{
"_ROWTS"
,
TK_ROWTS
},
{
"_WDURATION"
,
TK_WDURATION
},
{
"_WEND"
,
TK_WEND
},
{
"_WSTART"
,
TK_WSTART
},
};
// clang-format on
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
cd25d2dc
...
...
@@ -3190,7 +3190,8 @@ static int32_t checkOptionsDependency(STranslateContext* pCxt, const char* pDbNa
daysToKeep0
=
(
-
1
==
daysToKeep0
?
dbCfg
.
daysToKeep0
:
daysToKeep0
);
}
if
(
daysPerFile
>
daysToKeep0
)
{
return
generateSyntaxErrMsg
(
&
pCxt
->
msgBuf
,
TSDB_CODE_PAR_INVALID_DAYS_VALUE
);
return
generateSyntaxErrMsgExt
(
&
pCxt
->
msgBuf
,
TSDB_CODE_PAR_INVALID_DB_OPTION
,
"Invalid duration value, should be keep2 >= keep1 >= keep0 >= duration"
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/parser/src/parUtil.c
浏览文件 @
cd25d2dc
...
...
@@ -99,8 +99,6 @@ static char* getSyntaxErrFormat(int32_t errCode) {
return
"Query block has incorrect number of result columns"
;
case
TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL
:
return
"Incorrect TIMESTAMP value: %s"
;
case
TSDB_CODE_PAR_INVALID_DAYS_VALUE
:
return
"Invalid days value, should be keep2 >= keep1 >= keep0 >= days"
;
case
TSDB_CODE_PAR_OFFSET_LESS_ZERO
:
return
"soffset/offset can not be less than 0"
;
case
TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY
:
...
...
source/libs/parser/src/sql.c
浏览文件 @
cd25d2dc
此差异已折叠。
点击以展开。
source/libs/parser/test/parAlterToBalanceTest.cpp
浏览文件 @
cd25d2dc
...
...
@@ -82,12 +82,12 @@ TEST_F(ParserInitialATest, alterDnode) {
* BUFFER int_value -- todo: range [3, 16384], default 96, unit MB
* | CACHEMODEL {'none' | 'last_row' | 'last_value' | 'both'} -- default 'none'
* | CACHESIZE int_value -- range [1, 65536], default 1, unit MB
* |
FSYNC int_value
-- rang [0, 180000], default 3000, unit ms
* |
WAL_FSYNC_PERIOD int_value
-- rang [0, 180000], default 3000, unit ms
* | KEEP {int_value | duration_value} -- rang [1, 365000], default 3650, unit day
* | PAGES int_value -- todo: rang [64, +oo), default 256, unit page
* | REPLICA int_value -- todo: enum 1, 3, default 1, unit replica
* | STRICT {'off' | 'on'} -- todo: default 'off'
* | WAL
int_value
-- enum 1, 2, default 1
* | WAL
_LEVEL int_value
-- enum 1, 2, default 1
* }
*/
TEST_F
(
ParserInitialATest
,
alterDatabase
)
{
...
...
@@ -157,7 +157,7 @@ TEST_F(ParserInitialATest, alterDatabase) {
setAlterDbFsync
(
200
);
setAlterDbWal
(
1
);
setAlterDbCacheModel
(
TSDB_CACHE_MODEL_LAST_ROW
);
run
(
"ALTER DATABASE test CACHEMODEL 'last_row' CACHESIZE 32
FSYNC 200 KEEP 10 WA
L 1"
);
run
(
"ALTER DATABASE test CACHEMODEL 'last_row' CACHESIZE 32
WAL_FSYNC_PERIOD 200 KEEP 10 WAL_LEVE
L 1"
);
clearAlterDbReq
();
initAlterDb
(
"test"
);
...
...
@@ -182,11 +182,11 @@ TEST_F(ParserInitialATest, alterDatabase) {
initAlterDb
(
"test"
);
setAlterDbFsync
(
0
);
run
(
"ALTER DATABASE test
FSYNC
0"
);
run
(
"ALTER DATABASE test
WAL_FSYNC_PERIOD
0"
);
setAlterDbFsync
(
1000
);
run
(
"ALTER DATABASE test
FSYNC
1000"
);
run
(
"ALTER DATABASE test
WAL_FSYNC_PERIOD
1000"
);
setAlterDbFsync
(
180000
);
run
(
"ALTER DATABASE test
FSYNC
180000"
);
run
(
"ALTER DATABASE test
WAL_FSYNC_PERIOD
180000"
);
clearAlterDbReq
();
initAlterDb
(
"test"
);
...
...
@@ -210,9 +210,9 @@ TEST_F(ParserInitialATest, alterDatabase) {
initAlterDb
(
"test"
);
setAlterDbWal
(
1
);
run
(
"ALTER DATABASE test WAL 1"
);
run
(
"ALTER DATABASE test WAL
_LEVEL
1"
);
setAlterDbWal
(
2
);
run
(
"ALTER DATABASE test WAL 2"
);
run
(
"ALTER DATABASE test WAL
_LEVEL
2"
);
clearAlterDbReq
();
}
...
...
@@ -223,16 +223,16 @@ TEST_F(ParserInitialATest, alterDatabaseSemanticCheck) {
run
(
"ALTER DATABASE test CACHESIZE 0"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test CACHESIZE 65537"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
// The syntax limits it to only positive numbers
run
(
"ALTER DATABASE test
FSYNC
-1"
,
TSDB_CODE_PAR_SYNTAX_ERROR
,
PARSER_STAGE_PARSE
);
run
(
"ALTER DATABASE test
FSYNC
180001"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test
WAL_FSYNC_PERIOD
-1"
,
TSDB_CODE_PAR_SYNTAX_ERROR
,
PARSER_STAGE_PARSE
);
run
(
"ALTER DATABASE test
WAL_FSYNC_PERIOD
180001"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test KEEP 0"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test KEEP 365001"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test KEEP 1000000000s"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test KEEP 1w"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test WAL 0"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test WAL 3"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test WAL
_LEVEL
0"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
run
(
"ALTER DATABASE test WAL
_LEVEL
3"
,
TSDB_CODE_PAR_INVALID_DB_OPTION
);
// Regardless of the specific sentence
run
(
"ALTER DATABASE db WAL 0 # td-14436"
,
TSDB_CODE_PAR_SYNTAX_ERROR
,
PARSER_STAGE_PARSE
);
run
(
"ALTER DATABASE db WAL
_LEVEL
0 # td-14436"
,
TSDB_CODE_PAR_SYNTAX_ERROR
,
PARSER_STAGE_PARSE
);
}
/*
...
...
source/libs/parser/test/parInitialCTest.cpp
浏览文件 @
cd25d2dc
...
...
@@ -21,12 +21,6 @@ namespace ParserTest {
class
ParserInitialCTest
:
public
ParserDdlTest
{};
TEST_F
(
ParserInitialCTest
,
compact
)
{
useDb
(
"root"
,
"test"
);
run
(
"COMPACT VNODES IN (1, 2)"
,
TSDB_CODE_PAR_EXPRIE_STATEMENT
,
PARSER_STAGE_PARSE
);
}
TEST_F
(
ParserInitialCTest
,
createAccount
)
{
useDb
(
"root"
,
"test"
);
...
...
@@ -64,7 +58,7 @@ TEST_F(ParserInitialCTest, createBnode) {
* | CACHESIZE value
* | COMP {0 | 1 | 2}
* | DURATION value
* |
FSYNC
value
* |
WAL_FSYNC_PERIOD
value
* | MAXROWS value
* | MINROWS value
* | KEEP value
...
...
@@ -74,7 +68,7 @@ TEST_F(ParserInitialCTest, createBnode) {
* | REPLICA value
* | RETENTIONS ingestion_duration:keep_duration ...
* | STRICT {'off' | 'on'}
* | WAL value
* | WAL
_LEVEL
value
* | VGROUPS value
* | SINGLE_STABLE {0 | 1}
* | WAL_RETENTION_PERIOD value
...
...
@@ -241,7 +235,7 @@ TEST_F(ParserInitialCTest, createDatabase) {
"CACHESIZE 20 "
"COMP 1 "
"DURATION 100 "
"
FSYNC
100 "
"
WAL_FSYNC_PERIOD
100 "
"MAXROWS 1000 "
"MINROWS 100 "
"KEEP 1440 "
...
...
@@ -251,7 +245,7 @@ TEST_F(ParserInitialCTest, createDatabase) {
"REPLICA 3 "
"RETENTIONS 15s:7d,1m:21d,15m:500d "
"STRICT 'on' "
"WAL 2 "
"WAL
_LEVEL
2 "
"VGROUPS 100 "
"SINGLE_STABLE 1 "
"SCHEMALESS 1 "
...
...
source/libs/planner/src/planPhysiCreater.c
浏览文件 @
cd25d2dc
...
...
@@ -553,6 +553,7 @@ static int32_t createTableScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pSubp
pTableScan
->
triggerType
=
pScanLogicNode
->
triggerType
;
pTableScan
->
watermark
=
pScanLogicNode
->
watermark
;
pTableScan
->
igExpired
=
pScanLogicNode
->
igExpired
;
pTableScan
->
assignBlockUid
=
pCxt
->
pPlanCxt
->
rSmaQuery
?
true
:
false
;
return
createScanPhysiNodeFinalize
(
pCxt
,
pSubplan
,
pScanLogicNode
,
(
SScanPhysiNode
*
)
pTableScan
,
pPhyNode
);
}
...
...
source/util/src/terror.c
浏览文件 @
cd25d2dc
...
...
@@ -517,7 +517,6 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INTER_SLIDING_TOO_SMALL, "sliding value can no
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_ONLY_ONE_JSON_TAG
,
"Only one tag if there is a json tag"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INCORRECT_NUM_OF_COL
,
"Query block has incorrect number of result columns"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INCORRECT_TIMESTAMP_VAL
,
"Incorrect TIMESTAMP value"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_DAYS_VALUE
,
"Invalid days value, should be keep2 >= keep1 >= keep0 >= days"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_OFFSET_LESS_ZERO
,
"soffset/offset can not be less than 0"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_SLIMIT_LEAK_PARTITION_BY
,
"slimit/soffset only available for PARTITION BY query"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_PAR_INVALID_TOPIC_QUERY
,
"Invalid topic query"
)
...
...
tests/pytest/alter/alter_create_exception.py
浏览文件 @
cd25d2dc
...
...
@@ -47,16 +47,16 @@ class TDTestCase:
tdSql
.
error
(
'create database db comp "1.4"'
)
tdSql
.
error
(
"create database db blocks '10'"
)
tdSql
.
error
(
'create database db keep "3650"'
)
tdSql
.
error
(
'create database db
fsync
"3650"'
)
tdSql
.
error
(
'create database db
wal_fsync_period
"3650"'
)
tdSql
.
execute
(
'create database db precision "us"'
)
tdSql
.
query
(
'show databases'
)
tdSql
.
checkData
(
0
,
16
,
'us'
)
tdSql
.
execute
(
'drop database if exists db'
)
#checking float input exception for create
tdSql
.
error
(
"create database db
fsync
7.3"
)
tdSql
.
error
(
"create database db
fsync
0.0"
)
tdSql
.
error
(
"create database db
fsync
-5.32"
)
tdSql
.
error
(
"create database db
wal_fsync_period
7.3"
)
tdSql
.
error
(
"create database db
wal_fsync_period
0.0"
)
tdSql
.
error
(
"create database db
wal_fsync_period
-5.32"
)
tdSql
.
error
(
'create database db comp 7.2'
)
tdSql
.
error
(
"create database db blocks 5.87"
)
tdSql
.
error
(
'create database db keep 15.4'
)
...
...
tests/pytest/perfbenchmark/bug3433.py
浏览文件 @
cd25d2dc
...
...
@@ -77,7 +77,7 @@ class TDTestCase:
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"
fsync
"
:
3000
,
"
wal_fsync_period
"
:
3000
,
"update"
:
0
}
...
...
tests/pytest/perfbenchmark/joinPerformance.py
浏览文件 @
cd25d2dc
...
...
@@ -92,7 +92,7 @@ class JoinPerf:
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"
fsync
"
:
3000
,
"
wal_fsync_period
"
:
3000
,
"update"
:
0
}
...
...
tests/pytest/perfbenchmark/taosdemoInsert.py
浏览文件 @
cd25d2dc
...
...
@@ -86,7 +86,7 @@ class Taosdemo:
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"
fsync
"
:
3000
,
"
wal_fsync_period
"
:
3000
,
"update"
:
0
}
...
...
tests/pytest/query/query1970YearsAf.py
浏览文件 @
cd25d2dc
...
...
@@ -68,7 +68,7 @@ class TDTestCase:
"walLevel"
:
1
,
"cachelast"
:
0
,
"quorum"
:
1
,
"
fsync
"
:
3000
,
"
wal_fsync_period
"
:
3000
,
"update"
:
0
}
...
...
tests/script/tsim/db/alter_option.sim
浏览文件 @
cd25d2dc
...
...
@@ -41,12 +41,12 @@ print ============= create database
# | BUFFER value [3~16384, default: 96]
# | PAGES value [64~16384, default: 256]
# | CACHEMODEL value ['node', 'last_row', 'last_value', 'both']
# |
FSYNC
value [0 ~ 180000 ms]
# |
WAL_FSYNC_PERIOD
value [0 ~ 180000 ms]
# | KEEP value [duration, 365000]
# | REPLICA value [1 | 3]
# | WAL value [1 | 2]
# | WAL
_LEVEL
value [1 | 2]
sql create database db CACHEMODEL 'both' COMP 0 DURATION 240
FSYNC 1000 MAXROWS 8000 MINROWS 10 KEEP 1000 PRECISION 'ns' REPLICA 3 WA
L 2 VGROUPS 6 SINGLE_STABLE 1
sql create database db CACHEMODEL 'both' COMP 0 DURATION 240
WAL_FSYNC_PERIOD 1000 MAXROWS 8000 MINROWS 10 KEEP 1000 PRECISION 'ns' REPLICA 3 WAL_LEVE
L 2 VGROUPS 6 SINGLE_STABLE 1
sql show databases
print rows: $rows
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09
...
...
@@ -99,16 +99,16 @@ endi
if $data14_db != ns then # precision
return -1
endi
if $data18_db != both then # cache
_
model
if $data18_db != both then # cachemodel
return -1
endi
if $data19_db != 1 then # cash_size
return -1
endi
if $data20_db != 2 then # wal level
if $data20_db != 2 then # wal
_level
level
return -1
endi
if $data21_db != 1000 then # wal fsyncperiod
if $data21_db != 1000 then # wal
_level
fsyncperiod
return -1
endi
if $data22_db != 0 then #
...
...
@@ -296,46 +296,46 @@ sql_error alter database db maxrows 2000
sql_error alter database db maxrows 11 # equal minrows
sql_error alter database db maxrows 10 # little than minrows
print ============== step wal
sql alter database db wal 1
print ============== step wal
_level
sql alter database db wal
_level
1
sql show databases
print wal $data20_db
print wal
_level
$data20_db
if $data20_db != 1 then
return -1
endi
sql alter database db wal 2
sql alter database db wal
_level
2
sql show databases
print wal $data20_db
print wal
_level
$data20_db
if $data20_db != 2 then
return -1
endi
sql_error alter database db wal 0 # TD-14436
sql_error alter database db wal 3
sql_error alter database db wal 100
sql_error alter database db wal -1
sql_error alter database db wal
_level
0 # TD-14436
sql_error alter database db wal
_level
3
sql_error alter database db wal
_level
100
sql_error alter database db wal
_level
-1
print ============== modify
fsync
sql alter database db
fsync
2000
print ============== modify
wal_fsync_period
sql alter database db
wal_fsync_period
2000
sql show databases
print
fsync
$data21_db
print
wal_fsync_period
$data21_db
if $data21_db != 2000 then
return -1
endi
sql alter database db
fsync
500
sql alter database db
wal_fsync_period
500
sql show databases
print
fsync
$data21_db
print
wal_fsync_period
$data21_db
if $data21_db != 500 then
return -1
endi
sql alter database db
fsync
0
sql alter database db
wal_fsync_period
0
sql show databases
print
fsync
$data21_db
print
wal_fsync_period
$data21_db
if $data21_db != 0 then
return -1
endi
sql_error alter database db
fsync
180001
sql_error alter database db
fsync
-1
sql_error alter database db
wal_fsync_period
180001
sql_error alter database db
wal_fsync_period
-1
print ============== modify comp
sql_error alter database db comp 1
...
...
tests/script/tsim/db/basic6.sim
浏览文件 @
cd25d2dc
...
...
@@ -15,7 +15,7 @@ $tb = $tbPrefix . $i
print =============== step1
# quorum presicion
sql create database $db vgroups 8 replica 1 duration 2 keep 10 minrows 80 maxrows 10000 wal
2 fsync
1000 comp 0 cachemodel 'last_value' precision 'us'
sql create database $db vgroups 8 replica 1 duration 2 keep 10 minrows 80 maxrows 10000 wal
_level 2 wal_fsync_period
1000 comp 0 cachemodel 'last_value' precision 'us'
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09
...
...
tests/script/tsim/db/create_all_options.sim
浏览文件 @
cd25d2dc
...
...
@@ -43,13 +43,13 @@ print ============= create database with all options
# | CACHEMODEL value ['node', 'last_row', 'last_value', 'both', default: 'node']
# | COMP [0 | 1 | 2, default: 2]
# | DURATION value [60m ~ min(3650d,keep), default: 10d, unit may be minut/hour/day]
# |
FSYNC
value [0 ~ 180000 ms, default: 3000]
# |
WAL_FSYNC_PERIOD
value [0 ~ 180000 ms, default: 3000]
# | MAXROWS value [200~10000, default: 4096]
# | MINROWS value [10~1000, default: 100]
# | KEEP value [max(1d ~ 365000d), default: 1d, unit may be minut/hour/day]
# | PRECISION ['ms' | 'us' | 'ns', default: ms]
# | REPLICA value [1 | 3, default: 1]
# | WAL value [1 | 2, default: 1]
# | WAL
_LEVEL
value [1 | 2, default: 1]
# | VGROUPS value [default: 2]
# | SINGLE_STABLE [0 | 1, default: ]
#
...
...
@@ -62,7 +62,7 @@ print ============= create database with all options
#$data7_db : keep
#$data10_db : minrows
#$data11_db : maxrows
#$data12_db : wal
#$data12_db : wal
_level
#$data13_db : fsync
#$data14_db : comp
#$data15_db : cachelast
...
...
@@ -122,10 +122,10 @@ endi
if $data18_db != none then # cachelast
return -1
endi
if $data20_db != 1 then # wal
if $data20_db != 1 then # wal
_level
return -1
endi
if $data21_db != 3000 then #
fsync
if $data21_db != 3000 then #
wal_fsync_period
return -1
endi
...
...
@@ -254,8 +254,8 @@ sql_error create database db COMP -1
#sql_error create database db KEEP 525600001m
#sql_error create database db KEEP 365001d
print ====>
FSYNC
value [0 ~ 180000 ms, default: 3000]
sql create database db
FSYNC
0
print ====>
WAL_FSYNC_PERIOD
value [0 ~ 180000 ms, default: 3000]
sql create database db
WAL_FSYNC_PERIOD
0
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data21_db != 0 then
...
...
@@ -263,15 +263,15 @@ if $data21_db != 0 then
endi
sql drop database db
sql create database db
FSYNC
180000
sql create database db
WAL_FSYNC_PERIOD
180000
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data21_db != 180000 then
return -1
endi
sql drop database db
sql_error create database db
FSYNC
180001
sql_error create database db
FSYNC
-1
sql_error create database db
WAL_FSYNC_PERIOD
180001
sql_error create database db
WAL_FSYNC_PERIOD
-1
print ====> MAXROWS value [200~10000, default: 4096], MINROWS value [10~1000, default: 100]
sql create database db MAXROWS 10000 MINROWS 1000
...
...
@@ -386,8 +386,8 @@ sql_error create database db REPLICA 4
#sql_error create database db TTL 0
#sql_error create database db TTL -1
print ====> WAL value [1 | 2, default: 1]
sql create database db WAL 2
print ====> WAL
_LEVEL
value [1 | 2, default: 1]
sql create database db WAL
_LEVEL
2
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data20_db != 2 then
...
...
@@ -395,16 +395,16 @@ if $data20_db != 2 then
endi
sql drop database db
sql create database db WAL 1
sql create database db WAL
_LEVEL
1
sql show databases
print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db
if $data20_db != 1 then
return -1
endi
sql drop database db
sql_error create database db WAL 3
sql_error create database db WAL -1
sql_error create database db WAL 0
sql_error create database db WAL
_LEVEL
3
sql_error create database db WAL
_LEVEL
-1
sql_error create database db WAL
_LEVEL
0
print ====> VGROUPS value [1~4096, default: 2]
sql create database db VGROUPS 1
...
...
tests/script/tsim/parser/create_db.sim
浏览文件 @
cd25d2dc
...
...
@@ -107,7 +107,7 @@ $ctime = 36000 # 10 hours
$wal = 1 # valid value is 1, 2
$comp = 1 # max=32, automatically trimmed when exceeding
sql create database $db replica $replica duration $duration keep $keep maxrows $rows_db wal $wal comp $comp
sql create database $db replica $replica duration $duration keep $keep maxrows $rows_db wal
_level
$wal comp $comp
sql show databases
if $rows != 3 then
return -1
...
...
@@ -225,13 +225,13 @@ sql_error create database $db ctime 29
sql_error create database $db ctime 40961
# wal {0, 2}
sql_error create database testwal wal 0
sql_error create database testwal wal
_level
0
sql show databases
if $rows != 2 then
return -1
endi
sql create database testwal wal 1
sql create database testwal wal
_level
1
sql show databases
if $rows != 3 then
return -1
...
...
@@ -243,7 +243,7 @@ if $data13_testwal != 1 then
endi
sql drop database testwal
sql create database testwal wal 2
sql create database testwal wal
_level
2
sql show databases
if $rows != 3 then
return -1
...
...
@@ -254,8 +254,8 @@ if $data13_testwal != 2 then
endi
sql drop database testwal
sql_error create database $db wal -1
sql_error create database $db wal 3
sql_error create database $db wal
_level
-1
sql_error create database $db wal
_level
3
# comp {0, 1, 2}
sql_error create database $db comp -1
...
...
tests/system-test/0-others/fsync.py
浏览文件 @
cd25d2dc
...
...
@@ -49,35 +49,35 @@ class TDTestCase:
fsync_index
=
i
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"create database db1 wal 1"
)
tdSql
.
execute
(
"create database db1 wal
_level
1"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
wal_index
,
1
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"create database db1 wal 2"
)
tdSql
.
execute
(
"create database db1 wal
_level
2"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
wal_index
,
2
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"create database db1
fsync
0"
)
tdSql
.
execute
(
"create database db1
wal_fsync_period
0"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
fsync_index
,
0
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"create database db1
fsync
3000"
)
tdSql
.
execute
(
"create database db1
wal_fsync_period
3000"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
fsync_index
,
3000
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"create database db1
fsync
180000"
)
tdSql
.
execute
(
"create database db1
wal_fsync_period
180000"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
...
...
@@ -85,7 +85,7 @@ class TDTestCase:
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"create database db1 wal
1 fsync
6000"
)
tdSql
.
execute
(
"create database db1 wal
_level 1 wal_fsync_period
6000"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
...
...
@@ -93,49 +93,49 @@ class TDTestCase:
tdSql
.
checkData
(
i
,
wal_index
,
1
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"create database db1 wal
2 fsync
3000"
)
tdSql
.
execute
(
"create database db1 wal
_level 2 wal_fsync_period
3000"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
fsync_index
,
3000
)
tdSql
.
checkData
(
i
,
wal_index
,
2
)
tdSql
.
execute
(
"alter database db1 wal 1"
)
tdSql
.
execute
(
"alter database db1 wal
_level
1"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
fsync_index
,
3000
)
tdSql
.
checkData
(
i
,
wal_index
,
1
)
tdSql
.
execute
(
"alter database db1 wal 2"
)
tdSql
.
execute
(
"alter database db1 wal
_level
2"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
fsync_index
,
3000
)
tdSql
.
checkData
(
i
,
wal_index
,
2
)
tdSql
.
execute
(
"alter database db1
fsync
0"
)
tdSql
.
execute
(
"alter database db1
wal_fsync_period
0"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
fsync_index
,
0
)
tdSql
.
checkData
(
i
,
wal_index
,
2
)
tdSql
.
execute
(
"alter database db1
fsync
3000"
)
tdSql
.
execute
(
"alter database db1
wal_fsync_period
3000"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
fsync_index
,
3000
)
tdSql
.
checkData
(
i
,
wal_index
,
2
)
tdSql
.
execute
(
"alter database db1
fsync
18000"
)
tdSql
.
execute
(
"alter database db1
wal_fsync_period
18000"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
tdSql
.
checkData
(
i
,
fsync_index
,
18000
)
tdSql
.
checkData
(
i
,
wal_index
,
2
)
tdSql
.
execute
(
"alter database db1 wal
1 fsync
3000"
)
tdSql
.
execute
(
"alter database db1 wal
_level 1 wal_fsync_period
3000"
)
tdSql
.
query
(
"show databases"
)
for
i
in
range
(
tdSql
.
queryRows
):
if
tdSql
.
queryResult
[
i
][
0
]
==
"db1"
:
...
...
@@ -147,29 +147,29 @@ class TDTestCase:
@
property
def
fsync_create_err
(
self
):
return
[
"create database db1 wal 0"
,
"create database db1 wal 3"
,
"create database db1 wal null"
,
"create database db1 wal true"
,
"create database db1 wal 1.1"
,
"create database db1
fsync
-1"
,
"create database db1
fsync
180001"
,
"create database db1
fsync
10.111"
,
"create database db1
fsync
true"
,
"create database db1 wal
_level
0"
,
"create database db1 wal
_level
3"
,
"create database db1 wal
_level
null"
,
"create database db1 wal
_level
true"
,
"create database db1 wal
_level
1.1"
,
"create database db1
wal_fsync_period
-1"
,
"create database db1
wal_fsync_period
180001"
,
"create database db1
wal_fsync_period
10.111"
,
"create database db1
wal_fsync_period
true"
,
]
@
property
def
fsync_alter_err
(
self
):
return
[
"alter database db1 wal 0"
,
"alter database db1 wal 3"
,
"alter database db1 wal null"
,
"alter database db1 wal true"
,
"alter database db1 wal 1.1"
,
"alter database db1
fsync
-1"
,
"alter database db1
fsync
180001"
,
"alter database db1
fsync
10.111"
,
"alter database db1
fsync
true"
,
"alter database db1 wal
_level
0"
,
"alter database db1 wal
_level
3"
,
"alter database db1 wal
_level
null"
,
"alter database db1 wal
_level
true"
,
"alter database db1 wal
_level
1.1"
,
"alter database db1
wal_fsync_period
-1"
,
"alter database db1
wal_fsync_period
180001"
,
"alter database db1
wal_fsync_period
10.111"
,
"alter database db1
wal_fsync_period
true"
,
]
def
test_fsync_err
(
self
):
...
...
@@ -290,7 +290,7 @@ class TDTestCase:
# tdSql.execute("use db")
tdLog
.
printNoPrefix
(
"==========step4:after wal, all check again "
)
tdLog
.
printNoPrefix
(
"==========step4:after wal
_level
, all check again "
)
self
.
all_test
()
def
stop
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录