Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
buyaopa
TDengine
提交
495bb309
T
TDengine
项目概览
buyaopa
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
495bb309
编写于
11月 27, 2019
作者:
S
slguan
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/slguan
上级
bb4cdad9
903b88a5
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
1678 addition
and
1842 deletion
+1678
-1842
packaging/cfg/taos.cfg
packaging/cfg/taos.cfg
+6
-0
src/client/inc/tscSQLParser.h
src/client/inc/tscSQLParser.h
+1
-0
src/client/src/sql.c
src/client/src/sql.c
+1268
-1665
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+18
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-2
src/inc/sql.y
src/inc/sql.y
+4
-1
src/inc/taosmsg.h
src/inc/taosmsg.h
+2
-1
src/inc/tglobalcfg.h
src/inc/tglobalcfg.h
+2
-0
src/inc/tsqldef.h
src/inc/tsqldef.h
+139
-140
src/rpc/src/trpc.c
src/rpc/src/trpc.c
+106
-21
src/system/detail/inc/mgmt.h
src/system/detail/inc/mgmt.h
+3
-0
src/system/detail/src/mgmtDnode.c
src/system/detail/src/mgmtDnode.c
+116
-0
src/system/detail/src/mgmtMeter.c
src/system/detail/src/mgmtMeter.c
+1
-1
src/system/detail/src/mgmtShell.c
src/system/detail/src/mgmtShell.c
+2
-0
src/system/detail/src/vnodeQueryImpl.c
src/system/detail/src/vnodeQueryImpl.c
+5
-5
src/system/detail/src/vnodeRead.c
src/system/detail/src/vnodeRead.c
+1
-5
src/util/src/tglobalcfg.c
src/util/src/tglobalcfg.c
+1
-0
src/util/src/ttokenizer.c
src/util/src/ttokenizer.c
+1
-0
未找到文件。
packaging/cfg/taos.cfg
浏览文件 @
495bb309
...
...
@@ -58,6 +58,12 @@
# The server and client should have the same socket type. Otherwise, connect will fail.
# sockettype udp
# The compressed rpc message, option:
# -1 (no compression)
# 0 (all message compressed),
# > 0 (rpc message body which larger than this value will be compressed)
# compressMsgSize -1
# RPC re-try timer, millisecond
# rpcTimer 300
...
...
src/client/inc/tscSQLParser.h
浏览文件 @
495bb309
...
...
@@ -105,6 +105,7 @@ enum TSQL_TYPE {
SHOW_MODULES
=
0x6c
,
SHOW_CONNECTIONS
=
0x6d
,
SHOW_GRANTS
=
0x6e
,
SHOW_VNODES
=
0x6f
,
// create dnode
CREATE_DNODE
=
0x80
,
...
...
src/client/src/sql.c
浏览文件 @
495bb309
...
...
@@ -78,41 +78,39 @@
** defined, then do no error processing.
** YYNSTATE the combined number of states.
** YYNRULE the number of rules in the grammar
** YYNTOKEN Number of terminal symbols
** YY_MAX_SHIFT Maximum value for shift actions
** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
** YY_MIN_REDUCE Maximum value for reduce actions
** YY_ERROR_ACTION The yy_action[] code for syntax error
** YY_ACCEPT_ACTION The yy_action[] code for accept
** YY_NO_ACTION The yy_action[] code for no-op
** YY_MIN_REDUCE Minimum value for reduce actions
** YY_MAX_REDUCE Maximum value for reduce actions
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 26
1
#define YYNOCODE 26
2
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SSQLToken
typedef
union
{
int
yyinit
;
ParseTOKENTYPE
yy0
;
SQuerySQL
*
yy
24
;
tVariantList
*
yy56
;
tSQLExprListList
*
yy74
;
tSQLExpr
*
yy9
0
;
SCreateTableSQL
*
yy158
;
t
Variant
yy186
;
TAOS_FIELD
yy223
;
SCreate
AcctSQL
yy279
;
SLimitVal
yy29
4
;
int
yy332
;
int64_t
yy3
8
9
;
SCreateDBInfo
yy398
;
tFieldList
*
yy4
7
1
;
t
SQLExprList
*
yy498
;
SQuerySQL
*
yy
138
;
SCreateAcctSQL
yy155
;
SLimitVal
yy162
;
int
yy22
0
;
tVariant
yy236
;
t
SQLExprListList
*
yy237
;
tSQLExpr
*
yy244
;
SCreate
DBInfo
yy262
;
tSQLExprList
*
yy28
4
;
SCreateTableSQL
*
yy344
;
int64_t
yy3
6
9
;
TAOS_FIELD
yy397
;
tFieldList
*
yy4
2
1
;
t
VariantList
*
yy480
;
}
YYMINORTYPE
;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
...
...
@@ -122,19 +120,22 @@ typedef union {
#define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo
#define ParseARG_STORE yypParser->pInfo = pInfo
#define YYFALLBACK 1
#define YYNSTATE 251
#define YYNRULE 214
#define YYNTOKEN 195
#define YY_MAX_SHIFT 250
#define YY_MIN_SHIFTREDUCE 401
#define YY_MAX_SHIFTREDUCE 614
#define YY_ERROR_ACTION 615
#define YY_ACCEPT_ACTION 616
#define YY_NO_ACTION 617
#define YY_MIN_REDUCE 618
#define YY_MAX_REDUCE 831
#define YYNSTATE 252
#define YYNRULE 216
#define YY_MAX_SHIFT 251
#define YY_MIN_SHIFTREDUCE 403
#define YY_MAX_SHIFTREDUCE 618
#define YY_MIN_REDUCE 619
#define YY_MAX_REDUCE 834
#define YY_ERROR_ACTION 835
#define YY_ACCEPT_ACTION 836
#define YY_NO_ACTION 837
/************* End control #defines *******************************************/
/* The yyzerominor constant is used to initialize instances of
** YYMINORTYPE objects to zero. */
static
const
YYMINORTYPE
yyzerominor
=
{
0
};
/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
...
...
@@ -162,6 +163,9 @@ typedef union {
** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then
** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE.
**
** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE
** and YY_MAX_REDUCE
** N == YY_ERROR_ACTION A syntax error has occurred.
**
** N == YY_ACCEPT_ACTION The parser accepts its input.
...
...
@@ -169,22 +173,21 @@ typedef union {
** N == YY_NO_ACTION No such action. Denotes unused
** slots in the yy_action[] table.
**
** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE
** and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as
either:
** Given state S and lookahead X, the action is computed as
**
** (A) N = yy_action[ yy_shift_ofst[S] + X ]
** (B) N = yy_default[S]
** yy_action[ yy_shift_ofst[S] + X ]
**
** The (A) formula is preferred. The B formula is used instead if
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.
** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
** and that yy_default[S] should be used instead.
**
** The formula
s above are
for computing the action when the lookahead is
** The formula
above is
for computing the action when the lookahead is
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
** YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
...
...
@@ -198,214 +201,198 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (53
0
)
#define YY_ACTTAB_COUNT (53
1
)
static
const
YYACTIONTYPE
yy_action
[]
=
{
/* 0 */
97
,
439
,
135
,
101
,
101
,
156
,
616
,
250
,
135
,
440
,
/* 10 */
135
,
159
,
814
,
43
,
45
,
21
,
37
,
38
,
813
,
158
,
/* 20 */
814
,
31
,
439
,
727
,
205
,
41
,
39
,
42
,
40
,
10
,
/* 30 */
440
,
153
,
249
,
36
,
35
,
745
,
726
,
34
,
33
,
32
,
/* 40 */
43
,
45
,
737
,
37
,
38
,
166
,
132
,
167
,
31
,
724
,
/* 50 */
193
,
205
,
41
,
39
,
42
,
40
,
202
,
769
,
59
,
200
,
/* 60 */
36
,
35
,
21
,
727
,
34
,
33
,
32
,
43
,
45
,
134
,
/* 70 */
37
,
38
,
74
,
78
,
244
,
31
,
85
,
77
,
205
,
41
,
/* 80 */
39
,
42
,
40
,
80
,
742
,
220
,
498
,
36
,
35
,
439
,
/* 90 */
21
,
34
,
33
,
32
,
168
,
101
,
724
,
440
,
101
,
57
,
/* 100 */
114
,
115
,
224
,
727
,
65
,
68
,
45
,
7
,
37
,
38
,
/* 110 */
62
,
111
,
241
,
31
,
230
,
229
,
205
,
41
,
39
,
42
,
/* 120 */
40
,
232
,
228
,
565
,
724
,
36
,
35
,
21
,
139
,
34
,
/* 130 */
33
,
32
,
21
,
402
,
403
,
404
,
405
,
406
,
407
,
408
,
/* 140 */
409
,
410
,
411
,
412
,
413
,
810
,
37
,
38
,
243
,
768
,
/* 150 */
725
,
31
,
60
,
178
,
205
,
41
,
39
,
42
,
40
,
233
,
/* 160 */
186
,
724
,
183
,
36
,
35
,
809
,
723
,
34
,
33
,
32
,
/* 170 */
654
,
171
,
808
,
124
,
17
,
219
,
242
,
218
,
217
,
216
,
/* 180 */
215
,
214
,
213
,
212
,
211
,
709
,
151
,
698
,
699
,
700
,
/* 190 */
701
,
702
,
703
,
704
,
705
,
706
,
707
,
708
,
163
,
578
,
/* 200 */
11
,
133
,
569
,
133
,
572
,
76
,
575
,
663
,
163
,
578
,
/* 210 */
124
,
241
,
569
,
154
,
572
,
155
,
575
,
148
,
34
,
33
,
/* 220 */
32
,
248
,
247
,
422
,
87
,
86
,
142
,
243
,
546
,
547
,
/* 230 */
160
,
161
,
147
,
523
,
204
,
172
,
18
,
152
,
227
,
226
,
/* 240 */
160
,
161
,
163
,
578
,
526
,
712
,
569
,
711
,
572
,
140
,
/* 250 */
575
,
41
,
39
,
42
,
40
,
242
,
141
,
61
,
27
,
36
,
/* 260 */
35
,
73
,
72
,
34
,
33
,
32
,
514
,
655
,
28
,
511
,
/* 270 */
124
,
512
,
143
,
513
,
160
,
161
,
192
,
36
,
35
,
188
,
/* 280 */
601
,
34
,
33
,
32
,
29
,
571
,
150
,
574
,
567
,
128
,
/* 290 */
126
,
245
,
44
,
89
,
88
,
602
,
537
,
169
,
170
,
29
,
/* 300 */
47
,
577
,
44
,
162
,
538
,
595
,
579
,
144
,
15
,
14
,
/* 310 */
14
,
577
,
570
,
49
,
573
,
504
,
576
,
52
,
503
,
47
,
/* 320 */
145
,
209
,
22
,
146
,
568
,
22
,
576
,
518
,
828
,
519
,
/* 330 */
50
,
516
,
53
,
517
,
84
,
83
,
44
,
9
,
8
,
718
,
/* 340 */
137
,
2
,
131
,
138
,
136
,
577
,
779
,
744
,
778
,
164
,
/* 350 */
775
,
774
,
165
,
231
,
98
,
761
,
760
,
112
,
113
,
665
,
/* 360 */
576
,
110
,
189
,
210
,
129
,
515
,
25
,
223
,
91
,
225
,
/* 370 */
827
,
70
,
826
,
824
,
116
,
683
,
26
,
23
,
130
,
652
,
/* 380 */
533
,
79
,
650
,
54
,
81
,
648
,
647
,
173
,
125
,
645
,
/* 390 */
644
,
643
,
641
,
634
,
127
,
638
,
191
,
636
,
738
,
194
,
/* 400 */
198
,
95
,
748
,
749
,
762
,
51
,
102
,
46
,
203
,
103
,
/* 410 */
201
,
199
,
197
,
195
,
30
,
27
,
222
,
75
,
234
,
235
,
/* 420 */
207
,
55
,
236
,
240
,
238
,
237
,
239
,
63
,
66
,
149
,
/* 430 */
246
,
614
,
175
,
174
,
176
,
646
,
613
,
90
,
640
,
119
,
/* 440 */
123
,
177
,
684
,
117
,
118
,
120
,
106
,
104
,
722
,
122
,
/* 450 */
92
,
121
,
108
,
105
,
107
,
109
,
1
,
24
,
180
,
179
,
/* 460 */
181
,
182
,
612
,
184
,
185
,
605
,
58
,
12
,
13
,
99
,
/* 470 */
190
,
187
,
96
,
534
,
157
,
539
,
196
,
100
,
19
,
64
,
/* 480 */
479
,
580
,
3
,
20
,
4
,
16
,
206
,
6
,
208
,
478
,
/* 490 */
477
,
476
,
475
,
5
,
474
,
473
,
472
,
470
,
47
,
443
,
/* 500 */
67
,
445
,
22
,
221
,
500
,
48
,
499
,
497
,
56
,
464
,
/* 510 */
462
,
454
,
460
,
69
,
456
,
71
,
458
,
452
,
450
,
471
,
/* 520 */
469
,
82
,
441
,
425
,
93
,
415
,
618
,
617
,
617
,
94
,
/* 0 */
443
,
74
,
78
,
244
,
85
,
77
,
153
,
249
,
444
,
836
,
/* 10 */
251
,
80
,
43
,
45
,
7
,
37
,
38
,
62
,
111
,
171
,
/* 20 */
31
,
443
,
443
,
205
,
41
,
39
,
42
,
40
,
241
,
444
,
/* 30 */
444
,
135
,
36
,
35
,
10
,
101
,
34
,
33
,
32
,
43
,
/* 40 */
45
,
600
,
37
,
38
,
156
,
524
,
135
,
31
,
135
,
133
,
/* 50 */
205
,
41
,
39
,
42
,
40
,
159
,
601
,
158
,
601
,
36
,
/* 60 */
35
,
154
,
514
,
34
,
33
,
32
,
404
,
405
,
406
,
407
,
/* 70 */
408
,
409
,
410
,
411
,
412
,
413
,
414
,
415
,
250
,
21
,
/* 80 */
43
,
45
,
172
,
37
,
38
,
227
,
226
,
202
,
31
,
59
,
/* 90 */
21
,
205
,
41
,
39
,
42
,
40
,
34
,
33
,
32
,
57
,
/* 100 */
36
,
35
,
550
,
551
,
34
,
33
,
32
,
45
,
232
,
37
,
/* 110 */
38
,
167
,
132
,
511
,
31
,
21
,
21
,
205
,
41
,
39
,
/* 120 */
42
,
40
,
168
,
569
,
511
,
502
,
36
,
35
,
134
,
178
,
/* 130 */
34
,
33
,
32
,
243
,
37
,
38
,
186
,
512
,
183
,
31
,
/* 140 */
532
,
101
,
205
,
41
,
39
,
42
,
40
,
228
,
233
,
511
,
/* 150 */
511
,
36
,
35
,
230
,
229
,
34
,
33
,
32
,
17
,
219
,
/* 160 */
242
,
218
,
217
,
216
,
215
,
214
,
213
,
212
,
211
,
496
,
/* 170 */
139
,
485
,
486
,
487
,
488
,
489
,
490
,
491
,
492
,
493
,
/* 180 */
494
,
495
,
163
,
582
,
11
,
97
,
573
,
133
,
576
,
529
,
/* 190 */
579
,
597
,
163
,
582
,
166
,
556
,
573
,
200
,
576
,
155
,
/* 200 */
579
,
36
,
35
,
148
,
220
,
34
,
33
,
32
,
21
,
87
,
/* 210 */
86
,
142
,
514
,
243
,
160
,
161
,
101
,
147
,
204
,
248
,
/* 220 */
247
,
426
,
514
,
76
,
160
,
161
,
163
,
582
,
530
,
241
,
/* 230 */
573
,
101
,
576
,
513
,
579
,
193
,
41
,
39
,
42
,
40
,
/* 240 */
242
,
596
,
510
,
27
,
36
,
35
,
49
,
571
,
34
,
33
,
/* 250 */
32
,
114
,
115
,
224
,
65
,
68
,
505
,
441
,
160
,
161
,
/* 260 */
124
,
192
,
518
,
50
,
188
,
515
,
499
,
516
,
498
,
517
,
/* 270 */
555
,
150
,
128
,
126
,
245
,
89
,
88
,
44
,
450
,
442
,
/* 280 */
61
,
124
,
124
,
572
,
595
,
60
,
581
,
44
,
575
,
527
,
/* 290 */
578
,
28
,
18
,
169
,
170
,
605
,
581
,
162
,
606
,
29
,
/* 300 */
541
,
580
,
29
,
542
,
47
,
52
,
599
,
15
,
151
,
583
,
/* 310 */
14
,
580
,
574
,
14
,
577
,
508
,
73
,
72
,
507
,
47
,
/* 320 */
53
,
44
,
22
,
209
,
522
,
152
,
523
,
22
,
140
,
520
,
/* 330 */
581
,
521
,
9
,
8
,
2
,
84
,
83
,
141
,
143
,
144
,
/* 340 */
145
,
615
,
146
,
137
,
131
,
580
,
138
,
136
,
531
,
566
,
/* 350 */
98
,
565
,
164
,
562
,
561
,
165
,
231
,
548
,
547
,
189
,
/* 360 */
112
,
113
,
519
,
452
,
110
,
210
,
129
,
25
,
191
,
223
,
/* 370 */
225
,
614
,
70
,
613
,
611
,
116
,
470
,
26
,
23
,
130
,
/* 380 */
439
,
91
,
79
,
437
,
81
,
435
,
434
,
537
,
194
,
198
,
/* 390 */
173
,
54
,
125
,
432
,
431
,
430
,
428
,
421
,
525
,
127
,
/* 400 */
425
,
51
,
423
,
102
,
46
,
203
,
103
,
104
,
95
,
199
,
/* 410 */
201
,
535
,
197
,
30
,
536
,
549
,
195
,
27
,
222
,
75
,
/* 420 */
234
,
235
,
236
,
237
,
207
,
55
,
238
,
239
,
240
,
246
,
/* 430 */
149
,
618
,
63
,
66
,
175
,
433
,
174
,
176
,
177
,
617
,
/* 440 */
180
,
427
,
119
,
90
,
118
,
471
,
117
,
120
,
122
,
121
,
/* 450 */
123
,
92
,
509
,
1
,
24
,
182
,
107
,
105
,
106
,
108
,
/* 460 */
109
,
179
,
181
,
616
,
184
,
185
,
12
,
609
,
190
,
187
,
/* 470 */
13
,
157
,
96
,
538
,
99
,
196
,
58
,
4
,
19
,
543
,
/* 480 */
100
,
5
,
584
,
3
,
20
,
16
,
206
,
6
,
208
,
64
,
/* 490 */
483
,
482
,
481
,
480
,
479
,
478
,
477
,
476
,
474
,
47
,
/* 500 */
447
,
449
,
67
,
22
,
504
,
221
,
503
,
501
,
56
,
468
,
/* 510 */
466
,
48
,
458
,
464
,
69
,
460
,
462
,
456
,
454
,
475
,
/* 520 */
71
,
473
,
82
,
429
,
445
,
419
,
417
,
93
,
619
,
621
,
/* 530 */
94
,
};
static
const
YYCODETYPE
yy_lookahead
[]
=
{
/* 0 */
199
,
1
,
247
,
199
,
199
,
216
,
196
,
197
,
247
,
9
,
/* 10 */
247
,
256
,
257
,
13
,
14
,
199
,
16
,
17
,
257
,
256
,
/* 20 */
257
,
21
,
1
,
234
,
24
,
25
,
26
,
27
,
28
,
247
,
/* 30 */
9
,
198
,
199
,
33
,
34
,
199
,
234
,
37
,
38
,
39
,
/* 40 */
13
,
14
,
232
,
16
,
17
,
216
,
247
,
231
,
21
,
233
,
/* 50 */
249
,
24
,
25
,
26
,
27
,
28
,
251
,
253
,
253
,
255
,
/* 60 */
33
,
34
,
199
,
234
,
37
,
38
,
39
,
13
,
14
,
247
,
/* 70 */
16
,
17
,
62
,
63
,
64
,
21
,
66
,
67
,
24
,
25
,
/* 80 */
26
,
27
,
28
,
73
,
248
,
216
,
5
,
33
,
34
,
1
,
/* 90 */
199
,
37
,
38
,
39
,
231
,
199
,
233
,
9
,
199
,
99
,
/* 100 */
62
,
63
,
64
,
234
,
66
,
67
,
14
,
95
,
16
,
17
,
/* 110 */
98
,
99
,
77
,
21
,
33
,
34
,
24
,
25
,
26
,
27
,
/* 120 */
28
,
199
,
231
,
96
,
233
,
33
,
34
,
199
,
247
,
37
,
/* 130 */
38
,
39
,
199
,
45
,
46
,
47
,
48
,
49
,
50
,
51
,
/* 140 */
52
,
53
,
54
,
55
,
56
,
247
,
16
,
17
,
58
,
253
,
/* 150 */
228
,
21
,
253
,
124
,
24
,
25
,
26
,
27
,
28
,
231
,
/* 160 */
131
,
233
,
133
,
33
,
34
,
247
,
233
,
37
,
38
,
39
,
/* 170 */
203
,
61
,
247
,
206
,
84
,
85
,
86
,
87
,
88
,
89
,
/* 180 */
90
,
91
,
92
,
93
,
94
,
215
,
247
,
217
,
218
,
219
,
/* 190 */
220
,
221
,
222
,
223
,
224
,
225
,
226
,
227
,
1
,
2
,
/* 200 */
44
,
247
,
5
,
247
,
7
,
71
,
9
,
203
,
1
,
2
,
/* 210 */
206
,
77
,
5
,
259
,
7
,
259
,
9
,
61
,
37
,
38
,
/* 220 */
39
,
58
,
59
,
60
,
68
,
69
,
70
,
58
,
110
,
111
,
/* 230 */
33
,
34
,
76
,
100
,
37
,
125
,
103
,
247
,
128
,
129
,
/* 240 */
33
,
34
,
1
,
2
,
37
,
217
,
5
,
219
,
7
,
247
,
/* 250 */
9
,
25
,
26
,
27
,
28
,
86
,
247
,
235
,
102
,
33
,
/* 260 */
34
,
126
,
127
,
37
,
38
,
39
,
2
,
203
,
246
,
5
,
/* 270 */
206
,
7
,
247
,
9
,
33
,
34
,
120
,
33
,
34
,
123
,
/* 280 */
96
,
37
,
38
,
39
,
100
,
5
,
130
,
7
,
1
,
62
,
/* 290 */
63
,
64
,
95
,
66
,
67
,
96
,
96
,
33
,
34
,
100
,
/* 300 */
100
,
104
,
95
,
57
,
96
,
96
,
96
,
247
,
100
,
100
,
/* 310 */
100
,
104
,
5
,
100
,
7
,
96
,
119
,
100
,
96
,
100
,
/* 320 */
247
,
96
,
100
,
247
,
37
,
100
,
119
,
5
,
234
,
7
,
/* 330 */
117
,
5
,
115
,
7
,
71
,
72
,
95
,
126
,
127
,
230
,
/* 340 */
247
,
95
,
247
,
247
,
247
,
104
,
229
,
199
,
229
,
229
,
/* 350 */
229
,
229
,
229
,
229
,
199
,
254
,
254
,
199
,
199
,
199
,
/* 360 */
119
,
236
,
122
,
199
,
199
,
101
,
199
,
199
,
57
,
199
,
/* 370 */
199
,
199
,
199
,
199
,
199
,
199
,
199
,
199
,
199
,
199
,
/* 380 */
104
,
199
,
199
,
114
,
199
,
199
,
199
,
199
,
199
,
199
,
/* 390 */
199
,
199
,
199
,
199
,
199
,
199
,
258
,
199
,
245
,
250
,
/* 400 */
250
,
200
,
200
,
200
,
200
,
116
,
244
,
113
,
108
,
243
,
/* 410 */
112
,
107
,
106
,
105
,
118
,
102
,
74
,
83
,
82
,
49
,
/* 420 */
200
,
200
,
79
,
78
,
53
,
81
,
80
,
204
,
204
,
200
,
/* 430 */
74
,
5
,
5
,
132
,
132
,
200
,
5
,
201
,
200
,
208
,
/* 440 */
207
,
65
,
214
,
213
,
212
,
211
,
240
,
242
,
232
,
210
,
/* 450 */
201
,
209
,
238
,
241
,
239
,
237
,
205
,
202
,
5
,
132
,
/* 460 */
132
,
65
,
5
,
132
,
65
,
85
,
100
,
95
,
95
,
95
,
/* 470 */
122
,
124
,
121
,
96
,
1
,
96
,
95
,
95
,
100
,
71
,
/* 480 */
9
,
96
,
95
,
100
,
109
,
95
,
97
,
95
,
97
,
5
,
/* 490 */
5
,
5
,
5
,
109
,
1
,
5
,
5
,
5
,
100
,
75
,
/* 500 */
71
,
65
,
100
,
15
,
5
,
16
,
5
,
96
,
95
,
5
,
/* 510 */
5
,
5
,
5
,
127
,
5
,
127
,
5
,
5
,
5
,
5
,
/* 520 */
5
,
65
,
75
,
65
,
21
,
57
,
0
,
260
,
260
,
21
,
/* 530 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 540 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 550 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 560 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 570 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 580 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 590 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 600 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 610 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 620 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 630 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 640 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 650 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 660 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 670 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 680 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 690 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 700 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 710 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 720 */
260
,
260
,
260
,
260
,
260
,
/* 0 */
1
,
64
,
65
,
66
,
67
,
68
,
199
,
200
,
9
,
197
,
/* 10 */
198
,
74
,
13
,
14
,
96
,
16
,
17
,
99
,
100
,
63
,
/* 20 */
21
,
1
,
1
,
24
,
25
,
26
,
27
,
28
,
78
,
9
,
/* 30 */
9
,
248
,
33
,
34
,
248
,
200
,
37
,
38
,
39
,
13
,
/* 40 */
14
,
258
,
16
,
17
,
217
,
233
,
248
,
21
,
248
,
248
,
/* 50 */
24
,
25
,
26
,
27
,
28
,
257
,
258
,
257
,
258
,
33
,
/* 60 */
34
,
260
,
235
,
37
,
38
,
39
,
45
,
46
,
47
,
48
,
/* 70 */
49
,
50
,
51
,
52
,
53
,
54
,
55
,
56
,
57
,
200
,
/* 80 */
13
,
14
,
126
,
16
,
17
,
129
,
130
,
252
,
21
,
254
,
/* 90 */
200
,
24
,
25
,
26
,
27
,
28
,
37
,
38
,
39
,
100
,
/* 100 */
33
,
34
,
111
,
112
,
37
,
38
,
39
,
14
,
200
,
16
,
/* 110 */
17
,
232
,
248
,
234
,
21
,
200
,
200
,
24
,
25
,
26
,
/* 120 */
27
,
28
,
232
,
97
,
234
,
5
,
33
,
34
,
248
,
125
,
/* 130 */
37
,
38
,
39
,
60
,
16
,
17
,
132
,
229
,
134
,
21
,
/* 140 */
200
,
200
,
24
,
25
,
26
,
27
,
28
,
232
,
232
,
234
,
/* 150 */
234
,
33
,
34
,
33
,
34
,
37
,
38
,
39
,
85
,
86
,
/* 160 */
87
,
88
,
89
,
90
,
91
,
92
,
93
,
94
,
95
,
216
,
/* 170 */
248
,
218
,
219
,
220
,
221
,
222
,
223
,
224
,
225
,
226
,
/* 180 */
227
,
228
,
1
,
2
,
44
,
200
,
5
,
248
,
7
,
249
,
/* 190 */
9
,
248
,
1
,
2
,
217
,
254
,
5
,
256
,
7
,
260
,
/* 200 */
9
,
33
,
34
,
63
,
217
,
37
,
38
,
39
,
200
,
69
,
/* 210 */
70
,
71
,
235
,
60
,
33
,
34
,
200
,
77
,
37
,
60
,
/* 220 */
61
,
62
,
235
,
72
,
33
,
34
,
1
,
2
,
37
,
78
,
/* 230 */
5
,
200
,
7
,
235
,
9
,
250
,
25
,
26
,
27
,
28
,
/* 240 */
87
,
248
,
234
,
103
,
33
,
34
,
101
,
1
,
37
,
38
,
/* 250 */
39
,
64
,
65
,
66
,
67
,
68
,
231
,
204
,
33
,
34
,
/* 260 */
207
,
121
,
2
,
118
,
124
,
5
,
218
,
7
,
220
,
9
,
/* 270 */
254
,
131
,
64
,
65
,
66
,
67
,
68
,
96
,
204
,
204
,
/* 280 */
236
,
207
,
207
,
37
,
248
,
254
,
105
,
96
,
5
,
101
,
/* 290 */
7
,
247
,
104
,
33
,
34
,
97
,
105
,
59
,
97
,
101
,
/* 300 */
97
,
120
,
101
,
97
,
101
,
101
,
97
,
101
,
248
,
97
,
/* 310 */
101
,
120
,
5
,
101
,
7
,
97
,
127
,
128
,
97
,
101
,
/* 320 */
116
,
96
,
101
,
97
,
5
,
248
,
7
,
101
,
248
,
5
,
/* 330 */
105
,
7
,
127
,
128
,
96
,
72
,
73
,
248
,
248
,
248
,
/* 340 */
248
,
235
,
248
,
248
,
248
,
120
,
248
,
248
,
200
,
230
,
/* 350 */
200
,
230
,
230
,
230
,
230
,
230
,
230
,
255
,
255
,
123
,
/* 360 */
200
,
200
,
102
,
200
,
237
,
200
,
200
,
200
,
259
,
200
,
/* 370 */
200
,
200
,
200
,
200
,
200
,
200
,
200
,
200
,
200
,
200
,
/* 380 */
200
,
59
,
200
,
200
,
200
,
200
,
200
,
105
,
251
,
251
,
/* 390 */
200
,
115
,
200
,
200
,
200
,
200
,
200
,
200
,
246
,
200
,
/* 400 */
200
,
117
,
200
,
245
,
114
,
109
,
244
,
243
,
201
,
108
,
/* 410 */
113
,
201
,
107
,
119
,
201
,
201
,
106
,
103
,
75
,
84
,
/* 420 */
83
,
49
,
80
,
82
,
201
,
201
,
53
,
81
,
79
,
75
,
/* 430 */
201
,
5
,
205
,
205
,
5
,
201
,
133
,
133
,
58
,
5
,
/* 440 */
5
,
201
,
209
,
202
,
213
,
215
,
214
,
212
,
211
,
210
,
/* 450 */
208
,
202
,
233
,
206
,
203
,
58
,
240
,
242
,
241
,
239
,
/* 460 */
238
,
133
,
133
,
5
,
133
,
58
,
96
,
86
,
123
,
125
,
/* 470 */
96
,
1
,
122
,
97
,
96
,
96
,
101
,
110
,
101
,
97
,
/* 480 */
96
,
110
,
97
,
96
,
101
,
96
,
98
,
96
,
98
,
72
,
/* 490 */
9
,
5
,
5
,
5
,
5
,
1
,
5
,
5
,
5
,
101
,
/* 500 */
76
,
58
,
72
,
101
,
5
,
15
,
5
,
97
,
96
,
5
,
/* 510 */
5
,
16
,
5
,
5
,
128
,
5
,
5
,
5
,
5
,
5
,
/* 520 */
128
,
5
,
58
,
58
,
76
,
59
,
58
,
21
,
0
,
261
,
/* 530 */
21
,
};
#define YY_SHIFT_COUNT (250)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (526)
static
const
unsigned
short
int
yy_shift_ofst
[]
=
{
/* 0 */
156
,
90
,
197
,
241
,
21
,
21
,
21
,
21
,
21
,
21
,
/* 10 */
0
,
88
,
241
,
241
,
241
,
264
,
264
,
264
,
21
,
21
,
/* 20 */
21
,
21
,
21
,
134
,
169
,
35
,
35
,
530
,
207
,
241
,
/* 30 */
241
,
241
,
241
,
241
,
241
,
241
,
241
,
241
,
241
,
241
,
/* 40 */
241
,
241
,
241
,
241
,
241
,
241
,
241
,
264
,
264
,
81
,
/* 50 */
81
,
81
,
81
,
81
,
81
,
12
,
81
,
21
,
21
,
118
,
/* 60 */
118
,
133
,
21
,
21
,
21
,
21
,
21
,
21
,
21
,
21
,
/* 70 */
21
,
21
,
21
,
21
,
21
,
21
,
21
,
21
,
21
,
21
,
/* 80 */
21
,
21
,
21
,
21
,
21
,
21
,
21
,
21
,
21
,
21
,
/* 90 */
21
,
21
,
21
,
21
,
21
,
240
,
311
,
311
,
311
,
276
,
/* 100 */
276
,
311
,
269
,
289
,
294
,
300
,
298
,
304
,
306
,
308
,
/* 110 */
296
,
313
,
311
,
311
,
342
,
342
,
311
,
334
,
336
,
370
,
/* 120 */
343
,
344
,
371
,
346
,
345
,
311
,
356
,
311
,
356
,
530
,
/* 130 */
530
,
27
,
54
,
54
,
54
,
54
,
54
,
92
,
130
,
226
,
/* 140 */
226
,
226
,
10
,
244
,
244
,
244
,
244
,
38
,
227
,
110
,
/* 150 */
29
,
181
,
181
,
163
,
184
,
199
,
200
,
208
,
209
,
210
,
/* 160 */
280
,
307
,
287
,
246
,
213
,
217
,
219
,
222
,
225
,
322
,
/* 170 */
326
,
135
,
211
,
263
,
426
,
301
,
427
,
302
,
376
,
431
,
/* 180 */
327
,
453
,
328
,
396
,
457
,
331
,
399
,
380
,
347
,
372
,
/* 190 */
373
,
348
,
351
,
366
,
377
,
374
,
473
,
381
,
379
,
382
,
/* 200 */
378
,
375
,
383
,
384
,
385
,
387
,
390
,
389
,
392
,
391
,
/* 210 */
408
,
471
,
484
,
485
,
486
,
487
,
493
,
490
,
491
,
492
,
/* 220 */
398
,
424
,
488
,
429
,
436
,
489
,
386
,
388
,
402
,
499
,
/* 230 */
501
,
411
,
413
,
402
,
504
,
505
,
506
,
507
,
509
,
511
,
/* 240 */
512
,
513
,
514
,
515
,
456
,
458
,
447
,
503
,
508
,
468
,
/* 250 */
526
,
#define YY_SHIFT_USE_DFLT (-83)
#define YY_SHIFT_COUNT (251)
#define YY_SHIFT_MIN (-82)
#define YY_SHIFT_MAX (528)
static
const
short
yy_shift_ofst
[]
=
{
/* 0 */
140
,
73
,
181
,
225
,
20
,
20
,
20
,
20
,
20
,
20
,
/* 10 */
-
1
,
21
,
225
,
225
,
225
,
260
,
260
,
260
,
20
,
20
,
/* 20 */
20
,
20
,
20
,
151
,
153
,
-
50
,
-
50
,
-
83
,
191
,
225
,
/* 30 */
225
,
225
,
225
,
225
,
225
,
225
,
225
,
225
,
225
,
225
,
/* 40 */
225
,
225
,
225
,
225
,
225
,
225
,
225
,
260
,
260
,
120
,
/* 50 */
120
,
120
,
120
,
120
,
120
,
-
82
,
120
,
20
,
20
,
-
9
,
/* 60 */
-
9
,
188
,
20
,
20
,
20
,
20
,
20
,
20
,
20
,
20
,
/* 70 */
20
,
20
,
20
,
20
,
20
,
20
,
20
,
20
,
20
,
20
,
/* 80 */
20
,
20
,
20
,
20
,
20
,
20
,
20
,
20
,
20
,
20
,
/* 90 */
20
,
20
,
20
,
20
,
20
,
236
,
322
,
322
,
322
,
282
,
/* 100 */
282
,
322
,
276
,
284
,
290
,
296
,
297
,
301
,
305
,
310
,
/* 110 */
294
,
314
,
322
,
322
,
343
,
343
,
322
,
335
,
337
,
372
,
/* 120 */
342
,
341
,
373
,
346
,
349
,
322
,
354
,
322
,
354
,
-
83
,
/* 130 */
-
83
,
26
,
67
,
67
,
67
,
67
,
67
,
93
,
118
,
211
,
/* 140 */
211
,
211
,
-
63
,
168
,
168
,
168
,
168
,
187
,
208
,
-
44
,
/* 150 */
4
,
59
,
59
,
159
,
198
,
201
,
203
,
206
,
209
,
212
,
/* 160 */
283
,
307
,
246
,
238
,
145
,
204
,
218
,
221
,
226
,
319
,
/* 170 */
324
,
189
,
205
,
263
,
426
,
303
,
429
,
304
,
380
,
434
,
/* 180 */
328
,
435
,
329
,
397
,
458
,
331
,
407
,
381
,
344
,
370
,
/* 190 */
374
,
345
,
350
,
375
,
376
,
378
,
470
,
379
,
382
,
384
,
/* 200 */
377
,
367
,
383
,
371
,
385
,
387
,
389
,
388
,
391
,
390
,
/* 210 */
417
,
481
,
486
,
487
,
488
,
489
,
494
,
491
,
492
,
493
,
/* 220 */
398
,
424
,
490
,
430
,
443
,
495
,
386
,
392
,
402
,
499
,
/* 230 */
501
,
410
,
412
,
402
,
504
,
505
,
507
,
508
,
510
,
511
,
/* 240 */
512
,
513
,
514
,
516
,
464
,
465
,
448
,
506
,
509
,
466
,
/* 250 */
468
,
528
,
};
#define YY_REDUCE_USE_DFLT (-218)
#define YY_REDUCE_COUNT (130)
#define YY_REDUCE_MIN (-2
45
)
#define YY_REDUCE_MAX (25
5
)
#define YY_REDUCE_MIN (-2
17
)
#define YY_REDUCE_MAX (25
1
)
static
const
short
yy_reduce_ofst
[]
=
{
/* 0 */
-
1
90
,
-
30
,
-
245
,
-
237
,
-
196
,
-
195
,
-
184
,
-
137
,
-
109
,
-
72
,
/* 10 */
-
164
,
-
167
,
-
46
,
-
44
,
-
239
,
-
211
,
-
171
,
-
131
,
-
199
,
-
104
,
/* 20 */
-
101
,
-
78
,
-
67
,
-
33
,
28
,
4
,
64
,
22
,
-
218
,
-
201
,
/* 30 */
-
1
78
,
-
119
,
-
102
,
-
82
,
-
75
,
-
61
,
-
10
,
2
,
9
,
25
,
/* 40 */
60
,
73
,
76
,
93
,
95
,
96
,
97
,
-
198
,
94
,
117
,
/* 50 */
1
19
,
120
,
121
,
122
,
123
,
109
,
124
,
148
,
155
,
101
,
/* 60 */
10
2
,
125
,
158
,
159
,
160
,
164
,
165
,
167
,
168
,
170
,
/* 0 */
-
1
88
,
-
47
,
-
202
,
-
200
,
-
59
,
-
165
,
-
121
,
-
110
,
-
85
,
-
84
,
/* 10 */
-
60
,
-
193
,
-
199
,
-
61
,
-
217
,
-
173
,
-
23
,
-
13
,
-
15
,
16
,
/* 20 */
31
,
-
92
,
8
,
53
,
48
,
74
,
75
,
44
,
-
214
,
-
136
,
/* 30 */
-
1
20
,
-
78
,
-
57
,
-
7
,
36
,
60
,
77
,
80
,
89
,
90
,
/* 40 */
91
,
92
,
94
,
95
,
96
,
98
,
99
,
-
2
,
106
,
119
,
/* 50 */
1
21
,
122
,
123
,
124
,
125
,
25
,
126
,
148
,
150
,
102
,
/* 60 */
10
3
,
127
,
160
,
161
,
163
,
165
,
166
,
167
,
169
,
170
,
/* 70 */
171
,
172
,
173
,
174
,
175
,
176
,
177
,
178
,
179
,
180
,
/* 80 */
182
,
183
,
18
5
,
186
,
187
,
188
,
189
,
190
,
191
,
192
,
/* 90 */
19
3
,
194
,
195
,
196
,
198
,
138
,
201
,
202
,
203
,
149
,
/* 100 */
1
50
,
204
,
153
,
162
,
166
,
205
,
212
,
206
,
215
,
214
,
/* 110 */
2
18
,
216
,
220
,
221
,
223
,
224
,
229
,
228
,
230
,
232
,
/* 120 */
23
1
,
234
,
242
,
239
,
233
,
235
,
236
,
238
,
249
,
251
,
/* 130 */
25
5
,
/* 80 */
182
,
183
,
18
4
,
185
,
186
,
190
,
192
,
193
,
194
,
195
,
/* 90 */
19
6
,
197
,
199
,
200
,
202
,
109
,
207
,
210
,
213
,
137
,
/* 100 */
1
38
,
214
,
152
,
158
,
162
,
164
,
215
,
217
,
216
,
220
,
/* 110 */
2
22
,
219
,
223
,
224
,
227
,
228
,
229
,
230
,
232
,
231
,
/* 120 */
23
3
,
235
,
239
,
237
,
242
,
234
,
241
,
240
,
249
,
247
,
/* 130 */
25
1
,
};
static
const
YYACTIONTYPE
yy_default
[]
=
{
/* 0 */
615
,
664
,
816
,
816
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 10 */
74
6
,
631
,
615
,
615
,
816
,
615
,
615
,
615
,
615
,
61
5
,
/* 20 */
615
,
615
,
615
,
666
,
653
,
666
,
666
,
741
,
615
,
61
5
,
/* 30 */
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 40 */
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 50 */
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
765
,
/* 60 */
76
5
,
739
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 70 */
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
651
,
/* 80 */
615
,
649
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 90 */
615
,
615
,
615
,
615
,
615
,
615
,
633
,
633
,
633
,
61
5
,
/* 100 */
615
,
633
,
772
,
776
,
770
,
758
,
766
,
757
,
753
,
752
,
/* 110 */
78
0
,
615
,
633
,
633
,
661
,
661
,
633
,
682
,
680
,
678
,
/* 120 */
67
0
,
676
,
672
,
674
,
668
,
633
,
659
,
633
,
659
,
697
,
/* 130 */
71
0
,
615
,
820
,
821
,
781
,
815
,
771
,
799
,
798
,
811
,
/* 140 */
80
5
,
804
,
615
,
803
,
802
,
801
,
800
,
615
,
615
,
61
5
,
/* 150 */
615
,
807
,
806
,
615
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 160 */
615
,
615
,
615
,
783
,
777
,
773
,
615
,
615
,
615
,
61
5
,
/* 170 */
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 180 */
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 190 */
615
,
817
,
615
,
747
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 200 */
7
67
,
615
,
759
,
615
,
615
,
615
,
615
,
615
,
615
,
719
,
/* 210 */
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 220 */
68
5
,
615
,
615
,
615
,
615
,
615
,
615
,
615
,
825
,
61
5
,
/* 230 */
615
,
615
,
713
,
823
,
615
,
615
,
615
,
615
,
615
,
61
5
,
/* 240 */
615
,
615
,
615
,
615
,
615
,
615
,
615
,
637
,
635
,
61
5
,
/* 250 */
6
1
5
,
/* 0 */
835
,
667
,
819
,
819
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 10 */
74
9
,
634
,
835
,
835
,
819
,
835
,
835
,
835
,
835
,
83
5
,
/* 20 */
835
,
835
,
835
,
669
,
656
,
669
,
669
,
744
,
835
,
83
5
,
/* 30 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 40 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 50 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
768
,
/* 60 */
76
8
,
742
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 70 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
654
,
/* 80 */
835
,
652
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 90 */
835
,
835
,
835
,
835
,
835
,
835
,
636
,
636
,
636
,
83
5
,
/* 100 */
835
,
636
,
775
,
779
,
773
,
761
,
769
,
760
,
756
,
755
,
/* 110 */
78
3
,
835
,
636
,
636
,
664
,
664
,
636
,
685
,
683
,
681
,
/* 120 */
67
3
,
679
,
675
,
677
,
671
,
636
,
662
,
636
,
662
,
700
,
/* 130 */
71
3
,
835
,
823
,
824
,
784
,
818
,
774
,
802
,
801
,
814
,
/* 140 */
80
8
,
807
,
835
,
806
,
805
,
804
,
803
,
835
,
835
,
83
5
,
/* 150 */
835
,
810
,
809
,
835
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 160 */
835
,
835
,
835
,
786
,
780
,
776
,
835
,
835
,
835
,
83
5
,
/* 170 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 180 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 190 */
835
,
820
,
835
,
750
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 200 */
7
70
,
835
,
762
,
835
,
835
,
835
,
835
,
835
,
835
,
722
,
/* 210 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 220 */
68
8
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
828
,
83
5
,
/* 230 */
835
,
835
,
716
,
826
,
835
,
835
,
835
,
835
,
835
,
83
5
,
/* 240 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
640
,
638
,
83
5
,
/* 250 */
6
32
,
83
5
,
};
/********** End of lemon-generated parsing tables *****************************/
...
...
@@ -482,6 +469,8 @@ static const YYCODETYPE yyFallback[] = {
0
,
/* CONFIGS => nothing */
0
,
/* SCORES => nothing */
0
,
/* GRANTS => nothing */
0
,
/* VNODES => nothing */
1
,
/* IPTOKEN => ID */
0
,
/* DOT => nothing */
0
,
/* TABLES => nothing */
0
,
/* STABLES => nothing */
...
...
@@ -490,7 +479,6 @@ static const YYCODETYPE yyFallback[] = {
0
,
/* TABLE => nothing */
1
,
/* DATABASE => ID */
0
,
/* DNODE => nothing */
1
,
/* IPTOKEN => ID */
0
,
/* USER => nothing */
0
,
/* ACCOUNT => nothing */
0
,
/* USE => nothing */
...
...
@@ -651,21 +639,17 @@ typedef struct yyStackEntry yyStackEntry;
/* The state of the parser is completely contained in an instance of
** the following structure */
struct
yyParser
{
yyStackEntry
*
yytos
;
/* Pointer to top element of the
stack */
int
yyidx
;
/* Index of top element in
stack */
#ifdef YYTRACKMAXSTACKDEPTH
int
yy
hwm
;
/* High-water mark of the stack
*/
int
yy
idxMax
;
/* Maximum value of yyidx
*/
#endif
#ifndef YYNOERRORRECOVERY
int
yyerrcnt
;
/* Shifts left before out of the error */
#endif
ParseARG_SDECL
/* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
int
yystksz
;
/* Current side of the stack */
yyStackEntry
*
yystack
;
/* The parser's stack */
yyStackEntry
yystk0
;
/* First stack entry */
#else
yyStackEntry
yystack
[
YYSTACKDEPTH
];
/* The parser's stack */
yyStackEntry
*
yystackEnd
;
/* Last entry in the stack */
#endif
};
typedef
struct
yyParser
yyParser
;
...
...
@@ -702,272 +686,78 @@ void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
}
#endif
/* NDEBUG */
#if
defined(YYCOVERAGE) || !defined(NDEBUG)
#if
ndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required. The following table supplies these names */
static
const
char
*
const
yyTokenName
[]
=
{
/* 0 */
"$"
,
/* 1 */
"ID"
,
/* 2 */
"BOOL"
,
/* 3 */
"TINYINT"
,
/* 4 */
"SMALLINT"
,
/* 5 */
"INTEGER"
,
/* 6 */
"BIGINT"
,
/* 7 */
"FLOAT"
,
/* 8 */
"DOUBLE"
,
/* 9 */
"STRING"
,
/* 10 */
"TIMESTAMP"
,
/* 11 */
"BINARY"
,
/* 12 */
"NCHAR"
,
/* 13 */
"OR"
,
/* 14 */
"AND"
,
/* 15 */
"NOT"
,
/* 16 */
"EQ"
,
/* 17 */
"NE"
,
/* 18 */
"ISNULL"
,
/* 19 */
"NOTNULL"
,
/* 20 */
"IS"
,
/* 21 */
"LIKE"
,
/* 22 */
"GLOB"
,
/* 23 */
"BETWEEN"
,
/* 24 */
"IN"
,
/* 25 */
"GT"
,
/* 26 */
"GE"
,
/* 27 */
"LT"
,
/* 28 */
"LE"
,
/* 29 */
"BITAND"
,
/* 30 */
"BITOR"
,
/* 31 */
"LSHIFT"
,
/* 32 */
"RSHIFT"
,
/* 33 */
"PLUS"
,
/* 34 */
"MINUS"
,
/* 35 */
"DIVIDE"
,
/* 36 */
"TIMES"
,
/* 37 */
"STAR"
,
/* 38 */
"SLASH"
,
/* 39 */
"REM"
,
/* 40 */
"CONCAT"
,
/* 41 */
"UMINUS"
,
/* 42 */
"UPLUS"
,
/* 43 */
"BITNOT"
,
/* 44 */
"SHOW"
,
/* 45 */
"DATABASES"
,
/* 46 */
"MNODES"
,
/* 47 */
"DNODES"
,
/* 48 */
"ACCOUNTS"
,
/* 49 */
"USERS"
,
/* 50 */
"MODULES"
,
/* 51 */
"QUERIES"
,
/* 52 */
"CONNECTIONS"
,
/* 53 */
"STREAMS"
,
/* 54 */
"CONFIGS"
,
/* 55 */
"SCORES"
,
/* 56 */
"GRANTS"
,
/* 57 */
"DOT"
,
/* 58 */
"TABLES"
,
/* 59 */
"STABLES"
,
/* 60 */
"VGROUPS"
,
/* 61 */
"DROP"
,
/* 62 */
"TABLE"
,
/* 63 */
"DATABASE"
,
/* 64 */
"DNODE"
,
/* 65 */
"IPTOKEN"
,
/* 66 */
"USER"
,
/* 67 */
"ACCOUNT"
,
/* 68 */
"USE"
,
/* 69 */
"DESCRIBE"
,
/* 70 */
"ALTER"
,
/* 71 */
"PASS"
,
/* 72 */
"PRIVILEGE"
,
/* 73 */
"LOCAL"
,
/* 74 */
"IF"
,
/* 75 */
"EXISTS"
,
/* 76 */
"CREATE"
,
/* 77 */
"PPS"
,
/* 78 */
"TSERIES"
,
/* 79 */
"DBS"
,
/* 80 */
"STORAGE"
,
/* 81 */
"QTIME"
,
/* 82 */
"CONNS"
,
/* 83 */
"STATE"
,
/* 84 */
"KEEP"
,
/* 85 */
"CACHE"
,
/* 86 */
"REPLICA"
,
/* 87 */
"DAYS"
,
/* 88 */
"ROWS"
,
/* 89 */
"ABLOCKS"
,
/* 90 */
"TBLOCKS"
,
/* 91 */
"CTIME"
,
/* 92 */
"CLOG"
,
/* 93 */
"COMP"
,
/* 94 */
"PRECISION"
,
/* 95 */
"LP"
,
/* 96 */
"RP"
,
/* 97 */
"TAGS"
,
/* 98 */
"USING"
,
/* 99 */
"AS"
,
/* 100 */
"COMMA"
,
/* 101 */
"NULL"
,
/* 102 */
"SELECT"
,
/* 103 */
"FROM"
,
/* 104 */
"VARIABLE"
,
/* 105 */
"INTERVAL"
,
/* 106 */
"FILL"
,
/* 107 */
"SLIDING"
,
/* 108 */
"ORDER"
,
/* 109 */
"BY"
,
/* 110 */
"ASC"
,
/* 111 */
"DESC"
,
/* 112 */
"GROUP"
,
/* 113 */
"HAVING"
,
/* 114 */
"LIMIT"
,
/* 115 */
"OFFSET"
,
/* 116 */
"SLIMIT"
,
/* 117 */
"SOFFSET"
,
/* 118 */
"WHERE"
,
/* 119 */
"NOW"
,
/* 120 */
"INSERT"
,
/* 121 */
"INTO"
,
/* 122 */
"VALUES"
,
/* 123 */
"RESET"
,
/* 124 */
"QUERY"
,
/* 125 */
"ADD"
,
/* 126 */
"COLUMN"
,
/* 127 */
"TAG"
,
/* 128 */
"CHANGE"
,
/* 129 */
"SET"
,
/* 130 */
"KILL"
,
/* 131 */
"CONNECTION"
,
/* 132 */
"COLON"
,
/* 133 */
"STREAM"
,
/* 134 */
"ABORT"
,
/* 135 */
"AFTER"
,
/* 136 */
"ATTACH"
,
/* 137 */
"BEFORE"
,
/* 138 */
"BEGIN"
,
/* 139 */
"CASCADE"
,
/* 140 */
"CLUSTER"
,
/* 141 */
"CONFLICT"
,
/* 142 */
"COPY"
,
/* 143 */
"DEFERRED"
,
/* 144 */
"DELIMITERS"
,
/* 145 */
"DETACH"
,
/* 146 */
"EACH"
,
/* 147 */
"END"
,
/* 148 */
"EXPLAIN"
,
/* 149 */
"FAIL"
,
/* 150 */
"FOR"
,
/* 151 */
"IGNORE"
,
/* 152 */
"IMMEDIATE"
,
/* 153 */
"INITIALLY"
,
/* 154 */
"INSTEAD"
,
/* 155 */
"MATCH"
,
/* 156 */
"KEY"
,
/* 157 */
"OF"
,
/* 158 */
"RAISE"
,
/* 159 */
"REPLACE"
,
/* 160 */
"RESTRICT"
,
/* 161 */
"ROW"
,
/* 162 */
"STATEMENT"
,
/* 163 */
"TRIGGER"
,
/* 164 */
"VIEW"
,
/* 165 */
"ALL"
,
/* 166 */
"COUNT"
,
/* 167 */
"SUM"
,
/* 168 */
"AVG"
,
/* 169 */
"MIN"
,
/* 170 */
"MAX"
,
/* 171 */
"FIRST"
,
/* 172 */
"LAST"
,
/* 173 */
"TOP"
,
/* 174 */
"BOTTOM"
,
/* 175 */
"STDDEV"
,
/* 176 */
"PERCENTILE"
,
/* 177 */
"APERCENTILE"
,
/* 178 */
"LEASTSQUARES"
,
/* 179 */
"HISTOGRAM"
,
/* 180 */
"DIFF"
,
/* 181 */
"SPREAD"
,
/* 182 */
"TWA"
,
/* 183 */
"INTERP"
,
/* 184 */
"LAST_ROW"
,
/* 185 */
"SEMI"
,
/* 186 */
"NONE"
,
/* 187 */
"PREV"
,
/* 188 */
"LINEAR"
,
/* 189 */
"IMPORT"
,
/* 190 */
"METRIC"
,
/* 191 */
"TBNAME"
,
/* 192 */
"JOIN"
,
/* 193 */
"METRICS"
,
/* 194 */
"STABLE"
,
/* 195 */
"error"
,
/* 196 */
"program"
,
/* 197 */
"cmd"
,
/* 198 */
"dbPrefix"
,
/* 199 */
"ids"
,
/* 200 */
"cpxName"
,
/* 201 */
"ifexists"
,
/* 202 */
"alter_db_optr"
,
/* 203 */
"acct_optr"
,
/* 204 */
"ifnotexists"
,
/* 205 */
"db_optr"
,
/* 206 */
"pps"
,
/* 207 */
"tseries"
,
/* 208 */
"dbs"
,
/* 209 */
"streams"
,
/* 210 */
"storage"
,
/* 211 */
"qtime"
,
/* 212 */
"users"
,
/* 213 */
"conns"
,
/* 214 */
"state"
,
/* 215 */
"keep"
,
/* 216 */
"tagitemlist"
,
/* 217 */
"tables"
,
/* 218 */
"cache"
,
/* 219 */
"replica"
,
/* 220 */
"days"
,
/* 221 */
"rows"
,
/* 222 */
"ablocks"
,
/* 223 */
"tblocks"
,
/* 224 */
"ctime"
,
/* 225 */
"clog"
,
/* 226 */
"comp"
,
/* 227 */
"prec"
,
/* 228 */
"typename"
,
/* 229 */
"signed"
,
/* 230 */
"create_table_args"
,
/* 231 */
"columnlist"
,
/* 232 */
"select"
,
/* 233 */
"column"
,
/* 234 */
"tagitem"
,
/* 235 */
"selcollist"
,
/* 236 */
"from"
,
/* 237 */
"where_opt"
,
/* 238 */
"interval_opt"
,
/* 239 */
"fill_opt"
,
/* 240 */
"sliding_opt"
,
/* 241 */
"groupby_opt"
,
/* 242 */
"orderby_opt"
,
/* 243 */
"having_opt"
,
/* 244 */
"slimit_opt"
,
/* 245 */
"limit_opt"
,
/* 246 */
"sclp"
,
/* 247 */
"expr"
,
/* 248 */
"as"
,
/* 249 */
"tablelist"
,
/* 250 */
"tmvar"
,
/* 251 */
"sortlist"
,
/* 252 */
"sortitem"
,
/* 253 */
"item"
,
/* 254 */
"sortorder"
,
/* 255 */
"grouplist"
,
/* 256 */
"exprlist"
,
/* 257 */
"expritem"
,
/* 258 */
"insert_value_list"
,
/* 259 */
"itemlist"
,
"$"
,
"ID"
,
"BOOL"
,
"TINYINT"
,
"SMALLINT"
,
"INTEGER"
,
"BIGINT"
,
"FLOAT"
,
"DOUBLE"
,
"STRING"
,
"TIMESTAMP"
,
"BINARY"
,
"NCHAR"
,
"OR"
,
"AND"
,
"NOT"
,
"EQ"
,
"NE"
,
"ISNULL"
,
"NOTNULL"
,
"IS"
,
"LIKE"
,
"GLOB"
,
"BETWEEN"
,
"IN"
,
"GT"
,
"GE"
,
"LT"
,
"LE"
,
"BITAND"
,
"BITOR"
,
"LSHIFT"
,
"RSHIFT"
,
"PLUS"
,
"MINUS"
,
"DIVIDE"
,
"TIMES"
,
"STAR"
,
"SLASH"
,
"REM"
,
"CONCAT"
,
"UMINUS"
,
"UPLUS"
,
"BITNOT"
,
"SHOW"
,
"DATABASES"
,
"MNODES"
,
"DNODES"
,
"ACCOUNTS"
,
"USERS"
,
"MODULES"
,
"QUERIES"
,
"CONNECTIONS"
,
"STREAMS"
,
"CONFIGS"
,
"SCORES"
,
"GRANTS"
,
"VNODES"
,
"IPTOKEN"
,
"DOT"
,
"TABLES"
,
"STABLES"
,
"VGROUPS"
,
"DROP"
,
"TABLE"
,
"DATABASE"
,
"DNODE"
,
"USER"
,
"ACCOUNT"
,
"USE"
,
"DESCRIBE"
,
"ALTER"
,
"PASS"
,
"PRIVILEGE"
,
"LOCAL"
,
"IF"
,
"EXISTS"
,
"CREATE"
,
"PPS"
,
"TSERIES"
,
"DBS"
,
"STORAGE"
,
"QTIME"
,
"CONNS"
,
"STATE"
,
"KEEP"
,
"CACHE"
,
"REPLICA"
,
"DAYS"
,
"ROWS"
,
"ABLOCKS"
,
"TBLOCKS"
,
"CTIME"
,
"CLOG"
,
"COMP"
,
"PRECISION"
,
"LP"
,
"RP"
,
"TAGS"
,
"USING"
,
"AS"
,
"COMMA"
,
"NULL"
,
"SELECT"
,
"FROM"
,
"VARIABLE"
,
"INTERVAL"
,
"FILL"
,
"SLIDING"
,
"ORDER"
,
"BY"
,
"ASC"
,
"DESC"
,
"GROUP"
,
"HAVING"
,
"LIMIT"
,
"OFFSET"
,
"SLIMIT"
,
"SOFFSET"
,
"WHERE"
,
"NOW"
,
"INSERT"
,
"INTO"
,
"VALUES"
,
"RESET"
,
"QUERY"
,
"ADD"
,
"COLUMN"
,
"TAG"
,
"CHANGE"
,
"SET"
,
"KILL"
,
"CONNECTION"
,
"COLON"
,
"STREAM"
,
"ABORT"
,
"AFTER"
,
"ATTACH"
,
"BEFORE"
,
"BEGIN"
,
"CASCADE"
,
"CLUSTER"
,
"CONFLICT"
,
"COPY"
,
"DEFERRED"
,
"DELIMITERS"
,
"DETACH"
,
"EACH"
,
"END"
,
"EXPLAIN"
,
"FAIL"
,
"FOR"
,
"IGNORE"
,
"IMMEDIATE"
,
"INITIALLY"
,
"INSTEAD"
,
"MATCH"
,
"KEY"
,
"OF"
,
"RAISE"
,
"REPLACE"
,
"RESTRICT"
,
"ROW"
,
"STATEMENT"
,
"TRIGGER"
,
"VIEW"
,
"ALL"
,
"COUNT"
,
"SUM"
,
"AVG"
,
"MIN"
,
"MAX"
,
"FIRST"
,
"LAST"
,
"TOP"
,
"BOTTOM"
,
"STDDEV"
,
"PERCENTILE"
,
"APERCENTILE"
,
"LEASTSQUARES"
,
"HISTOGRAM"
,
"DIFF"
,
"SPREAD"
,
"TWA"
,
"INTERP"
,
"LAST_ROW"
,
"SEMI"
,
"NONE"
,
"PREV"
,
"LINEAR"
,
"IMPORT"
,
"METRIC"
,
"TBNAME"
,
"JOIN"
,
"METRICS"
,
"STABLE"
,
"error"
,
"program"
,
"cmd"
,
"dbPrefix"
,
"ids"
,
"cpxName"
,
"ifexists"
,
"alter_db_optr"
,
"acct_optr"
,
"ifnotexists"
,
"db_optr"
,
"pps"
,
"tseries"
,
"dbs"
,
"streams"
,
"storage"
,
"qtime"
,
"users"
,
"conns"
,
"state"
,
"keep"
,
"tagitemlist"
,
"tables"
,
"cache"
,
"replica"
,
"days"
,
"rows"
,
"ablocks"
,
"tblocks"
,
"ctime"
,
"clog"
,
"comp"
,
"prec"
,
"typename"
,
"signed"
,
"create_table_args"
,
"columnlist"
,
"select"
,
"column"
,
"tagitem"
,
"selcollist"
,
"from"
,
"where_opt"
,
"interval_opt"
,
"fill_opt"
,
"sliding_opt"
,
"groupby_opt"
,
"orderby_opt"
,
"having_opt"
,
"slimit_opt"
,
"limit_opt"
,
"sclp"
,
"expr"
,
"as"
,
"tablelist"
,
"tmvar"
,
"sortlist"
,
"sortitem"
,
"item"
,
"sortorder"
,
"grouplist"
,
"exprlist"
,
"expritem"
,
"insert_value_list"
,
"itemlist"
,
};
#endif
/*
defined(YYCOVERAGE) || !defined(NDEBUG)
*/
#endif
/*
NDEBUG
*/
#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
...
...
@@ -986,241 +776,233 @@ static const char *const yyRuleName[] = {
/* 10 */
"cmd ::= SHOW CONFIGS"
,
/* 11 */
"cmd ::= SHOW SCORES"
,
/* 12 */
"cmd ::= SHOW GRANTS"
,
/* 13 */
"dbPrefix ::="
,
/* 14 */
"dbPrefix ::= ids DOT"
,
/* 15 */
"cpxName ::="
,
/* 16 */
"cpxName ::= DOT ids"
,
/* 17 */
"cmd ::= SHOW dbPrefix TABLES"
,
/* 18 */
"cmd ::= SHOW dbPrefix TABLES LIKE ids"
,
/* 19 */
"cmd ::= SHOW dbPrefix STABLES"
,
/* 20 */
"cmd ::= SHOW dbPrefix STABLES LIKE ids"
,
/* 21 */
"cmd ::= SHOW dbPrefix VGROUPS"
,
/* 22 */
"cmd ::= DROP TABLE ifexists ids cpxName"
,
/* 23 */
"cmd ::= DROP DATABASE ifexists ids"
,
/* 24 */
"cmd ::= DROP DNODE IPTOKEN"
,
/* 25 */
"cmd ::= DROP USER ids"
,
/* 26 */
"cmd ::= DROP ACCOUNT ids"
,
/* 27 */
"cmd ::= USE ids"
,
/* 28 */
"cmd ::= DESCRIBE ids cpxName"
,
/* 29 */
"cmd ::= ALTER USER ids PASS ids"
,
/* 30 */
"cmd ::= ALTER USER ids PRIVILEGE ids"
,
/* 31 */
"cmd ::= ALTER DNODE IPTOKEN ids"
,
/* 32 */
"cmd ::= ALTER DNODE IPTOKEN ids ids"
,
/* 33 */
"cmd ::= ALTER LOCAL ids"
,
/* 34 */
"cmd ::= ALTER LOCAL ids ids"
,
/* 35 */
"cmd ::= ALTER DATABASE ids alter_db_optr"
,
/* 36 */
"cmd ::= ALTER ACCOUNT ids acct_optr"
,
/* 37 */
"cmd ::= ALTER ACCOUNT ids PASS ids acct_optr"
,
/* 38 */
"ids ::= ID"
,
/* 39 */
"ids ::= STRING"
,
/* 40 */
"ifexists ::= IF EXISTS"
,
/* 41 */
"ifexists ::="
,
/* 42 */
"ifnotexists ::= IF NOT EXISTS"
,
/* 43 */
"ifnotexists ::="
,
/* 44 */
"cmd ::= CREATE DNODE IPTOKEN"
,
/* 45 */
"cmd ::= CREATE ACCOUNT ids PASS ids acct_optr"
,
/* 46 */
"cmd ::= CREATE DATABASE ifnotexists ids db_optr"
,
/* 47 */
"cmd ::= CREATE USER ids PASS ids"
,
/* 48 */
"pps ::="
,
/* 49 */
"pps ::= PPS INTEGER"
,
/* 50 */
"tseries ::="
,
/* 51 */
"tseries ::= TSERIES INTEGER"
,
/* 52 */
"dbs ::="
,
/* 53 */
"dbs ::= DBS INTEGER"
,
/* 54 */
"streams ::="
,
/* 55 */
"streams ::= STREAMS INTEGER"
,
/* 56 */
"storage ::="
,
/* 57 */
"storage ::= STORAGE INTEGER"
,
/* 58 */
"qtime ::="
,
/* 59 */
"qtime ::= QTIME INTEGER"
,
/* 60 */
"users ::="
,
/* 61 */
"users ::= USERS INTEGER"
,
/* 62 */
"conns ::="
,
/* 63 */
"conns ::= CONNS INTEGER"
,
/* 64 */
"state ::="
,
/* 65 */
"state ::= STATE ids"
,
/* 66 */
"acct_optr ::= pps tseries storage streams qtime dbs users conns state"
,
/* 67 */
"keep ::= KEEP tagitemlist"
,
/* 68 */
"tables ::= TABLES INTEGER"
,
/* 69 */
"cache ::= CACHE INTEGER"
,
/* 70 */
"replica ::= REPLICA INTEGER"
,
/* 71 */
"days ::= DAYS INTEGER"
,
/* 72 */
"rows ::= ROWS INTEGER"
,
/* 73 */
"ablocks ::= ABLOCKS ID"
,
/* 74 */
"tblocks ::= TBLOCKS INTEGER"
,
/* 75 */
"ctime ::= CTIME INTEGER"
,
/* 76 */
"clog ::= CLOG INTEGER"
,
/* 77 */
"comp ::= COMP INTEGER"
,
/* 78 */
"prec ::= PRECISION STRING"
,
/* 79 */
"db_optr ::="
,
/* 80 */
"db_optr ::= db_optr tables"
,
/* 81 */
"db_optr ::= db_optr cache"
,
/* 82 */
"db_optr ::= db_optr replica"
,
/* 83 */
"db_optr ::= db_optr days"
,
/* 84 */
"db_optr ::= db_optr rows"
,
/* 85 */
"db_optr ::= db_optr ablocks"
,
/* 86 */
"db_optr ::= db_optr tblocks"
,
/* 87 */
"db_optr ::= db_optr ctime"
,
/* 88 */
"db_optr ::= db_optr clog"
,
/* 89 */
"db_optr ::= db_optr comp"
,
/* 90 */
"db_optr ::= db_optr prec"
,
/* 91 */
"db_optr ::= db_optr keep"
,
/* 92 */
"alter_db_optr ::="
,
/* 93 */
"alter_db_optr ::= alter_db_optr replica"
,
/* 94 */
"alter_db_optr ::= alter_db_optr tables"
,
/* 95 */
"typename ::= ids"
,
/* 96 */
"typename ::= ids LP signed RP"
,
/* 97 */
"signed ::= INTEGER"
,
/* 98 */
"signed ::= PLUS INTEGER"
,
/* 99 */
"signed ::= MINUS INTEGER"
,
/* 100 */
"cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args"
,
/* 101 */
"create_table_args ::= LP columnlist RP"
,
/* 102 */
"create_table_args ::= LP columnlist RP TAGS LP columnlist RP"
,
/* 103 */
"create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP"
,
/* 104 */
"create_table_args ::= AS select"
,
/* 105 */
"columnlist ::= columnlist COMMA column"
,
/* 106 */
"columnlist ::= column"
,
/* 107 */
"column ::= ids typename"
,
/* 108 */
"tagitemlist ::= tagitemlist COMMA tagitem"
,
/* 109 */
"tagitemlist ::= tagitem"
,
/* 110 */
"tagitem ::= INTEGER"
,
/* 111 */
"tagitem ::= FLOAT"
,
/* 112 */
"tagitem ::= STRING"
,
/* 113 */
"tagitem ::= BOOL"
,
/* 114 */
"tagitem ::= NULL"
,
/* 115 */
"tagitem ::= MINUS INTEGER"
,
/* 116 */
"tagitem ::= MINUS FLOAT"
,
/* 117 */
"tagitem ::= PLUS INTEGER"
,
/* 118 */
"tagitem ::= PLUS FLOAT"
,
/* 119 */
"cmd ::= select"
,
/* 120 */
"select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt"
,
/* 121 */
"select ::= SELECT selcollist"
,
/* 122 */
"sclp ::= selcollist COMMA"
,
/* 123 */
"sclp ::="
,
/* 124 */
"selcollist ::= sclp expr as"
,
/* 125 */
"selcollist ::= sclp STAR"
,
/* 126 */
"as ::= AS ids"
,
/* 127 */
"as ::= ids"
,
/* 128 */
"as ::="
,
/* 129 */
"from ::= FROM tablelist"
,
/* 130 */
"tablelist ::= ids cpxName"
,
/* 131 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 132 */
"tmvar ::= VARIABLE"
,
/* 133 */
"interval_opt ::= INTERVAL LP tmvar RP"
,
/* 134 */
"interval_opt ::="
,
/* 135 */
"fill_opt ::="
,
/* 136 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 137 */
"fill_opt ::= FILL LP ID RP"
,
/* 138 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 139 */
"sliding_opt ::="
,
/* 140 */
"orderby_opt ::="
,
/* 141 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 142 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 143 */
"sortlist ::= item sortorder"
,
/* 144 */
"item ::= ids cpxName"
,
/* 145 */
"sortorder ::= ASC"
,
/* 146 */
"sortorder ::= DESC"
,
/* 147 */
"sortorder ::="
,
/* 148 */
"groupby_opt ::="
,
/* 149 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 150 */
"grouplist ::= grouplist COMMA item"
,
/* 151 */
"grouplist ::= item"
,
/* 152 */
"having_opt ::="
,
/* 153 */
"having_opt ::= HAVING expr"
,
/* 154 */
"limit_opt ::="
,
/* 155 */
"limit_opt ::= LIMIT signed"
,
/* 156 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 157 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 158 */
"slimit_opt ::="
,
/* 159 */
"slimit_opt ::= SLIMIT signed"
,
/* 160 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 161 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 162 */
"where_opt ::="
,
/* 163 */
"where_opt ::= WHERE expr"
,
/* 164 */
"expr ::= LP expr RP"
,
/* 165 */
"expr ::= ID"
,
/* 166 */
"expr ::= ID DOT ID"
,
/* 167 */
"expr ::= ID DOT STAR"
,
/* 168 */
"expr ::= INTEGER"
,
/* 169 */
"expr ::= MINUS INTEGER"
,
/* 170 */
"expr ::= PLUS INTEGER"
,
/* 171 */
"expr ::= FLOAT"
,
/* 172 */
"expr ::= MINUS FLOAT"
,
/* 173 */
"expr ::= PLUS FLOAT"
,
/* 174 */
"expr ::= STRING"
,
/* 175 */
"expr ::= NOW"
,
/* 176 */
"expr ::= VARIABLE"
,
/* 177 */
"expr ::= BOOL"
,
/* 178 */
"expr ::= ID LP exprlist RP"
,
/* 179 */
"expr ::= ID LP STAR RP"
,
/* 180 */
"expr ::= expr AND expr"
,
/* 181 */
"expr ::= expr OR expr"
,
/* 182 */
"expr ::= expr LT expr"
,
/* 183 */
"expr ::= expr GT expr"
,
/* 184 */
"expr ::= expr LE expr"
,
/* 185 */
"expr ::= expr GE expr"
,
/* 186 */
"expr ::= expr NE expr"
,
/* 187 */
"expr ::= expr EQ expr"
,
/* 188 */
"expr ::= expr PLUS expr"
,
/* 189 */
"expr ::= expr MINUS expr"
,
/* 190 */
"expr ::= expr STAR expr"
,
/* 191 */
"expr ::= expr SLASH expr"
,
/* 192 */
"expr ::= expr REM expr"
,
/* 193 */
"expr ::= expr LIKE expr"
,
/* 194 */
"expr ::= expr IN LP exprlist RP"
,
/* 195 */
"exprlist ::= exprlist COMMA expritem"
,
/* 196 */
"exprlist ::= expritem"
,
/* 197 */
"expritem ::= expr"
,
/* 198 */
"expritem ::="
,
/* 199 */
"cmd ::= INSERT INTO cpxName insert_value_list"
,
/* 200 */
"insert_value_list ::= VALUES LP itemlist RP"
,
/* 201 */
"insert_value_list ::= insert_value_list VALUES LP itemlist RP"
,
/* 202 */
"itemlist ::= itemlist COMMA expr"
,
/* 203 */
"itemlist ::= expr"
,
/* 204 */
"cmd ::= RESET QUERY CACHE"
,
/* 205 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 206 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 207 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 208 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 209 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 210 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 211 */
"cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER"
,
/* 212 */
"cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER"
,
/* 213 */
"cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER"
,
/* 13 */
"cmd ::= SHOW VNODES"
,
/* 14 */
"cmd ::= SHOW VNODES IPTOKEN"
,
/* 15 */
"dbPrefix ::="
,
/* 16 */
"dbPrefix ::= ids DOT"
,
/* 17 */
"cpxName ::="
,
/* 18 */
"cpxName ::= DOT ids"
,
/* 19 */
"cmd ::= SHOW dbPrefix TABLES"
,
/* 20 */
"cmd ::= SHOW dbPrefix TABLES LIKE ids"
,
/* 21 */
"cmd ::= SHOW dbPrefix STABLES"
,
/* 22 */
"cmd ::= SHOW dbPrefix STABLES LIKE ids"
,
/* 23 */
"cmd ::= SHOW dbPrefix VGROUPS"
,
/* 24 */
"cmd ::= DROP TABLE ifexists ids cpxName"
,
/* 25 */
"cmd ::= DROP DATABASE ifexists ids"
,
/* 26 */
"cmd ::= DROP DNODE IPTOKEN"
,
/* 27 */
"cmd ::= DROP USER ids"
,
/* 28 */
"cmd ::= DROP ACCOUNT ids"
,
/* 29 */
"cmd ::= USE ids"
,
/* 30 */
"cmd ::= DESCRIBE ids cpxName"
,
/* 31 */
"cmd ::= ALTER USER ids PASS ids"
,
/* 32 */
"cmd ::= ALTER USER ids PRIVILEGE ids"
,
/* 33 */
"cmd ::= ALTER DNODE IPTOKEN ids"
,
/* 34 */
"cmd ::= ALTER DNODE IPTOKEN ids ids"
,
/* 35 */
"cmd ::= ALTER LOCAL ids"
,
/* 36 */
"cmd ::= ALTER LOCAL ids ids"
,
/* 37 */
"cmd ::= ALTER DATABASE ids alter_db_optr"
,
/* 38 */
"cmd ::= ALTER ACCOUNT ids acct_optr"
,
/* 39 */
"cmd ::= ALTER ACCOUNT ids PASS ids acct_optr"
,
/* 40 */
"ids ::= ID"
,
/* 41 */
"ids ::= STRING"
,
/* 42 */
"ifexists ::= IF EXISTS"
,
/* 43 */
"ifexists ::="
,
/* 44 */
"ifnotexists ::= IF NOT EXISTS"
,
/* 45 */
"ifnotexists ::="
,
/* 46 */
"cmd ::= CREATE DNODE IPTOKEN"
,
/* 47 */
"cmd ::= CREATE ACCOUNT ids PASS ids acct_optr"
,
/* 48 */
"cmd ::= CREATE DATABASE ifnotexists ids db_optr"
,
/* 49 */
"cmd ::= CREATE USER ids PASS ids"
,
/* 50 */
"pps ::="
,
/* 51 */
"pps ::= PPS INTEGER"
,
/* 52 */
"tseries ::="
,
/* 53 */
"tseries ::= TSERIES INTEGER"
,
/* 54 */
"dbs ::="
,
/* 55 */
"dbs ::= DBS INTEGER"
,
/* 56 */
"streams ::="
,
/* 57 */
"streams ::= STREAMS INTEGER"
,
/* 58 */
"storage ::="
,
/* 59 */
"storage ::= STORAGE INTEGER"
,
/* 60 */
"qtime ::="
,
/* 61 */
"qtime ::= QTIME INTEGER"
,
/* 62 */
"users ::="
,
/* 63 */
"users ::= USERS INTEGER"
,
/* 64 */
"conns ::="
,
/* 65 */
"conns ::= CONNS INTEGER"
,
/* 66 */
"state ::="
,
/* 67 */
"state ::= STATE ids"
,
/* 68 */
"acct_optr ::= pps tseries storage streams qtime dbs users conns state"
,
/* 69 */
"keep ::= KEEP tagitemlist"
,
/* 70 */
"tables ::= TABLES INTEGER"
,
/* 71 */
"cache ::= CACHE INTEGER"
,
/* 72 */
"replica ::= REPLICA INTEGER"
,
/* 73 */
"days ::= DAYS INTEGER"
,
/* 74 */
"rows ::= ROWS INTEGER"
,
/* 75 */
"ablocks ::= ABLOCKS ID"
,
/* 76 */
"tblocks ::= TBLOCKS INTEGER"
,
/* 77 */
"ctime ::= CTIME INTEGER"
,
/* 78 */
"clog ::= CLOG INTEGER"
,
/* 79 */
"comp ::= COMP INTEGER"
,
/* 80 */
"prec ::= PRECISION STRING"
,
/* 81 */
"db_optr ::="
,
/* 82 */
"db_optr ::= db_optr tables"
,
/* 83 */
"db_optr ::= db_optr cache"
,
/* 84 */
"db_optr ::= db_optr replica"
,
/* 85 */
"db_optr ::= db_optr days"
,
/* 86 */
"db_optr ::= db_optr rows"
,
/* 87 */
"db_optr ::= db_optr ablocks"
,
/* 88 */
"db_optr ::= db_optr tblocks"
,
/* 89 */
"db_optr ::= db_optr ctime"
,
/* 90 */
"db_optr ::= db_optr clog"
,
/* 91 */
"db_optr ::= db_optr comp"
,
/* 92 */
"db_optr ::= db_optr prec"
,
/* 93 */
"db_optr ::= db_optr keep"
,
/* 94 */
"alter_db_optr ::="
,
/* 95 */
"alter_db_optr ::= alter_db_optr replica"
,
/* 96 */
"alter_db_optr ::= alter_db_optr tables"
,
/* 97 */
"typename ::= ids"
,
/* 98 */
"typename ::= ids LP signed RP"
,
/* 99 */
"signed ::= INTEGER"
,
/* 100 */
"signed ::= PLUS INTEGER"
,
/* 101 */
"signed ::= MINUS INTEGER"
,
/* 102 */
"cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args"
,
/* 103 */
"create_table_args ::= LP columnlist RP"
,
/* 104 */
"create_table_args ::= LP columnlist RP TAGS LP columnlist RP"
,
/* 105 */
"create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP"
,
/* 106 */
"create_table_args ::= AS select"
,
/* 107 */
"columnlist ::= columnlist COMMA column"
,
/* 108 */
"columnlist ::= column"
,
/* 109 */
"column ::= ids typename"
,
/* 110 */
"tagitemlist ::= tagitemlist COMMA tagitem"
,
/* 111 */
"tagitemlist ::= tagitem"
,
/* 112 */
"tagitem ::= INTEGER"
,
/* 113 */
"tagitem ::= FLOAT"
,
/* 114 */
"tagitem ::= STRING"
,
/* 115 */
"tagitem ::= BOOL"
,
/* 116 */
"tagitem ::= NULL"
,
/* 117 */
"tagitem ::= MINUS INTEGER"
,
/* 118 */
"tagitem ::= MINUS FLOAT"
,
/* 119 */
"tagitem ::= PLUS INTEGER"
,
/* 120 */
"tagitem ::= PLUS FLOAT"
,
/* 121 */
"cmd ::= select"
,
/* 122 */
"select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt"
,
/* 123 */
"select ::= SELECT selcollist"
,
/* 124 */
"sclp ::= selcollist COMMA"
,
/* 125 */
"sclp ::="
,
/* 126 */
"selcollist ::= sclp expr as"
,
/* 127 */
"selcollist ::= sclp STAR"
,
/* 128 */
"as ::= AS ids"
,
/* 129 */
"as ::= ids"
,
/* 130 */
"as ::="
,
/* 131 */
"from ::= FROM tablelist"
,
/* 132 */
"tablelist ::= ids cpxName"
,
/* 133 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 134 */
"tmvar ::= VARIABLE"
,
/* 135 */
"interval_opt ::= INTERVAL LP tmvar RP"
,
/* 136 */
"interval_opt ::="
,
/* 137 */
"fill_opt ::="
,
/* 138 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 139 */
"fill_opt ::= FILL LP ID RP"
,
/* 140 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 141 */
"sliding_opt ::="
,
/* 142 */
"orderby_opt ::="
,
/* 143 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 144 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 145 */
"sortlist ::= item sortorder"
,
/* 146 */
"item ::= ids cpxName"
,
/* 147 */
"sortorder ::= ASC"
,
/* 148 */
"sortorder ::= DESC"
,
/* 149 */
"sortorder ::="
,
/* 150 */
"groupby_opt ::="
,
/* 151 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 152 */
"grouplist ::= grouplist COMMA item"
,
/* 153 */
"grouplist ::= item"
,
/* 154 */
"having_opt ::="
,
/* 155 */
"having_opt ::= HAVING expr"
,
/* 156 */
"limit_opt ::="
,
/* 157 */
"limit_opt ::= LIMIT signed"
,
/* 158 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 159 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 160 */
"slimit_opt ::="
,
/* 161 */
"slimit_opt ::= SLIMIT signed"
,
/* 162 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 163 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 164 */
"where_opt ::="
,
/* 165 */
"where_opt ::= WHERE expr"
,
/* 166 */
"expr ::= LP expr RP"
,
/* 167 */
"expr ::= ID"
,
/* 168 */
"expr ::= ID DOT ID"
,
/* 169 */
"expr ::= ID DOT STAR"
,
/* 170 */
"expr ::= INTEGER"
,
/* 171 */
"expr ::= MINUS INTEGER"
,
/* 172 */
"expr ::= PLUS INTEGER"
,
/* 173 */
"expr ::= FLOAT"
,
/* 174 */
"expr ::= MINUS FLOAT"
,
/* 175 */
"expr ::= PLUS FLOAT"
,
/* 176 */
"expr ::= STRING"
,
/* 177 */
"expr ::= NOW"
,
/* 178 */
"expr ::= VARIABLE"
,
/* 179 */
"expr ::= BOOL"
,
/* 180 */
"expr ::= ID LP exprlist RP"
,
/* 181 */
"expr ::= ID LP STAR RP"
,
/* 182 */
"expr ::= expr AND expr"
,
/* 183 */
"expr ::= expr OR expr"
,
/* 184 */
"expr ::= expr LT expr"
,
/* 185 */
"expr ::= expr GT expr"
,
/* 186 */
"expr ::= expr LE expr"
,
/* 187 */
"expr ::= expr GE expr"
,
/* 188 */
"expr ::= expr NE expr"
,
/* 189 */
"expr ::= expr EQ expr"
,
/* 190 */
"expr ::= expr PLUS expr"
,
/* 191 */
"expr ::= expr MINUS expr"
,
/* 192 */
"expr ::= expr STAR expr"
,
/* 193 */
"expr ::= expr SLASH expr"
,
/* 194 */
"expr ::= expr REM expr"
,
/* 195 */
"expr ::= expr LIKE expr"
,
/* 196 */
"expr ::= expr IN LP exprlist RP"
,
/* 197 */
"exprlist ::= exprlist COMMA expritem"
,
/* 198 */
"exprlist ::= expritem"
,
/* 199 */
"expritem ::= expr"
,
/* 200 */
"expritem ::="
,
/* 201 */
"cmd ::= INSERT INTO cpxName insert_value_list"
,
/* 202 */
"insert_value_list ::= VALUES LP itemlist RP"
,
/* 203 */
"insert_value_list ::= insert_value_list VALUES LP itemlist RP"
,
/* 204 */
"itemlist ::= itemlist COMMA expr"
,
/* 205 */
"itemlist ::= expr"
,
/* 206 */
"cmd ::= RESET QUERY CACHE"
,
/* 207 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 208 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 209 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 210 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 211 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 212 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 213 */
"cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER"
,
/* 214 */
"cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER"
,
/* 215 */
"cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER"
,
};
#endif
/* NDEBUG */
#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack. Return the number
** of errors. Return 0 on success.
** Try to increase the size of the parser stack.
*/
static
int
yyGrowStack
(
yyParser
*
p
){
static
void
yyGrowStack
(
yyParser
*
p
){
int
newSize
;
int
idx
;
yyStackEntry
*
pNew
;
newSize
=
p
->
yystksz
*
2
+
100
;
idx
=
p
->
yytos
?
(
int
)(
p
->
yytos
-
p
->
yystack
)
:
0
;
if
(
p
->
yystack
==&
p
->
yystk0
){
pNew
=
malloc
(
newSize
*
sizeof
(
pNew
[
0
]));
if
(
pNew
)
pNew
[
0
]
=
p
->
yystk0
;
}
else
{
pNew
=
realloc
(
p
->
yystack
,
newSize
*
sizeof
(
pNew
[
0
]));
}
pNew
=
realloc
(
p
->
yystack
,
newSize
*
sizeof
(
pNew
[
0
]));
if
(
pNew
){
p
->
yystack
=
pNew
;
p
->
yy
tos
=
&
p
->
yystack
[
idx
]
;
p
->
yy
stksz
=
newSize
;
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sStack grows
from %d to %d entries.
\n
"
,
yyTracePrompt
,
p
->
yystksz
,
newSize
);
fprintf
(
yyTraceFILE
,
"%sStack grows
to %d entries!
\n
"
,
yyTracePrompt
,
p
->
yystksz
);
}
#endif
p
->
yystksz
=
newSize
;
}
return
pNew
==
0
;
}
#endif
...
...
@@ -1233,34 +1015,6 @@ static int yyGrowStack(yyParser *p){
# define YYMALLOCARGTYPE size_t
#endif
/* Initialize a new parser that has already been allocated.
*/
void
ParseInit
(
void
*
yypParser
){
yyParser
*
pParser
=
(
yyParser
*
)
yypParser
;
#ifdef YYTRACKMAXSTACKDEPTH
pParser
->
yyhwm
=
0
;
#endif
#if YYSTACKDEPTH<=0
pParser
->
yytos
=
NULL
;
pParser
->
yystack
=
NULL
;
pParser
->
yystksz
=
0
;
if
(
yyGrowStack
(
pParser
)
){
pParser
->
yystack
=
&
pParser
->
yystk0
;
pParser
->
yystksz
=
1
;
}
#endif
#ifndef YYNOERRORRECOVERY
pParser
->
yyerrcnt
=
-
1
;
#endif
pParser
->
yytos
=
pParser
->
yystack
;
pParser
->
yystack
[
0
].
stateno
=
0
;
pParser
->
yystack
[
0
].
major
=
0
;
#if YYSTACKDEPTH>0
pParser
->
yystackEnd
=
&
pParser
->
yystack
[
YYSTACKDEPTH
-
1
];
#endif
}
#ifndef Parse_ENGINEALWAYSONSTACK
/*
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
...
...
@@ -1276,11 +1030,19 @@ void ParseInit(void *yypParser){
void
*
ParseAlloc
(
void
*
(
*
mallocProc
)(
YYMALLOCARGTYPE
)){
yyParser
*
pParser
;
pParser
=
(
yyParser
*
)(
*
mallocProc
)(
(
YYMALLOCARGTYPE
)
sizeof
(
yyParser
)
);
if
(
pParser
)
ParseInit
(
pParser
);
if
(
pParser
){
pParser
->
yyidx
=
-
1
;
#ifdef YYTRACKMAXSTACKDEPTH
pParser
->
yyidxMax
=
0
;
#endif
#if YYSTACKDEPTH<=0
pParser
->
yystack
=
NULL
;
pParser
->
yystksz
=
0
;
yyGrowStack
(
pParser
);
#endif
}
return
pParser
;
}
#endif
/* Parse_ENGINEALWAYSONSTACK */
/* The following function deletes the "minor type" or semantic value
** associated with a symbol. The symbol can be either a terminal
...
...
@@ -1307,46 +1069,46 @@ static void yy_destructor(
** inside the C code.
*/
/********* Begin destructor definitions ***************************************/
case
21
5
:
/* keep */
case
21
6
:
/* tagitemlist */
case
2
39
:
/* fill_opt */
case
24
1
:
/* groupby_opt */
case
24
2
:
/* orderby_opt */
case
25
1
:
/* sortlist */
case
25
5
:
/* grouplist */
case
21
6
:
/* keep */
case
21
7
:
/* tagitemlist */
case
2
40
:
/* fill_opt */
case
24
2
:
/* groupby_opt */
case
24
3
:
/* orderby_opt */
case
25
2
:
/* sortlist */
case
25
6
:
/* grouplist */
{
tVariantListDestroy
((
yypminor
->
yy
56
));
tVariantListDestroy
((
yypminor
->
yy
480
));
}
break
;
case
23
1
:
/* columnlist */
case
23
2
:
/* columnlist */
{
tFieldListDestroy
((
yypminor
->
yy4
7
1
));
tFieldListDestroy
((
yypminor
->
yy4
2
1
));
}
break
;
case
23
2
:
/* select */
case
23
3
:
/* select */
{
destroyQuerySql
((
yypminor
->
yy
24
));
destroyQuerySql
((
yypminor
->
yy
138
));
}
break
;
case
23
5
:
/* selcollist */
case
24
6
:
/* sclp */
case
25
6
:
/* exprlist */
case
2
59
:
/* itemlist */
case
23
6
:
/* selcollist */
case
24
7
:
/* sclp */
case
25
7
:
/* exprlist */
case
2
60
:
/* itemlist */
{
tSQLExprListDestroy
((
yypminor
->
yy
498
));
tSQLExprListDestroy
((
yypminor
->
yy
284
));
}
break
;
case
23
7
:
/* where_opt */
case
24
3
:
/* having_opt */
case
24
7
:
/* expr */
case
25
7
:
/* expritem */
case
23
8
:
/* where_opt */
case
24
4
:
/* having_opt */
case
24
8
:
/* expr */
case
25
8
:
/* expritem */
{
tSQLExprDestroy
((
yypminor
->
yy
90
));
tSQLExprDestroy
((
yypminor
->
yy
244
));
}
break
;
case
25
2
:
/* sortitem */
case
25
3
:
/* sortitem */
{
tVariantDestroy
(
&
(
yypminor
->
yy
18
6
));
tVariantDestroy
(
&
(
yypminor
->
yy
23
6
));
}
break
;
/********* End destructor definitions *****************************************/
...
...
@@ -1362,9 +1124,8 @@ tVariantDestroy(&(yypminor->yy186));
*/
static
void
yy_pop_parser_stack
(
yyParser
*
pParser
){
yyStackEntry
*
yytos
;
assert
(
pParser
->
yytos
!=
0
);
assert
(
pParser
->
yytos
>
pParser
->
yystack
);
yytos
=
pParser
->
yytos
--
;
assert
(
pParser
->
yyidx
>=
0
);
yytos
=
&
pParser
->
yystack
[
pParser
->
yyidx
--
];
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sPopping %s
\n
"
,
...
...
@@ -1375,18 +1136,6 @@ static void yy_pop_parser_stack(yyParser *pParser){
yy_destructor
(
pParser
,
yytos
->
major
,
&
yytos
->
minor
);
}
/*
** Clear all secondary memory allocations from the parser
*/
void
ParseFinalize
(
void
*
p
){
yyParser
*
pParser
=
(
yyParser
*
)
p
;
while
(
pParser
->
yytos
>
pParser
->
yystack
)
yy_pop_parser_stack
(
pParser
);
#if YYSTACKDEPTH<=0
if
(
pParser
->
yystack
!=&
pParser
->
yystk0
)
free
(
pParser
->
yystack
);
#endif
}
#ifndef Parse_ENGINEALWAYSONSTACK
/*
** Deallocate and destroy a parser. Destructors are called for
** all stack elements before shutting the parser down.
...
...
@@ -1399,13 +1148,16 @@ void ParseFree(
void
*
p
,
/* The parser to be deleted */
void
(
*
freeProc
)(
void
*
)
/* Function used to reclaim memory */
){
yyParser
*
pParser
=
(
yyParser
*
)
p
;
#ifndef YYPARSEFREENEVERNULL
if
(
p
==
0
)
return
;
if
(
p
Parser
==
0
)
return
;
#endif
ParseFinalize
(
p
);
(
*
freeProc
)(
p
);
while
(
pParser
->
yyidx
>=
0
)
yy_pop_parser_stack
(
pParser
);
#if YYSTACKDEPTH<=0
free
(
pParser
->
yystack
);
#endif
(
*
freeProc
)((
void
*
)
pParser
);
}
#endif
/* Parse_ENGINEALWAYSONSTACK */
/*
** Return the peak depth of the stack for a parser.
...
...
@@ -1413,44 +1165,7 @@ void ParseFree(
#ifdef YYTRACKMAXSTACKDEPTH
int
ParseStackPeak
(
void
*
p
){
yyParser
*
pParser
=
(
yyParser
*
)
p
;
return
pParser
->
yyhwm
;
}
#endif
/* This array of booleans keeps track of the parser statement
** coverage. The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y. In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static
unsigned
char
yycoverage
[
YYNSTATE
][
YYNTOKEN
];
#endif
/*
** Write into out a description of every state/lookahead combination that
**
** (1) has not been used by the parser, and
** (2) is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int
ParseCoverage
(
FILE
*
out
){
int
stateno
,
iLookAhead
,
i
;
int
nMissed
=
0
;
for
(
stateno
=
0
;
stateno
<
YYNSTATE
;
stateno
++
){
i
=
yy_shift_ofst
[
stateno
];
for
(
iLookAhead
=
0
;
iLookAhead
<
YYNTOKEN
;
iLookAhead
++
){
if
(
yy_lookahead
[
i
+
iLookAhead
]
!=
iLookAhead
)
continue
;
if
(
yycoverage
[
stateno
][
iLookAhead
]
==
0
)
nMissed
++
;
if
(
out
){
fprintf
(
out
,
"State %d lookahead %s %s
\n
"
,
stateno
,
yyTokenName
[
iLookAhead
],
yycoverage
[
stateno
][
iLookAhead
]
?
"ok"
:
"missed"
);
}
}
}
return
nMissed
;
return
pParser
->
yyidxMax
;
}
#endif
...
...
@@ -1458,63 +1173,61 @@ int ParseCoverage(FILE *out){
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static
unsigned
int
yy_find_shift_action
(
static
int
yy_find_shift_action
(
yyParser
*
pParser
,
/* The parser */
YYCODETYPE
iLookAhead
/* The look-ahead token */
){
int
i
;
int
stateno
=
pParser
->
yy
tos
->
stateno
;
int
stateno
=
pParser
->
yy
stack
[
pParser
->
yyidx
].
stateno
;
if
(
stateno
>
YY_MAX_SHIFT
)
return
stateno
;
if
(
stateno
>
=
YY_MIN_REDUCE
)
return
stateno
;
assert
(
stateno
<=
YY_SHIFT_COUNT
);
#if defined(YYCOVERAGE)
yycoverage
[
stateno
][
iLookAhead
]
=
1
;
#endif
do
{
i
=
yy_shift_ofst
[
stateno
];
assert
(
i
>=
0
&&
i
+
YYNTOKEN
<=
sizeof
(
yy_lookahead
)
/
sizeof
(
yy_lookahead
[
0
])
)
;
if
(
i
==
YY_SHIFT_USE_DFLT
)
return
yy_default
[
stateno
]
;
assert
(
iLookAhead
!=
YYNOCODE
);
assert
(
iLookAhead
<
YYNTOKEN
);
i
+=
iLookAhead
;
if
(
yy_lookahead
[
i
]
!=
iLookAhead
){
if
(
i
<
0
||
i
>=
YY_ACTTAB_COUNT
||
yy_lookahead
[
i
]
!=
iLookAhead
){
if
(
iLookAhead
>
0
){
#ifdef YYFALLBACK
YYCODETYPE
iFallback
;
/* Fallback token */
if
(
iLookAhead
<
sizeof
(
yyFallback
)
/
sizeof
(
yyFallback
[
0
])
&&
(
iFallback
=
yyFallback
[
iLookAhead
])
!=
0
){
YYCODETYPE
iFallback
;
/* Fallback token */
if
(
iLookAhead
<
sizeof
(
yyFallback
)
/
sizeof
(
yyFallback
[
0
])
&&
(
iFallback
=
yyFallback
[
iLookAhead
])
!=
0
){
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sFALLBACK %s => %s
\n
"
,
yyTracePrompt
,
yyTokenName
[
iLookAhead
],
yyTokenName
[
iFallback
]);
}
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sFALLBACK %s => %s
\n
"
,
yyTracePrompt
,
yyTokenName
[
iLookAhead
],
yyTokenName
[
iFallback
]);
}
#endif
assert
(
yyFallback
[
iFallback
]
==
0
);
/* Fallback loop must terminate */
iLookAhead
=
iFallback
;
continue
;
}
assert
(
yyFallback
[
iFallback
]
==
0
);
/* Fallback loop must terminate */
iLookAhead
=
iFallback
;
continue
;
}
#endif
#ifdef YYWILDCARD
{
int
j
=
i
-
iLookAhead
+
YYWILDCARD
;
if
(
{
int
j
=
i
-
iLookAhead
+
YYWILDCARD
;
if
(
#if YY_SHIFT_MIN+YYWILDCARD<0
j
>=
0
&&
j
>=
0
&&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
j
<
YY_ACTTAB_COUNT
&&
j
<
YY_ACTTAB_COUNT
&&
#endif
yy_lookahead
[
j
]
==
YYWILDCARD
&&
iLookAhead
>
0
){
yy_lookahead
[
j
]
==
YYWILDCARD
){
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sWILDCARD %s => %s
\n
"
,
yyTracePrompt
,
yyTokenName
[
iLookAhead
],
yyTokenName
[
YYWILDCARD
]);
}
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sWILDCARD %s => %s
\n
"
,
yyTracePrompt
,
yyTokenName
[
iLookAhead
],
yyTokenName
[
YYWILDCARD
]);
}
#endif
/* NDEBUG */
return
yy_action
[
j
];
return
yy_action
[
j
];
}
}
}
#endif
/* YYWILDCARD */
}
return
yy_default
[
stateno
];
}
else
{
return
yy_action
[
i
];
...
...
@@ -1539,6 +1252,7 @@ static int yy_find_reduce_action(
assert
(
stateno
<=
YY_REDUCE_COUNT
);
#endif
i
=
yy_reduce_ofst
[
stateno
];
assert
(
i
!=
YY_REDUCE_USE_DFLT
);
assert
(
iLookAhead
!=
YYNOCODE
);
i
+=
iLookAhead
;
#ifdef YYERRORSYMBOL
...
...
@@ -1555,14 +1269,15 @@ static int yy_find_reduce_action(
/*
** The following routine is called if the stack overflows.
*/
static
void
yyStackOverflow
(
yyParser
*
yypParser
){
static
void
yyStackOverflow
(
yyParser
*
yypParser
,
YYMINORTYPE
*
yypMinor
){
ParseARG_FETCH
;
yypParser
->
yyidx
--
;
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sStack Overflow!
\n
"
,
yyTracePrompt
);
}
#endif
while
(
yypParser
->
yy
tos
>
yypParser
->
yystack
)
yy_pop_parser_stack
(
yypParser
);
while
(
yypParser
->
yy
idx
>=
0
)
yy_pop_parser_stack
(
yypParser
);
/* Here code is inserted which will execute if the parser
** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
...
...
@@ -1574,21 +1289,20 @@ static void yyStackOverflow(yyParser *yypParser){
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static
void
yyTraceShift
(
yyParser
*
yypParser
,
int
yyNewState
,
const
char
*
zTag
){
static
void
yyTraceShift
(
yyParser
*
yypParser
,
int
yyNewState
){
if
(
yyTraceFILE
){
if
(
yyNewState
<
YYNSTATE
){
fprintf
(
yyTraceFILE
,
"%s
%s
'%s', go to state %d
\n
"
,
yyTracePrompt
,
zTag
,
yyTokenName
[
yypParser
->
yytos
->
major
],
fprintf
(
yyTraceFILE
,
"%s
Shift
'%s', go to state %d
\n
"
,
yyTracePrompt
,
yyTokenName
[
yypParser
->
yystack
[
yypParser
->
yyidx
].
major
],
yyNewState
);
}
else
{
fprintf
(
yyTraceFILE
,
"%s%s '%s', pending reduce %d
\n
"
,
yyTracePrompt
,
zTag
,
yyTokenName
[
yypParser
->
yytos
->
major
],
yyNewState
-
YY_MIN_REDUCE
);
fprintf
(
yyTraceFILE
,
"%sShift '%s'
\n
"
,
yyTracePrompt
,
yyTokenName
[
yypParser
->
yystack
[
yypParser
->
yyidx
].
major
]);
}
}
}
#else
# define yyTraceShift(X,Y
,Z
)
# define yyTraceShift(X,Y)
#endif
/*
...
...
@@ -1598,262 +1312,259 @@ static void yy_shift(
yyParser
*
yypParser
,
/* The parser to be shifted */
int
yyNewState
,
/* The new state to shift in */
int
yyMajor
,
/* The major token to shift in */
ParseTOKENTYPE
yyMinor
/* T
he minor token to shift in */
YYMINORTYPE
*
yypMinor
/* Pointer to t
he minor token to shift in */
){
yyStackEntry
*
yytos
;
yypParser
->
yy
tos
++
;
yypParser
->
yy
idx
++
;
#ifdef YYTRACKMAXSTACKDEPTH
if
(
(
int
)(
yypParser
->
yytos
-
yypParser
->
yystack
)
>
yypParser
->
yyhwm
){
yypParser
->
yyhwm
++
;
assert
(
yypParser
->
yyhwm
==
(
int
)(
yypParser
->
yytos
-
yypParser
->
yystack
)
);
if
(
yypParser
->
yyidx
>
yypParser
->
yyidxMax
){
yypParser
->
yyidxMax
=
yypParser
->
yyidx
;
}
#endif
#if YYSTACKDEPTH>0
if
(
yypParser
->
yytos
>
yypParser
->
yystackEnd
){
yypParser
->
yytos
--
;
yyStackOverflow
(
yypParser
);
if
(
yypParser
->
yyidx
>=
YYSTACKDEPTH
){
yyStackOverflow
(
yypParser
,
yypMinor
);
return
;
}
#else
if
(
yypParser
->
yy
tos
>=&
yypParser
->
yystack
[
yypParser
->
yystksz
]
){
if
(
yyGrowStack
(
yypParser
)
){
yypParser
->
yytos
--
;
yyStackOverflow
(
yypParser
);
if
(
yypParser
->
yy
idx
>=
yypParser
->
yystksz
){
yyGrowStack
(
yypParser
);
if
(
yypParser
->
yyidx
>=
yypParser
->
yystksz
){
yyStackOverflow
(
yypParser
,
yypMinor
);
return
;
}
}
#endif
if
(
yyNewState
>
YY_MAX_SHIFT
){
yyNewState
+=
YY_MIN_REDUCE
-
YY_MIN_SHIFTREDUCE
;
}
yytos
=
yypParser
->
yytos
;
yytos
=
&
yypParser
->
yystack
[
yypParser
->
yyidx
];
yytos
->
stateno
=
(
YYACTIONTYPE
)
yyNewState
;
yytos
->
major
=
(
YYCODETYPE
)
yyMajor
;
yytos
->
minor
.
yy0
=
yy
Minor
;
yyTraceShift
(
yypParser
,
yyNewState
,
"Shift"
);
yytos
->
minor
=
*
yyp
Minor
;
yyTraceShift
(
yypParser
,
yyNewState
);
}
/* The following table contains information about every rule that
** is used during the reduce.
*/
static
const
struct
{
YYCODETYPE
lhs
;
/* Symbol on the left-hand side of the rule */
signed
char
nrhs
;
/* Negative of the number of RHS
symbols in the rule */
YYCODETYPE
lhs
;
/* Symbol on the left-hand side of the rule */
unsigned
char
nrhs
;
/* Number of right-hand side
symbols in the rule */
}
yyRuleInfo
[]
=
{
{
196
,
-
1
},
/* (0) program ::= cmd */
{
197
,
-
2
},
/* (1) cmd ::= SHOW DATABASES */
{
197
,
-
2
},
/* (2) cmd ::= SHOW MNODES */
{
197
,
-
2
},
/* (3) cmd ::= SHOW DNODES */
{
197
,
-
2
},
/* (4) cmd ::= SHOW ACCOUNTS */
{
197
,
-
2
},
/* (5) cmd ::= SHOW USERS */
{
197
,
-
2
},
/* (6) cmd ::= SHOW MODULES */
{
197
,
-
2
},
/* (7) cmd ::= SHOW QUERIES */
{
197
,
-
2
},
/* (8) cmd ::= SHOW CONNECTIONS */
{
197
,
-
2
},
/* (9) cmd ::= SHOW STREAMS */
{
197
,
-
2
},
/* (10) cmd ::= SHOW CONFIGS */
{
197
,
-
2
},
/* (11) cmd ::= SHOW SCORES */
{
197
,
-
2
},
/* (12) cmd ::= SHOW GRANTS */
{
198
,
0
},
/* (13) dbPrefix ::= */
{
198
,
-
2
},
/* (14) dbPrefix ::= ids DOT */
{
200
,
0
},
/* (15) cpxName ::= */
{
200
,
-
2
},
/* (16) cpxName ::= DOT ids */
{
197
,
-
3
},
/* (17) cmd ::= SHOW dbPrefix TABLES */
{
197
,
-
5
},
/* (18) cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
197
,
-
3
},
/* (19) cmd ::= SHOW dbPrefix STABLES */
{
197
,
-
5
},
/* (20) cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
197
,
-
3
},
/* (21) cmd ::= SHOW dbPrefix VGROUPS */
{
197
,
-
5
},
/* (22) cmd ::= DROP TABLE ifexists ids cpxName */
{
197
,
-
4
},
/* (23) cmd ::= DROP DATABASE ifexists ids */
{
197
,
-
3
},
/* (24) cmd ::= DROP DNODE IPTOKEN */
{
197
,
-
3
},
/* (25) cmd ::= DROP USER ids */
{
197
,
-
3
},
/* (26) cmd ::= DROP ACCOUNT ids */
{
197
,
-
2
},
/* (27) cmd ::= USE ids */
{
197
,
-
3
},
/* (28) cmd ::= DESCRIBE ids cpxName */
{
197
,
-
5
},
/* (29) cmd ::= ALTER USER ids PASS ids */
{
197
,
-
5
},
/* (30) cmd ::= ALTER USER ids PRIVILEGE ids */
{
197
,
-
4
},
/* (31) cmd ::= ALTER DNODE IPTOKEN ids */
{
197
,
-
5
},
/* (32) cmd ::= ALTER DNODE IPTOKEN ids ids */
{
197
,
-
3
},
/* (33) cmd ::= ALTER LOCAL ids */
{
197
,
-
4
},
/* (34) cmd ::= ALTER LOCAL ids ids */
{
197
,
-
4
},
/* (35) cmd ::= ALTER DATABASE ids alter_db_optr */
{
197
,
-
4
},
/* (36) cmd ::= ALTER ACCOUNT ids acct_optr */
{
197
,
-
6
},
/* (37) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
199
,
-
1
},
/* (38) ids ::= ID */
{
199
,
-
1
},
/* (39) ids ::= STRING */
{
201
,
-
2
},
/* (40) ifexists ::= IF EXISTS */
{
201
,
0
},
/* (41) ifexists ::= */
{
204
,
-
3
},
/* (42) ifnotexists ::= IF NOT EXISTS */
{
204
,
0
},
/* (43) ifnotexists ::= */
{
197
,
-
3
},
/* (44) cmd ::= CREATE DNODE IPTOKEN */
{
197
,
-
6
},
/* (45) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
197
,
-
5
},
/* (46) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
197
,
-
5
},
/* (47) cmd ::= CREATE USER ids PASS ids */
{
206
,
0
},
/* (48) pps ::= */
{
206
,
-
2
},
/* (49) pps ::= PPS INTEGER */
{
207
,
0
},
/* (50) tseries ::= */
{
207
,
-
2
},
/* (51) tseries ::= TSERIES INTEGER */
{
208
,
0
},
/* (52) dbs ::= */
{
208
,
-
2
},
/* (53) dbs ::= DBS INTEGER */
{
209
,
0
},
/* (54) streams ::= */
{
209
,
-
2
},
/* (55) streams ::= STREAMS INTEGER */
{
210
,
0
},
/* (56) storage ::= */
{
210
,
-
2
},
/* (57) storage ::= STORAGE INTEGER */
{
211
,
0
},
/* (58) qtime ::= */
{
211
,
-
2
},
/* (59) qtime ::= QTIME INTEGER */
{
212
,
0
},
/* (60) users ::= */
{
212
,
-
2
},
/* (61) users ::= USERS INTEGER */
{
213
,
0
},
/* (62) conns ::= */
{
213
,
-
2
},
/* (63) conns ::= CONNS INTEGER */
{
214
,
0
},
/* (64) state ::= */
{
214
,
-
2
},
/* (65) state ::= STATE ids */
{
203
,
-
9
},
/* (66) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
215
,
-
2
},
/* (67) keep ::= KEEP tagitemlist */
{
217
,
-
2
},
/* (68) tables ::= TABLES INTEGER */
{
218
,
-
2
},
/* (69) cache ::= CACHE INTEGER */
{
219
,
-
2
},
/* (70) replica ::= REPLICA INTEGER */
{
220
,
-
2
},
/* (71) days ::= DAYS INTEGER */
{
221
,
-
2
},
/* (72) rows ::= ROWS INTEGER */
{
222
,
-
2
},
/* (73) ablocks ::= ABLOCKS ID */
{
223
,
-
2
},
/* (74) tblocks ::= TBLOCKS INTEGER */
{
224
,
-
2
},
/* (75) ctime ::= CTIME INTEGER */
{
225
,
-
2
},
/* (76) clog ::= CLOG INTEGER */
{
226
,
-
2
},
/* (77) comp ::= COMP INTEGER */
{
227
,
-
2
},
/* (78) prec ::= PRECISION STRING */
{
205
,
0
},
/* (79) db_optr ::= */
{
205
,
-
2
},
/* (80) db_optr ::= db_optr tables */
{
205
,
-
2
},
/* (81) db_optr ::= db_optr cache */
{
205
,
-
2
},
/* (82) db_optr ::= db_optr replica */
{
205
,
-
2
},
/* (83) db_optr ::= db_optr days */
{
205
,
-
2
},
/* (84) db_optr ::= db_optr rows */
{
205
,
-
2
},
/* (85) db_optr ::= db_optr ablocks */
{
205
,
-
2
},
/* (86) db_optr ::= db_optr tblocks */
{
205
,
-
2
},
/* (87) db_optr ::= db_optr ctime */
{
205
,
-
2
},
/* (88) db_optr ::= db_optr clog */
{
205
,
-
2
},
/* (89) db_optr ::= db_optr comp */
{
205
,
-
2
},
/* (90) db_optr ::= db_optr prec */
{
205
,
-
2
},
/* (91) db_optr ::= db_optr keep */
{
202
,
0
},
/* (92) alter_db_optr ::= */
{
202
,
-
2
},
/* (93) alter_db_optr ::= alter_db_optr replica */
{
202
,
-
2
},
/* (94) alter_db_optr ::= alter_db_optr tables */
{
228
,
-
1
},
/* (95) typename ::= ids */
{
228
,
-
4
},
/* (96) typename ::= ids LP signed RP */
{
229
,
-
1
},
/* (97) signed ::= INTEGER */
{
229
,
-
2
},
/* (98) signed ::= PLUS INTEGER */
{
229
,
-
2
},
/* (99) signed ::= MINUS INTEGER */
{
197
,
-
6
},
/* (100) cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
{
230
,
-
3
},
/* (101) create_table_args ::= LP columnlist RP */
{
230
,
-
7
},
/* (102) create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
{
230
,
-
7
},
/* (103) create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
{
230
,
-
2
},
/* (104) create_table_args ::= AS select */
{
231
,
-
3
},
/* (105) columnlist ::= columnlist COMMA column */
{
231
,
-
1
},
/* (106) columnlist ::= column */
{
233
,
-
2
},
/* (107) column ::= ids typename */
{
216
,
-
3
},
/* (108) tagitemlist ::= tagitemlist COMMA tagitem */
{
216
,
-
1
},
/* (109) tagitemlist ::= tagitem */
{
234
,
-
1
},
/* (110) tagitem ::= INTEGER */
{
234
,
-
1
},
/* (111) tagitem ::= FLOAT */
{
234
,
-
1
},
/* (112) tagitem ::= STRING */
{
234
,
-
1
},
/* (113) tagitem ::= BOOL */
{
234
,
-
1
},
/* (114) tagitem ::= NULL */
{
234
,
-
2
},
/* (115) tagitem ::= MINUS INTEGER */
{
234
,
-
2
},
/* (116) tagitem ::= MINUS FLOAT */
{
234
,
-
2
},
/* (117) tagitem ::= PLUS INTEGER */
{
234
,
-
2
},
/* (118) tagitem ::= PLUS FLOAT */
{
197
,
-
1
},
/* (119) cmd ::= select */
{
232
,
-
12
},
/* (120) select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
232
,
-
2
},
/* (121) select ::= SELECT selcollist */
{
246
,
-
2
},
/* (122) sclp ::= selcollist COMMA */
{
246
,
0
},
/* (123) sclp ::= */
{
235
,
-
3
},
/* (124) selcollist ::= sclp expr as */
{
235
,
-
2
},
/* (125) selcollist ::= sclp STAR */
{
248
,
-
2
},
/* (126) as ::= AS ids */
{
248
,
-
1
},
/* (127) as ::= ids */
{
248
,
0
},
/* (128) as ::= */
{
236
,
-
2
},
/* (129) from ::= FROM tablelist */
{
249
,
-
2
},
/* (130) tablelist ::= ids cpxName */
{
249
,
-
4
},
/* (131) tablelist ::= tablelist COMMA ids cpxName */
{
250
,
-
1
},
/* (132) tmvar ::= VARIABLE */
{
238
,
-
4
},
/* (133) interval_opt ::= INTERVAL LP tmvar RP */
{
238
,
0
},
/* (134) interval_opt ::= */
{
239
,
0
},
/* (135) fill_opt ::= */
{
239
,
-
6
},
/* (136) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
239
,
-
4
},
/* (137) fill_opt ::= FILL LP ID RP */
{
240
,
-
4
},
/* (138) sliding_opt ::= SLIDING LP tmvar RP */
{
240
,
0
},
/* (139) sliding_opt ::= */
{
242
,
0
},
/* (140) orderby_opt ::= */
{
242
,
-
3
},
/* (141) orderby_opt ::= ORDER BY sortlist */
{
251
,
-
4
},
/* (142) sortlist ::= sortlist COMMA item sortorder */
{
251
,
-
2
},
/* (143) sortlist ::= item sortorder */
{
253
,
-
2
},
/* (144) item ::= ids cpxName */
{
254
,
-
1
},
/* (145) sortorder ::= ASC */
{
254
,
-
1
},
/* (146) sortorder ::= DESC */
{
254
,
0
},
/* (147) sortorder ::= */
{
241
,
0
},
/* (148) groupby_opt ::= */
{
241
,
-
3
},
/* (149) groupby_opt ::= GROUP BY grouplist */
{
255
,
-
3
},
/* (150) grouplist ::= grouplist COMMA item */
{
255
,
-
1
},
/* (151) grouplist ::= item */
{
243
,
0
},
/* (152) having_opt ::= */
{
243
,
-
2
},
/* (153) having_opt ::= HAVING expr */
{
245
,
0
},
/* (154) limit_opt ::= */
{
245
,
-
2
},
/* (155) limit_opt ::= LIMIT signed */
{
245
,
-
4
},
/* (156) limit_opt ::= LIMIT signed OFFSET signed */
{
245
,
-
4
},
/* (157) limit_opt ::= LIMIT signed COMMA signed */
{
244
,
0
},
/* (158) slimit_opt ::= */
{
244
,
-
2
},
/* (159) slimit_opt ::= SLIMIT signed */
{
244
,
-
4
},
/* (160) slimit_opt ::= SLIMIT signed SOFFSET signed */
{
244
,
-
4
},
/* (161) slimit_opt ::= SLIMIT signed COMMA signed */
{
237
,
0
},
/* (162) where_opt ::= */
{
237
,
-
2
},
/* (163) where_opt ::= WHERE expr */
{
247
,
-
3
},
/* (164) expr ::= LP expr RP */
{
247
,
-
1
},
/* (165) expr ::= ID */
{
247
,
-
3
},
/* (166) expr ::= ID DOT ID */
{
247
,
-
3
},
/* (167) expr ::= ID DOT STAR */
{
247
,
-
1
},
/* (168) expr ::= INTEGER */
{
247
,
-
2
},
/* (169) expr ::= MINUS INTEGER */
{
247
,
-
2
},
/* (170) expr ::= PLUS INTEGER */
{
247
,
-
1
},
/* (171) expr ::= FLOAT */
{
247
,
-
2
},
/* (172) expr ::= MINUS FLOAT */
{
247
,
-
2
},
/* (173) expr ::= PLUS FLOAT */
{
247
,
-
1
},
/* (174) expr ::= STRING */
{
247
,
-
1
},
/* (175) expr ::= NOW */
{
247
,
-
1
},
/* (176) expr ::= VARIABLE */
{
247
,
-
1
},
/* (177) expr ::= BOOL */
{
247
,
-
4
},
/* (178) expr ::= ID LP exprlist RP */
{
247
,
-
4
},
/* (179) expr ::= ID LP STAR RP */
{
247
,
-
3
},
/* (180) expr ::= expr AND expr */
{
247
,
-
3
},
/* (181) expr ::= expr OR expr */
{
247
,
-
3
},
/* (182) expr ::= expr LT expr */
{
247
,
-
3
},
/* (183) expr ::= expr GT expr */
{
247
,
-
3
},
/* (184) expr ::= expr LE expr */
{
247
,
-
3
},
/* (185) expr ::= expr GE expr */
{
247
,
-
3
},
/* (186) expr ::= expr NE expr */
{
247
,
-
3
},
/* (187) expr ::= expr EQ expr */
{
247
,
-
3
},
/* (188) expr ::= expr PLUS expr */
{
247
,
-
3
},
/* (189) expr ::= expr MINUS expr */
{
247
,
-
3
},
/* (190) expr ::= expr STAR expr */
{
247
,
-
3
},
/* (191) expr ::= expr SLASH expr */
{
247
,
-
3
},
/* (192) expr ::= expr REM expr */
{
247
,
-
3
},
/* (193) expr ::= expr LIKE expr */
{
247
,
-
5
},
/* (194) expr ::= expr IN LP exprlist RP */
{
256
,
-
3
},
/* (195) exprlist ::= exprlist COMMA expritem */
{
256
,
-
1
},
/* (196) exprlist ::= expritem */
{
257
,
-
1
},
/* (197) expritem ::= expr */
{
257
,
0
},
/* (198) expritem ::= */
{
197
,
-
4
},
/* (199) cmd ::= INSERT INTO cpxName insert_value_list */
{
258
,
-
4
},
/* (200) insert_value_list ::= VALUES LP itemlist RP */
{
258
,
-
5
},
/* (201) insert_value_list ::= insert_value_list VALUES LP itemlist RP */
{
259
,
-
3
},
/* (202) itemlist ::= itemlist COMMA expr */
{
259
,
-
1
},
/* (203) itemlist ::= expr */
{
197
,
-
3
},
/* (204) cmd ::= RESET QUERY CACHE */
{
197
,
-
7
},
/* (205) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
197
,
-
7
},
/* (206) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
197
,
-
7
},
/* (207) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
197
,
-
7
},
/* (208) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
197
,
-
8
},
/* (209) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
197
,
-
9
},
/* (210) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
197
,
-
5
},
/* (211) cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */
{
197
,
-
7
},
/* (212) cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */
{
197
,
-
7
},
/* (213) cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */
{
197
,
1
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
2
},
{
198
,
3
},
{
199
,
0
},
{
199
,
2
},
{
201
,
0
},
{
201
,
2
},
{
198
,
3
},
{
198
,
5
},
{
198
,
3
},
{
198
,
5
},
{
198
,
3
},
{
198
,
5
},
{
198
,
4
},
{
198
,
3
},
{
198
,
3
},
{
198
,
3
},
{
198
,
2
},
{
198
,
3
},
{
198
,
5
},
{
198
,
5
},
{
198
,
4
},
{
198
,
5
},
{
198
,
3
},
{
198
,
4
},
{
198
,
4
},
{
198
,
4
},
{
198
,
6
},
{
200
,
1
},
{
200
,
1
},
{
202
,
2
},
{
202
,
0
},
{
205
,
3
},
{
205
,
0
},
{
198
,
3
},
{
198
,
6
},
{
198
,
5
},
{
198
,
5
},
{
207
,
0
},
{
207
,
2
},
{
208
,
0
},
{
208
,
2
},
{
209
,
0
},
{
209
,
2
},
{
210
,
0
},
{
210
,
2
},
{
211
,
0
},
{
211
,
2
},
{
212
,
0
},
{
212
,
2
},
{
213
,
0
},
{
213
,
2
},
{
214
,
0
},
{
214
,
2
},
{
215
,
0
},
{
215
,
2
},
{
204
,
9
},
{
216
,
2
},
{
218
,
2
},
{
219
,
2
},
{
220
,
2
},
{
221
,
2
},
{
222
,
2
},
{
223
,
2
},
{
224
,
2
},
{
225
,
2
},
{
226
,
2
},
{
227
,
2
},
{
228
,
2
},
{
206
,
0
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
206
,
2
},
{
203
,
0
},
{
203
,
2
},
{
203
,
2
},
{
229
,
1
},
{
229
,
4
},
{
230
,
1
},
{
230
,
2
},
{
230
,
2
},
{
198
,
6
},
{
231
,
3
},
{
231
,
7
},
{
231
,
7
},
{
231
,
2
},
{
232
,
3
},
{
232
,
1
},
{
234
,
2
},
{
217
,
3
},
{
217
,
1
},
{
235
,
1
},
{
235
,
1
},
{
235
,
1
},
{
235
,
1
},
{
235
,
1
},
{
235
,
2
},
{
235
,
2
},
{
235
,
2
},
{
235
,
2
},
{
198
,
1
},
{
233
,
12
},
{
233
,
2
},
{
247
,
2
},
{
247
,
0
},
{
236
,
3
},
{
236
,
2
},
{
249
,
2
},
{
249
,
1
},
{
249
,
0
},
{
237
,
2
},
{
250
,
2
},
{
250
,
4
},
{
251
,
1
},
{
239
,
4
},
{
239
,
0
},
{
240
,
0
},
{
240
,
6
},
{
240
,
4
},
{
241
,
4
},
{
241
,
0
},
{
243
,
0
},
{
243
,
3
},
{
252
,
4
},
{
252
,
2
},
{
254
,
2
},
{
255
,
1
},
{
255
,
1
},
{
255
,
0
},
{
242
,
0
},
{
242
,
3
},
{
256
,
3
},
{
256
,
1
},
{
244
,
0
},
{
244
,
2
},
{
246
,
0
},
{
246
,
2
},
{
246
,
4
},
{
246
,
4
},
{
245
,
0
},
{
245
,
2
},
{
245
,
4
},
{
245
,
4
},
{
238
,
0
},
{
238
,
2
},
{
248
,
3
},
{
248
,
1
},
{
248
,
3
},
{
248
,
3
},
{
248
,
1
},
{
248
,
2
},
{
248
,
2
},
{
248
,
1
},
{
248
,
2
},
{
248
,
2
},
{
248
,
1
},
{
248
,
1
},
{
248
,
1
},
{
248
,
1
},
{
248
,
4
},
{
248
,
4
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
3
},
{
248
,
5
},
{
257
,
3
},
{
257
,
1
},
{
258
,
1
},
{
258
,
0
},
{
198
,
4
},
{
259
,
4
},
{
259
,
5
},
{
260
,
3
},
{
260
,
1
},
{
198
,
3
},
{
198
,
7
},
{
198
,
7
},
{
198
,
7
},
{
198
,
7
},
{
198
,
8
},
{
198
,
9
},
{
198
,
5
},
{
198
,
7
},
{
198
,
7
},
};
static
void
yy_accept
(
yyParser
*
);
/* Forward Declaration */
...
...
@@ -1861,66 +1572,27 @@ static void yy_accept(yyParser*); /* Forward Declaration */
/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any). The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed. As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static
void
yy_reduce
(
yyParser
*
yypParser
,
/* The parser */
unsigned
int
yyruleno
,
/* Number of the rule by which to reduce */
int
yyLookahead
,
/* Lookahead token, or YYNOCODE if none */
ParseTOKENTYPE
yyLookaheadToken
/* Value of the lookahead token */
int
yyruleno
/* Number of the rule by which to reduce */
){
int
yygoto
;
/* The next state */
int
yyact
;
/* The next action */
YYMINORTYPE
yygotominor
;
/* The LHS of the rule reduced */
yyStackEntry
*
yymsp
;
/* The top of the parser's stack */
int
yysize
;
/* Amount to pop the stack */
ParseARG_FETCH
;
(
void
)
yyLookahead
;
(
void
)
yyLookaheadToken
;
yymsp
=
yypParser
->
yytos
;
yymsp
=
&
yypParser
->
yystack
[
yypParser
->
yyidx
];
#ifndef NDEBUG
if
(
yyTraceFILE
&&
yyruleno
<
(
int
)(
sizeof
(
yyRuleName
)
/
sizeof
(
yyRuleName
[
0
]))
){
if
(
yyTraceFILE
&&
yyruleno
>=
0
&&
yyruleno
<
(
int
)(
sizeof
(
yyRuleName
)
/
sizeof
(
yyRuleName
[
0
]))
){
yysize
=
yyRuleInfo
[
yyruleno
].
nrhs
;
if
(
yysize
){
fprintf
(
yyTraceFILE
,
"%sReduce %d [%s], go to state %d.
\n
"
,
yyTracePrompt
,
yyruleno
,
yyRuleName
[
yyruleno
],
yymsp
[
yysize
].
stateno
);
}
else
{
fprintf
(
yyTraceFILE
,
"%sReduce %d [%s].
\n
"
,
yyTracePrompt
,
yyruleno
,
yyRuleName
[
yyruleno
]);
}
fprintf
(
yyTraceFILE
,
"%sReduce [%s], go to state %d.
\n
"
,
yyTracePrompt
,
yyRuleName
[
yyruleno
],
yymsp
[
-
yysize
].
stateno
);
}
#endif
/* NDEBUG */
/* Check that the stack is large enough to grow by a single entry
** if the RHS of the rule is empty. This ensures that there is room
** enough on the stack to push the LHS value */
if
(
yyRuleInfo
[
yyruleno
].
nrhs
==
0
){
#ifdef YYTRACKMAXSTACKDEPTH
if
(
(
int
)(
yypParser
->
yytos
-
yypParser
->
yystack
)
>
yypParser
->
yyhwm
){
yypParser
->
yyhwm
++
;
assert
(
yypParser
->
yyhwm
==
(
int
)(
yypParser
->
yytos
-
yypParser
->
yystack
));
}
#endif
#if YYSTACKDEPTH>0
if
(
yypParser
->
yytos
>=
yypParser
->
yystackEnd
){
yyStackOverflow
(
yypParser
);
return
;
}
#else
if
(
yypParser
->
yytos
>=&
yypParser
->
yystack
[
yypParser
->
yystksz
-
1
]
){
if
(
yyGrowStack
(
yypParser
)
){
yyStackOverflow
(
yypParser
);
return
;
}
yymsp
=
yypParser
->
yytos
;
}
#endif
}
yygotominor
=
yyzerominor
;
switch
(
yyruleno
){
/* Beginning here are the reduction cases. A typical example
...
...
@@ -1932,7 +1604,6 @@ static void yy_reduce(
** break;
*/
/********** Begin reduce actions **********************************************/
YYMINORTYPE
yylhsminor
;
case
0
:
/* program ::= cmd */
{}
break
;
...
...
@@ -1972,654 +1643,578 @@ static void yy_reduce(
case
12
:
/* cmd ::= SHOW GRANTS */
{
setDCLSQLElems
(
pInfo
,
SHOW_GRANTS
,
0
);
}
break
;
case
13
:
/* dbPrefix ::= */
case
41
:
/* ifexists ::= */
yytestcase
(
yyruleno
==
41
);
case
43
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
43
);
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;}
case
13
:
/* cmd ::= SHOW VNODES */
{
setDCLSQLElems
(
pInfo
,
SHOW_VNODES
,
0
);
}
break
;
case
14
:
/* cmd ::= SHOW VNODES IPTOKEN */
{
setDCLSQLElems
(
pInfo
,
SHOW_VNODES
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
14
:
/* dbPrefix ::= ids DOT */
{
yylhsminor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
yymsp
[
-
1
].
minor
.
yy0
=
yylhsminor
.
yy0
;
case
15
:
/* dbPrefix ::= */
case
43
:
/* ifexists ::= */
yytestcase
(
yyruleno
==
43
);
case
45
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
45
);
{
yygotominor
.
yy0
.
n
=
0
;}
break
;
case
1
5
:
/* cpxName ::=
*/
{
yy
msp
[
1
].
minor
.
yy0
.
n
=
0
;
}
case
1
6
:
/* dbPrefix ::= ids DOT
*/
{
yy
gotominor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy
0
;
}
break
;
case
1
6
:
/* cpxName ::= DOT ids
*/
{
yy
msp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
1
;
}
case
1
7
:
/* cpxName ::=
*/
{
yy
gotominor
.
yy0
.
n
=
0
;
}
break
;
case
17
:
/* cmd ::= SHOW dbPrefix TABLES */
case
18
:
/* cpxName ::= DOT ids */
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
yygotominor
.
yy0
.
n
+=
1
;
}
break
;
case
19
:
/* cmd ::= SHOW dbPrefix TABLES */
{
setDCLSQLElems
(
pInfo
,
SHOW_TABLES
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
case
18
:
/* cmd ::= SHOW dbPrefix TABLES LIKE ids */
case
20
:
/* cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
setDCLSQLElems
(
pInfo
,
SHOW_TABLES
,
2
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
19
:
/* cmd ::= SHOW dbPrefix STABLES */
case
21
:
/* cmd ::= SHOW dbPrefix STABLES */
{
setDCLSQLElems
(
pInfo
,
SHOW_STABLES
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
case
2
0
:
/* cmd ::= SHOW dbPrefix STABLES LIKE ids */
case
2
2
:
/* cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
SSQLToken
token
;
setDBName
(
&
token
,
&
yymsp
[
-
3
].
minor
.
yy0
);
setDCLSQLElems
(
pInfo
,
SHOW_STABLES
,
2
,
&
token
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
2
1
:
/* cmd ::= SHOW dbPrefix VGROUPS */
case
2
3
:
/* cmd ::= SHOW dbPrefix VGROUPS */
{
SSQLToken
token
;
setDBName
(
&
token
,
&
yymsp
[
-
1
].
minor
.
yy0
);
setDCLSQLElems
(
pInfo
,
SHOW_VGROUPS
,
1
,
&
token
);
}
break
;
case
2
2
:
/* cmd ::= DROP TABLE ifexists ids cpxName */
case
2
4
:
/* cmd ::= DROP TABLE ifexists ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDCLSQLElems
(
pInfo
,
DROP_TABLE
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
-
2
].
minor
.
yy0
);
}
break
;
case
2
3
:
/* cmd ::= DROP DATABASE ifexists ids */
case
2
5
:
/* cmd ::= DROP DATABASE ifexists ids */
{
setDCLSQLElems
(
pInfo
,
DROP_DATABASE
,
2
,
&
yymsp
[
0
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
case
2
4
:
/* cmd ::= DROP DNODE IPTOKEN */
case
2
6
:
/* cmd ::= DROP DNODE IPTOKEN */
{
setDCLSQLElems
(
pInfo
,
DROP_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
2
5
:
/* cmd ::= DROP USER ids */
case
2
7
:
/* cmd ::= DROP USER ids */
{
setDCLSQLElems
(
pInfo
,
DROP_USER
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
2
6
:
/* cmd ::= DROP ACCOUNT ids */
case
2
8
:
/* cmd ::= DROP ACCOUNT ids */
{
setDCLSQLElems
(
pInfo
,
DROP_ACCOUNT
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
2
7
:
/* cmd ::= USE ids */
case
2
9
:
/* cmd ::= USE ids */
{
setDCLSQLElems
(
pInfo
,
USE_DATABASE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
28
:
/* cmd ::= DESCRIBE ids cpxName */
case
30
:
/* cmd ::= DESCRIBE ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDCLSQLElems
(
pInfo
,
DESCRIBE_TABLE
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
case
29
:
/* cmd ::= ALTER USER ids PASS ids */
case
31
:
/* cmd ::= ALTER USER ids PASS ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_USER_PASSWD
,
2
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
3
0
:
/* cmd ::= ALTER USER ids PRIVILEGE ids */
case
3
2
:
/* cmd ::= ALTER USER ids PRIVILEGE ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_USER_PRIVILEGES
,
2
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
3
1
:
/* cmd ::= ALTER DNODE IPTOKEN ids */
case
3
3
:
/* cmd ::= ALTER DNODE IPTOKEN ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_DNODE
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
3
2
:
/* cmd ::= ALTER DNODE IPTOKEN ids ids */
case
3
4
:
/* cmd ::= ALTER DNODE IPTOKEN ids ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_DNODE
,
3
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
3
3
:
/* cmd ::= ALTER LOCAL ids */
case
3
5
:
/* cmd ::= ALTER LOCAL ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_LOCAL
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
3
4
:
/* cmd ::= ALTER LOCAL ids ids */
case
3
6
:
/* cmd ::= ALTER LOCAL ids ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_LOCAL
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
35
:
/* cmd ::= ALTER DATABASE ids alter_db_optr */
{
SSQLToken
t
=
{
0
};
setCreateDBSQL
(
pInfo
,
ALTER_DATABASE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy398
,
&
t
);}
break
;
case
36
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
{
SSQLToken
t
=
{
0
};
setCreateAcctSQL
(
pInfo
,
ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
t
,
&
yymsp
[
0
].
minor
.
yy279
);}
case
37
:
/* cmd ::= ALTER DATABASE ids alter_db_optr */
{
SSQLToken
t
=
{
0
};
setCreateDBSQL
(
pInfo
,
ALTER_DATABASE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy262
,
&
t
);}
break
;
case
3
7
:
/* cmd ::= ALTER ACCOUNT ids PASS
ids acct_optr */
{
setCreateAcctSQL
(
pInfo
,
ALTER_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy279
);}
case
3
8
:
/* cmd ::= ALTER ACCOUNT
ids acct_optr */
{
SSQLToken
t
=
{
0
};
setCreateAcctSQL
(
pInfo
,
ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
t
,
&
yymsp
[
0
].
minor
.
yy155
);}
break
;
case
38
:
/* ids ::= ID */
case
39
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
39
);
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
case
39
:
/* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
setCreateAcctSQL
(
pInfo
,
ALTER_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy155
);}
break
;
case
40
:
/* ifexists ::= IF EXISTS */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
=
1
;}
case
40
:
/* ids ::= ID */
case
41
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
41
);
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
42
:
/* ifnotexists ::= IF NOT EXISTS */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
=
1
;}
case
42
:
/* ifexists ::= IF EXISTS */
case
44
:
/* ifnotexists ::= IF NOT EXISTS */
yytestcase
(
yyruleno
==
44
);
{
yygotominor
.
yy0
.
n
=
1
;}
break
;
case
4
4
:
/* cmd ::= CREATE DNODE IPTOKEN */
case
4
6
:
/* cmd ::= CREATE DNODE IPTOKEN */
{
setDCLSQLElems
(
pInfo
,
CREATE_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
4
5
:
/* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
setCreateAcctSQL
(
pInfo
,
CREATE_ACCOUNT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
279
);}
case
4
7
:
/* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
setCreateAcctSQL
(
pInfo
,
CREATE_ACCOUNT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
155
);}
break
;
case
4
6
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
setCreateDBSQL
(
pInfo
,
CREATE_DATABASE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
398
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
case
4
8
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
setCreateDBSQL
(
pInfo
,
CREATE_DATABASE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
262
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
break
;
case
4
7
:
/* cmd ::= CREATE USER ids PASS ids */
case
4
9
:
/* cmd ::= CREATE USER ids PASS ids */
{
setDCLSQLElems
(
pInfo
,
CREATE_USER
,
2
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
48
:
/* pps ::= */
case
5
0
:
/* tseries ::= */
yytestcase
(
yyruleno
==
50
);
case
5
2
:
/* dbs ::= */
yytestcase
(
yyruleno
==
52
);
case
5
4
:
/* streams ::= */
yytestcase
(
yyruleno
==
54
);
case
5
6
:
/* storage ::= */
yytestcase
(
yyruleno
==
56
);
case
58
:
/* qtime ::= */
yytestcase
(
yyruleno
==
58
);
case
6
0
:
/* users ::= */
yytestcase
(
yyruleno
==
60
);
case
6
2
:
/* conns ::= */
yytestcase
(
yyruleno
==
62
);
case
6
4
:
/* state ::= */
yytestcase
(
yyruleno
==
64
);
{
yy
msp
[
1
].
minor
.
yy0
.
n
=
0
;
}
break
;
case
49
:
/* pps ::= PPS INTEGER */
case
5
1
:
/* tseries ::= TSERIES INTEGER */
yytestcase
(
yyruleno
==
51
);
case
5
3
:
/* dbs ::= DBS INTEGER */
yytestcase
(
yyruleno
==
53
);
case
5
5
:
/* streams ::= STREAMS INTEGER */
yytestcase
(
yyruleno
==
55
);
case
5
7
:
/* storage ::= STORAGE INTEGER */
yytestcase
(
yyruleno
==
57
);
case
59
:
/* qtime ::= QTIME INTEGER */
yytestcase
(
yyruleno
==
59
);
case
6
1
:
/* users ::= USERS INTEGER */
yytestcase
(
yyruleno
==
61
);
case
6
3
:
/* conns ::= CONNS INTEGER */
yytestcase
(
yyruleno
==
63
);
case
6
5
:
/* state ::= STATE ids */
yytestcase
(
yyruleno
==
65
);
{
yy
msp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
6
6
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
case
50
:
/* pps ::= */
case
5
2
:
/* tseries ::= */
yytestcase
(
yyruleno
==
52
);
case
5
4
:
/* dbs ::= */
yytestcase
(
yyruleno
==
54
);
case
5
6
:
/* streams ::= */
yytestcase
(
yyruleno
==
56
);
case
5
8
:
/* storage ::= */
yytestcase
(
yyruleno
==
58
);
case
60
:
/* qtime ::= */
yytestcase
(
yyruleno
==
60
);
case
6
2
:
/* users ::= */
yytestcase
(
yyruleno
==
62
);
case
6
4
:
/* conns ::= */
yytestcase
(
yyruleno
==
64
);
case
6
6
:
/* state ::= */
yytestcase
(
yyruleno
==
66
);
{
yy
goto
minor
.
yy0
.
n
=
0
;
}
break
;
case
51
:
/* pps ::= PPS INTEGER */
case
5
3
:
/* tseries ::= TSERIES INTEGER */
yytestcase
(
yyruleno
==
53
);
case
5
5
:
/* dbs ::= DBS INTEGER */
yytestcase
(
yyruleno
==
55
);
case
5
7
:
/* streams ::= STREAMS INTEGER */
yytestcase
(
yyruleno
==
57
);
case
5
9
:
/* storage ::= STORAGE INTEGER */
yytestcase
(
yyruleno
==
59
);
case
61
:
/* qtime ::= QTIME INTEGER */
yytestcase
(
yyruleno
==
61
);
case
6
3
:
/* users ::= USERS INTEGER */
yytestcase
(
yyruleno
==
63
);
case
6
5
:
/* conns ::= CONNS INTEGER */
yytestcase
(
yyruleno
==
65
);
case
6
7
:
/* state ::= STATE ids */
yytestcase
(
yyruleno
==
67
);
{
yy
goto
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
6
8
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
yy
lhsminor
.
yy279
.
users
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yy
lhsminor
.
yy279
.
dbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
yy
lhsminor
.
yy279
.
tseries
=
(
yymsp
[
-
7
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
7
].
minor
.
yy0
.
z
)
:-
1
;
yy
lhsminor
.
yy279
.
streams
=
(
yymsp
[
-
5
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
5
].
minor
.
yy0
.
z
)
:-
1
;
yy
lhsminor
.
yy279
.
pps
=
(
yymsp
[
-
8
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
8
].
minor
.
yy0
.
z
)
:-
1
;
yy
lhsminor
.
yy279
.
storage
=
(
yymsp
[
-
6
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
6
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yy
lhsminor
.
yy279
.
qtime
=
(
yymsp
[
-
4
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
4
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yy
lhsminor
.
yy279
.
conns
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yy
lhsminor
.
yy279
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
yy
gotominor
.
yy155
.
users
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yy
gotominor
.
yy155
.
dbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
yy
gotominor
.
yy155
.
tseries
=
(
yymsp
[
-
7
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
7
].
minor
.
yy0
.
z
)
:-
1
;
yy
gotominor
.
yy155
.
streams
=
(
yymsp
[
-
5
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
5
].
minor
.
yy0
.
z
)
:-
1
;
yy
gotominor
.
yy155
.
pps
=
(
yymsp
[
-
8
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
8
].
minor
.
yy0
.
z
)
:-
1
;
yy
gotominor
.
yy155
.
storage
=
(
yymsp
[
-
6
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
6
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yy
gotominor
.
yy155
.
qtime
=
(
yymsp
[
-
4
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
4
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yy
gotominor
.
yy155
.
conns
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yy
gotominor
.
yy155
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
8
].
minor
.
yy279
=
yylhsminor
.
yy279
;
break
;
case
67
:
/* keep ::= KEEP tagitemlist */
{
yymsp
[
-
1
].
minor
.
yy56
=
yymsp
[
0
].
minor
.
yy56
;
}
break
;
case
68
:
/* tables ::= TABLES INTEGER */
case
69
:
/* cache ::= CACHE INTEGER */
yytestcase
(
yyruleno
==
69
);
case
70
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
70
);
case
71
:
/* days ::= DAYS INTEGER */
yytestcase
(
yyruleno
==
71
);
case
72
:
/* rows ::= ROWS INTEGER */
yytestcase
(
yyruleno
==
72
);
case
73
:
/* ablocks ::= ABLOCKS ID */
yytestcase
(
yyruleno
==
73
);
case
74
:
/* tblocks ::= TBLOCKS INTEGER */
yytestcase
(
yyruleno
==
74
);
case
75
:
/* ctime ::= CTIME INTEGER */
yytestcase
(
yyruleno
==
75
);
case
76
:
/* clog ::= CLOG INTEGER */
yytestcase
(
yyruleno
==
76
);
case
77
:
/* comp ::= COMP INTEGER */
yytestcase
(
yyruleno
==
77
);
case
78
:
/* prec ::= PRECISION STRING */
yytestcase
(
yyruleno
==
78
);
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
79
:
/* db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy398
);}
break
;
case
80
:
/* db_optr ::= db_optr tables */
case
94
:
/* alter_db_optr ::= alter_db_optr tables */
yytestcase
(
yyruleno
==
94
);
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
tablesPerVnode
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
81
:
/* db_optr ::= db_optr cache */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
82
:
/* db_optr ::= db_optr replica */
case
93
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
93
);
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
83
:
/* db_optr ::= db_optr days */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
84
:
/* db_optr ::= db_optr rows */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
rowPerFileBlock
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
85
:
/* db_optr ::= db_optr ablocks */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
numOfAvgCacheBlocks
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
86
:
/* db_optr ::= db_optr tblocks */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
numOfBlocksPerTable
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
87
:
/* db_optr ::= db_optr ctime */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
88
:
/* db_optr ::= db_optr clog */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
commitLog
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
89
:
/* db_optr ::= db_optr comp */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
90
:
/* db_optr ::= db_optr prec */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
91
:
/* db_optr ::= db_optr keep */
{
yylhsminor
.
yy398
=
yymsp
[
-
1
].
minor
.
yy398
;
yylhsminor
.
yy398
.
keep
=
yymsp
[
0
].
minor
.
yy56
;
}
yymsp
[
-
1
].
minor
.
yy398
=
yylhsminor
.
yy398
;
break
;
case
92
:
/* alter_db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy398
);}
break
;
case
95
:
/* typename ::= ids */
{
tSQLSetColumnType
(
&
yylhsminor
.
yy223
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy223
=
yylhsminor
.
yy223
;
break
;
case
96
:
/* typename ::= ids LP signed RP */
break
;
case
69
:
/* keep ::= KEEP tagitemlist */
{
yygotominor
.
yy480
=
yymsp
[
0
].
minor
.
yy480
;
}
break
;
case
70
:
/* tables ::= TABLES INTEGER */
case
71
:
/* cache ::= CACHE INTEGER */
yytestcase
(
yyruleno
==
71
);
case
72
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
72
);
case
73
:
/* days ::= DAYS INTEGER */
yytestcase
(
yyruleno
==
73
);
case
74
:
/* rows ::= ROWS INTEGER */
yytestcase
(
yyruleno
==
74
);
case
75
:
/* ablocks ::= ABLOCKS ID */
yytestcase
(
yyruleno
==
75
);
case
76
:
/* tblocks ::= TBLOCKS INTEGER */
yytestcase
(
yyruleno
==
76
);
case
77
:
/* ctime ::= CTIME INTEGER */
yytestcase
(
yyruleno
==
77
);
case
78
:
/* clog ::= CLOG INTEGER */
yytestcase
(
yyruleno
==
78
);
case
79
:
/* comp ::= COMP INTEGER */
yytestcase
(
yyruleno
==
79
);
case
80
:
/* prec ::= PRECISION STRING */
yytestcase
(
yyruleno
==
80
);
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
81
:
/* db_optr ::= */
{
setDefaultCreateDbOption
(
&
yygotominor
.
yy262
);}
break
;
case
82
:
/* db_optr ::= db_optr tables */
case
96
:
/* alter_db_optr ::= alter_db_optr tables */
yytestcase
(
yyruleno
==
96
);
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
tablesPerVnode
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
83
:
/* db_optr ::= db_optr cache */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
84
:
/* db_optr ::= db_optr replica */
case
95
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
95
);
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
85
:
/* db_optr ::= db_optr days */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
86
:
/* db_optr ::= db_optr rows */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
rowPerFileBlock
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
87
:
/* db_optr ::= db_optr ablocks */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
numOfAvgCacheBlocks
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
break
;
case
88
:
/* db_optr ::= db_optr tblocks */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
numOfBlocksPerTable
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
89
:
/* db_optr ::= db_optr ctime */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
90
:
/* db_optr ::= db_optr clog */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
commitLog
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
91
:
/* db_optr ::= db_optr comp */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
92
:
/* db_optr ::= db_optr prec */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
93
:
/* db_optr ::= db_optr keep */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
keep
=
yymsp
[
0
].
minor
.
yy480
;
}
break
;
case
94
:
/* alter_db_optr ::= */
{
setDefaultCreateDbOption
(
&
yygotominor
.
yy262
);}
break
;
case
97
:
/* typename ::= ids */
{
tSQLSetColumnType
(
&
yygotominor
.
yy397
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
98
:
/* typename ::= ids LP signed RP */
{
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy3
8
9
;
// negative value of name length
tSQLSetColumnType
(
&
yy
lhsminor
.
yy223
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy3
6
9
;
// negative value of name length
tSQLSetColumnType
(
&
yy
gotominor
.
yy397
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
yymsp
[
-
3
].
minor
.
yy223
=
yylhsminor
.
yy223
;
break
;
case
9
7
:
/* signed ::= INTEGER */
{
yylhsminor
.
yy389
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
0
].
minor
.
yy389
=
yylhsminor
.
yy389
;
case
9
9
:
/* signed ::= INTEGER */
case
100
:
/* signed ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
100
);
{
yygotominor
.
yy369
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
98
:
/* signed ::= PL
US INTEGER */
{
yy
msp
[
-
1
].
minor
.
yy389
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
case
101
:
/* signed ::= MIN
US INTEGER */
{
yy
gotominor
.
yy369
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
99
:
/* signed ::= MINUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy389
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
break
;
case
100
:
/* cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
case
102
:
/* cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
setCreatedMeterName
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
break
;
case
10
1
:
/* create_table_args ::= LP columnlist RP */
case
10
3
:
/* create_table_args ::= LP columnlist RP */
{
yy
msp
[
-
2
].
minor
.
yy158
=
tSetCreateSQLElems
(
yymsp
[
-
1
].
minor
.
yy47
1
,
NULL
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_NORMAL_METER
);
setSQLInfo
(
pInfo
,
yy
msp
[
-
2
].
minor
.
yy158
,
NULL
,
TSQL_CREATE_NORMAL_METER
);
yy
gotominor
.
yy344
=
tSetCreateSQLElems
(
yymsp
[
-
1
].
minor
.
yy42
1
,
NULL
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_NORMAL_METER
);
setSQLInfo
(
pInfo
,
yy
gotominor
.
yy344
,
NULL
,
TSQL_CREATE_NORMAL_METER
);
}
break
;
case
10
2
:
/* create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
case
10
4
:
/* create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
{
yy
msp
[
-
6
].
minor
.
yy158
=
tSetCreateSQLElems
(
yymsp
[
-
5
].
minor
.
yy471
,
yymsp
[
-
1
].
minor
.
yy47
1
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_NORMAL_METRIC
);
setSQLInfo
(
pInfo
,
yy
msp
[
-
6
].
minor
.
yy158
,
NULL
,
TSQL_CREATE_NORMAL_METRIC
);
yy
gotominor
.
yy344
=
tSetCreateSQLElems
(
yymsp
[
-
5
].
minor
.
yy421
,
yymsp
[
-
1
].
minor
.
yy42
1
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_NORMAL_METRIC
);
setSQLInfo
(
pInfo
,
yy
gotominor
.
yy344
,
NULL
,
TSQL_CREATE_NORMAL_METRIC
);
}
break
;
case
10
3
:
/* create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
case
10
5
:
/* create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
yy
msp
[
-
6
].
minor
.
yy158
=
tSetCreateSQLElems
(
NULL
,
NULL
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
1
].
minor
.
yy56
,
NULL
,
TSQL_CREATE_METER_FROM_METRIC
);
setSQLInfo
(
pInfo
,
yy
msp
[
-
6
].
minor
.
yy158
,
NULL
,
TSQL_CREATE_METER_FROM_METRIC
);
yy
gotominor
.
yy344
=
tSetCreateSQLElems
(
NULL
,
NULL
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
1
].
minor
.
yy480
,
NULL
,
TSQL_CREATE_METER_FROM_METRIC
);
setSQLInfo
(
pInfo
,
yy
gotominor
.
yy344
,
NULL
,
TSQL_CREATE_METER_FROM_METRIC
);
}
break
;
case
10
4
:
/* create_table_args ::= AS select */
case
10
6
:
/* create_table_args ::= AS select */
{
yy
msp
[
-
1
].
minor
.
yy158
=
tSetCreateSQLElems
(
NULL
,
NULL
,
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy24
,
TSQL_CREATE_STREAM
);
setSQLInfo
(
pInfo
,
yy
msp
[
-
1
].
minor
.
yy158
,
NULL
,
TSQL_CREATE_STREAM
);
yy
gotominor
.
yy344
=
tSetCreateSQLElems
(
NULL
,
NULL
,
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy138
,
TSQL_CREATE_STREAM
);
setSQLInfo
(
pInfo
,
yy
gotominor
.
yy344
,
NULL
,
TSQL_CREATE_STREAM
);
}
break
;
case
105
:
/* columnlist ::= columnlist COMMA column */
{
yylhsminor
.
yy471
=
tFieldListAppend
(
yymsp
[
-
2
].
minor
.
yy471
,
&
yymsp
[
0
].
minor
.
yy223
);
}
yymsp
[
-
2
].
minor
.
yy471
=
yylhsminor
.
yy471
;
case
107
:
/* columnlist ::= columnlist COMMA column */
{
yygotominor
.
yy421
=
tFieldListAppend
(
yymsp
[
-
2
].
minor
.
yy421
,
&
yymsp
[
0
].
minor
.
yy397
);
}
break
;
case
106
:
/* columnlist ::= column */
{
yylhsminor
.
yy471
=
tFieldListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy223
);}
yymsp
[
0
].
minor
.
yy471
=
yylhsminor
.
yy471
;
case
108
:
/* columnlist ::= column */
{
yygotominor
.
yy421
=
tFieldListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy397
);}
break
;
case
10
7
:
/* column ::= ids typename */
case
10
9
:
/* column ::= ids typename */
{
tSQLSetColumnInfo
(
&
yy
lhsminor
.
yy223
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy223
);
tSQLSetColumnInfo
(
&
yy
gotominor
.
yy397
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy397
);
}
yymsp
[
-
1
].
minor
.
yy223
=
yylhsminor
.
yy223
;
break
;
case
108
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
{
yylhsminor
.
yy56
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy56
,
&
yymsp
[
0
].
minor
.
yy186
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy56
=
yylhsminor
.
yy56
;
break
;
case
109
:
/* tagitemlist ::= tagitem */
{
yylhsminor
.
yy56
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy186
,
-
1
);
}
yymsp
[
0
].
minor
.
yy56
=
yylhsminor
.
yy56
;
break
;
case
110
:
/* tagitem ::= INTEGER */
case
111
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
111
);
case
112
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
112
);
case
113
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
113
);
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy186
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy186
=
yylhsminor
.
yy186
;
break
;
case
114
:
/* tagitem ::= NULL */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yylhsminor
.
yy186
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy186
=
yylhsminor
.
yy186
;
break
;
case
115
:
/* tagitem ::= MINUS INTEGER */
case
116
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
116
);
case
117
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
117
);
case
118
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
118
);
break
;
case
110
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
{
yygotominor
.
yy480
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy480
,
&
yymsp
[
0
].
minor
.
yy236
,
-
1
);
}
break
;
case
111
:
/* tagitemlist ::= tagitem */
{
yygotominor
.
yy480
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy236
,
-
1
);
}
break
;
case
112
:
/* tagitem ::= INTEGER */
case
113
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
113
);
case
114
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
114
);
case
115
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
115
);
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yygotominor
.
yy236
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
116
:
/* tagitem ::= NULL */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yygotominor
.
yy236
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
117
:
/* tagitem ::= MINUS INTEGER */
case
118
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
118
);
case
119
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
119
);
case
120
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
120
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
yymsp
[
0
].
minor
.
yy0
.
type
;
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yy
lhsminor
.
yy18
6
,
&
yymsp
[
-
1
].
minor
.
yy0
);
tVariantCreate
(
&
yy
gotominor
.
yy23
6
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
yymsp
[
-
1
].
minor
.
yy186
=
yylhsminor
.
yy186
;
break
;
case
1
19
:
/* cmd ::= select */
case
1
21
:
/* cmd ::= select */
{
setSQLInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy
24
,
NULL
,
TSQL_QUERY_METER
);
setSQLInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy
138
,
NULL
,
TSQL_QUERY_METER
);
}
break
;
case
12
0
:
/* select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
case
12
2
:
/* select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
yy
lhsminor
.
yy24
=
tSetQuerySQLElems
(
&
yymsp
[
-
11
].
minor
.
yy0
,
yymsp
[
-
10
].
minor
.
yy498
,
yymsp
[
-
9
].
minor
.
yy56
,
yymsp
[
-
8
].
minor
.
yy90
,
yymsp
[
-
4
].
minor
.
yy56
,
yymsp
[
-
3
].
minor
.
yy56
,
&
yymsp
[
-
7
].
minor
.
yy0
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
6
].
minor
.
yy56
,
&
yymsp
[
0
].
minor
.
yy294
,
&
yymsp
[
-
1
].
minor
.
yy294
);
yy
gotominor
.
yy138
=
tSetQuerySQLElems
(
&
yymsp
[
-
11
].
minor
.
yy0
,
yymsp
[
-
10
].
minor
.
yy284
,
yymsp
[
-
9
].
minor
.
yy480
,
yymsp
[
-
8
].
minor
.
yy244
,
yymsp
[
-
4
].
minor
.
yy480
,
yymsp
[
-
3
].
minor
.
yy480
,
&
yymsp
[
-
7
].
minor
.
yy0
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
6
].
minor
.
yy480
,
&
yymsp
[
0
].
minor
.
yy162
,
&
yymsp
[
-
1
].
minor
.
yy162
);
}
yymsp
[
-
11
].
minor
.
yy24
=
yylhsminor
.
yy24
;
break
;
case
12
1
:
/* select ::= SELECT selcollist */
case
12
3
:
/* select ::= SELECT selcollist */
{
yy
lhsminor
.
yy24
=
tSetQuerySQLElems
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy498
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
yy
gotominor
.
yy138
=
tSetQuerySQLElems
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy284
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy24
=
yylhsminor
.
yy24
;
break
;
case
122
:
/* sclp ::= selcollist COMMA */
{
yylhsminor
.
yy498
=
yymsp
[
-
1
].
minor
.
yy498
;}
yymsp
[
-
1
].
minor
.
yy498
=
yylhsminor
.
yy498
;
case
124
:
/* sclp ::= selcollist COMMA */
{
yygotominor
.
yy284
=
yymsp
[
-
1
].
minor
.
yy284
;}
break
;
case
12
3
:
/* sclp ::= */
{
yy
msp
[
1
].
minor
.
yy498
=
0
;}
case
12
5
:
/* sclp ::= */
{
yy
gotominor
.
yy284
=
0
;}
break
;
case
12
4
:
/* selcollist ::= sclp expr as */
case
12
6
:
/* selcollist ::= sclp expr as */
{
yy
lhsminor
.
yy498
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy498
,
yymsp
[
-
1
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
yy
gotominor
.
yy284
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy284
,
yymsp
[
-
1
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
}
yymsp
[
-
2
].
minor
.
yy498
=
yylhsminor
.
yy498
;
break
;
case
12
5
:
/* selcollist ::= sclp STAR */
case
12
7
:
/* selcollist ::= sclp STAR */
{
tSQLExpr
*
pNode
=
tSQLExprIdValueCreate
(
NULL
,
TK_ALL
);
yy
lhsminor
.
yy498
=
tSQLExprListAppend
(
yymsp
[
-
1
].
minor
.
yy498
,
pNode
,
0
);
yy
gotominor
.
yy284
=
tSQLExprListAppend
(
yymsp
[
-
1
].
minor
.
yy284
,
pNode
,
0
);
}
yymsp
[
-
1
].
minor
.
yy498
=
yylhsminor
.
yy498
;
break
;
case
126
:
/* as ::= AS ids */
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
12
7
:
/* as ::=
ids */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
case
12
8
:
/* as ::= AS
ids */
case
129
:
/* as ::= ids */
yytestcase
(
yyruleno
==
129
);
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
1
28
:
/* as ::= */
{
yy
msp
[
1
].
minor
.
yy0
.
n
=
0
;
}
case
1
30
:
/* as ::= */
{
yy
goto
minor
.
yy0
.
n
=
0
;
}
break
;
case
129
:
/* from ::= FROM tablelist */
{
yymsp
[
-
1
].
minor
.
yy56
=
yymsp
[
0
].
minor
.
yy56
;}
case
131
:
/* from ::= FROM tablelist */
case
143
:
/* orderby_opt ::= ORDER BY sortlist */
yytestcase
(
yyruleno
==
143
);
case
151
:
/* groupby_opt ::= GROUP BY grouplist */
yytestcase
(
yyruleno
==
151
);
{
yygotominor
.
yy480
=
yymsp
[
0
].
minor
.
yy480
;}
break
;
case
130
:
/* tablelist ::= ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy56
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);}
yymsp
[
-
1
].
minor
.
yy56
=
yylhsminor
.
yy56
;
case
132
:
/* tablelist ::= ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yygotominor
.
yy480
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);}
break
;
case
131
:
/* tablelist ::= tablelist COMMA ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy56
=
tVariantListAppendToken
(
yymsp
[
-
3
].
minor
.
yy56
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
yymsp
[
-
3
].
minor
.
yy56
=
yylhsminor
.
yy56
;
case
133
:
/* tablelist ::= tablelist COMMA ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yygotominor
.
yy480
=
tVariantListAppendToken
(
yymsp
[
-
3
].
minor
.
yy480
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
break
;
case
132
:
/* tmvar ::= VARIABLE */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
case
134
:
/* tmvar ::= VARIABLE */
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
break
;
case
13
3
:
/* interval_opt ::= INTERVAL LP tmvar RP */
case
1
38
:
/* sliding_opt ::= SLIDING LP tmvar RP */
yytestcase
(
yyruleno
==
138
);
{
yy
msp
[
-
3
].
minor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
case
13
5
:
/* interval_opt ::= INTERVAL LP tmvar RP */
case
1
40
:
/* sliding_opt ::= SLIDING LP tmvar RP */
yytestcase
(
yyruleno
==
140
);
{
yy
goto
minor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
13
4
:
/* interval_opt ::= */
case
1
39
:
/* sliding_opt ::= */
yytestcase
(
yyruleno
==
139
);
{
yy
msp
[
1
].
minor
.
yy0
.
n
=
0
;
yymsp
[
1
].
minor
.
yy0
.
z
=
NULL
;
yymsp
[
1
].
minor
.
yy0
.
type
=
0
;
}
case
13
6
:
/* interval_opt ::= */
case
1
41
:
/* sliding_opt ::= */
yytestcase
(
yyruleno
==
141
);
{
yy
gotominor
.
yy0
.
n
=
0
;
yygotominor
.
yy0
.
z
=
NULL
;
yygoto
minor
.
yy0
.
type
=
0
;
}
break
;
case
13
5
:
/* fill_opt ::= */
{
yy
msp
[
1
].
minor
.
yy56
=
0
;
}
case
13
7
:
/* fill_opt ::= */
{
yy
gotominor
.
yy480
=
0
;
}
break
;
case
13
6
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
case
13
8
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
tVariant
A
=
{
0
};
toTSDBType
(
yymsp
[
-
3
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
A
,
&
yymsp
[
-
3
].
minor
.
yy0
);
tVariantListInsert
(
yymsp
[
-
1
].
minor
.
yy
56
,
&
A
,
-
1
,
0
);
yy
msp
[
-
5
].
minor
.
yy56
=
yymsp
[
-
1
].
minor
.
yy56
;
tVariantListInsert
(
yymsp
[
-
1
].
minor
.
yy
480
,
&
A
,
-
1
,
0
);
yy
gotominor
.
yy480
=
yymsp
[
-
1
].
minor
.
yy480
;
}
break
;
case
13
7
:
/* fill_opt ::= FILL LP ID RP */
case
13
9
:
/* fill_opt ::= FILL LP ID RP */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yy
msp
[
-
3
].
minor
.
yy56
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yy
gotominor
.
yy480
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
break
;
case
14
0
:
/* orderby_opt ::= */
case
1
48
:
/* groupby_opt ::= */
yytestcase
(
yyruleno
==
148
);
{
yy
msp
[
1
].
minor
.
yy56
=
0
;}
case
14
2
:
/* orderby_opt ::= */
case
1
50
:
/* groupby_opt ::= */
yytestcase
(
yyruleno
==
150
);
{
yy
gotominor
.
yy480
=
0
;}
break
;
case
141
:
/* orderby_opt ::= ORDER BY sortlist */
case
149
:
/* groupby_opt ::= GROUP BY grouplist */
yytestcase
(
yyruleno
==
149
);
{
yymsp
[
-
2
].
minor
.
yy56
=
yymsp
[
0
].
minor
.
yy56
;}
break
;
case
142
:
/* sortlist ::= sortlist COMMA item sortorder */
case
144
:
/* sortlist ::= sortlist COMMA item sortorder */
{
yy
lhsminor
.
yy56
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy56
,
&
yymsp
[
-
1
].
minor
.
yy186
,
yymsp
[
0
].
minor
.
yy332
);
yy
gotominor
.
yy480
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy480
,
&
yymsp
[
-
1
].
minor
.
yy236
,
yymsp
[
0
].
minor
.
yy220
);
}
yymsp
[
-
3
].
minor
.
yy56
=
yylhsminor
.
yy56
;
break
;
case
14
3
:
/* sortlist ::= item sortorder */
case
14
5
:
/* sortlist ::= item sortorder */
{
yy
lhsminor
.
yy56
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy186
,
yymsp
[
0
].
minor
.
yy332
);
yy
gotominor
.
yy480
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy236
,
yymsp
[
0
].
minor
.
yy220
);
}
yymsp
[
-
1
].
minor
.
yy56
=
yylhsminor
.
yy56
;
break
;
case
14
4
:
/* item ::= ids cpxName */
case
14
6
:
/* item ::= ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
tVariantCreate
(
&
yy
lhsminor
.
yy18
6
,
&
yymsp
[
-
1
].
minor
.
yy0
);
tVariantCreate
(
&
yy
gotominor
.
yy23
6
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
yymsp
[
-
1
].
minor
.
yy186
=
yylhsminor
.
yy186
;
break
;
case
14
5
:
/* sortorder ::= ASC */
{
yy
msp
[
0
].
minor
.
yy332
=
TSQL_SO_ASC
;
}
case
14
7
:
/* sortorder ::= ASC */
{
yy
gotominor
.
yy220
=
TSQL_SO_ASC
;
}
break
;
case
14
6
:
/* sortorder ::= DESC */
{
yy
msp
[
0
].
minor
.
yy332
=
TSQL_SO_DESC
;}
case
14
8
:
/* sortorder ::= DESC */
{
yy
gotominor
.
yy220
=
TSQL_SO_DESC
;}
break
;
case
14
7
:
/* sortorder ::= */
{
yy
msp
[
1
].
minor
.
yy332
=
TSQL_SO_ASC
;}
case
14
9
:
/* sortorder ::= */
{
yy
gotominor
.
yy220
=
TSQL_SO_ASC
;}
break
;
case
15
0
:
/* grouplist ::= grouplist COMMA item */
case
15
2
:
/* grouplist ::= grouplist COMMA item */
{
yy
lhsminor
.
yy56
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy56
,
&
yymsp
[
0
].
minor
.
yy18
6
,
-
1
);
yy
gotominor
.
yy480
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy480
,
&
yymsp
[
0
].
minor
.
yy23
6
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy56
=
yylhsminor
.
yy56
;
break
;
case
15
1
:
/* grouplist ::= item */
case
15
3
:
/* grouplist ::= item */
{
yy
lhsminor
.
yy56
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy18
6
,
-
1
);
yy
gotominor
.
yy480
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy23
6
,
-
1
);
}
yymsp
[
0
].
minor
.
yy56
=
yylhsminor
.
yy56
;
break
;
case
15
2
:
/* having_opt ::= */
case
16
2
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
162
);
case
198
:
/* expritem ::= */
yytestcase
(
yyruleno
==
198
);
{
yy
msp
[
1
].
minor
.
yy90
=
0
;}
case
15
4
:
/* having_opt ::= */
case
16
4
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
164
);
case
200
:
/* expritem ::= */
yytestcase
(
yyruleno
==
200
);
{
yy
gotominor
.
yy244
=
0
;}
break
;
case
153
:
/* having_opt ::= HAVING expr */
case
163
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
163
);
{
yymsp
[
-
1
].
minor
.
yy90
=
yymsp
[
0
].
minor
.
yy90
;}
case
155
:
/* having_opt ::= HAVING expr */
case
165
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
165
);
case
199
:
/* expritem ::= expr */
yytestcase
(
yyruleno
==
199
);
{
yygotominor
.
yy244
=
yymsp
[
0
].
minor
.
yy244
;}
break
;
case
15
4
:
/* limit_opt ::= */
case
1
58
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
158
);
{
yy
msp
[
1
].
minor
.
yy294
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy294
.
offset
=
0
;}
case
15
6
:
/* limit_opt ::= */
case
1
60
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
160
);
{
yy
gotominor
.
yy162
.
limit
=
-
1
;
yygotominor
.
yy162
.
offset
=
0
;}
break
;
case
15
5
:
/* limit_opt ::= LIMIT signed */
case
1
59
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
159
);
{
yy
msp
[
-
1
].
minor
.
yy294
.
limit
=
yymsp
[
0
].
minor
.
yy389
;
yymsp
[
-
1
].
minor
.
yy294
.
offset
=
0
;}
case
15
7
:
/* limit_opt ::= LIMIT signed */
case
1
61
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
161
);
{
yy
gotominor
.
yy162
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yygotominor
.
yy162
.
offset
=
0
;}
break
;
case
15
6
:
/* limit_opt ::= LIMIT signed OFFSET signed */
case
16
0
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
yytestcase
(
yyruleno
==
160
);
{
yy
msp
[
-
3
].
minor
.
yy294
.
limit
=
yymsp
[
-
2
].
minor
.
yy389
;
yymsp
[
-
3
].
minor
.
yy294
.
offset
=
yymsp
[
0
].
minor
.
yy38
9
;}
case
15
8
:
/* limit_opt ::= LIMIT signed OFFSET signed */
case
16
2
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
yytestcase
(
yyruleno
==
162
);
{
yy
gotominor
.
yy162
.
limit
=
yymsp
[
-
2
].
minor
.
yy369
;
yygotominor
.
yy162
.
offset
=
yymsp
[
0
].
minor
.
yy36
9
;}
break
;
case
15
7
:
/* limit_opt ::= LIMIT signed COMMA signed */
case
16
1
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
yytestcase
(
yyruleno
==
161
);
{
yy
msp
[
-
3
].
minor
.
yy294
.
limit
=
yymsp
[
0
].
minor
.
yy389
;
yymsp
[
-
3
].
minor
.
yy294
.
offset
=
yymsp
[
-
2
].
minor
.
yy38
9
;}
case
15
9
:
/* limit_opt ::= LIMIT signed COMMA signed */
case
16
3
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
yytestcase
(
yyruleno
==
163
);
{
yy
gotominor
.
yy162
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yygotominor
.
yy162
.
offset
=
yymsp
[
-
2
].
minor
.
yy36
9
;}
break
;
case
16
4
:
/* expr ::= LP expr RP */
{
yy
msp
[
-
2
].
minor
.
yy90
=
yymsp
[
-
1
].
minor
.
yy90
;
}
case
16
6
:
/* expr ::= LP expr RP */
{
yy
gotominor
.
yy244
=
yymsp
[
-
1
].
minor
.
yy244
;
}
break
;
case
165
:
/* expr ::= ID */
{
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
0
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
167
:
/* expr ::= ID */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
break
;
case
166
:
/* expr ::= ID DOT ID */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
168
:
/* expr ::= ID DOT ID */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
break
;
case
167
:
/* expr ::= ID DOT STAR */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
169
:
/* expr ::= ID DOT STAR */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
break
;
case
168
:
/* expr ::= INTEGER */
{
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
0
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
170
:
/* expr ::= INTEGER */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
break
;
case
169
:
/* expr ::= MINUS INTEGER */
case
170
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
170
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
-
1
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
171
:
/* expr ::= MINUS INTEGER */
case
172
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
172
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
break
;
case
171
:
/* expr ::= FLOAT */
{
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
0
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
173
:
/* expr ::= FLOAT */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
break
;
case
172
:
/* expr ::= MINUS FLOAT */
case
173
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
173
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
-
1
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
174
:
/* expr ::= MINUS FLOAT */
case
175
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
175
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
break
;
case
174
:
/* expr ::= STRING */
{
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
yymsp
[
0
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
176
:
/* expr ::= STRING */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
break
;
case
175
:
/* expr ::= NOW */
{
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
yymsp
[
0
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
177
:
/* expr ::= NOW */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
break
;
case
176
:
/* expr ::= VARIABLE */
{
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
0
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
178
:
/* expr ::= VARIABLE */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
break
;
case
177
:
/* expr ::= BOOL */
{
yylhsminor
.
yy90
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
yymsp
[
0
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
179
:
/* expr ::= BOOL */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
break
;
case
1
78
:
/* expr ::= ID LP exprlist RP */
case
1
80
:
/* expr ::= ID LP exprlist RP */
{
yy
lhsminor
.
yy90
=
tSQLExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy498
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
yy
gotominor
.
yy244
=
tSQLExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy284
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy90
=
yylhsminor
.
yy90
;
break
;
case
1
79
:
/* expr ::= ID LP STAR RP */
case
1
81
:
/* expr ::= ID LP STAR RP */
{
yy
lhsminor
.
yy90
=
tSQLExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
yy
gotominor
.
yy244
=
tSQLExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy90
=
yylhsminor
.
yy90
;
break
;
case
180
:
/* expr ::= expr AND expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_AND
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
break
;
case
181
:
/* expr ::= expr OR expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_OR
);
}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
182
:
/* expr ::= expr AND expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_AND
);}
break
;
case
182
:
/* expr ::= expr LT expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_LT
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
183
:
/* expr ::= expr OR expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_OR
);
}
break
;
case
183
:
/* expr ::= expr GT expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_GT
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
184
:
/* expr ::= expr LT expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_LT
);}
break
;
case
184
:
/* expr ::= expr LE expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_LE
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
185
:
/* expr ::= expr GT expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_GT
);}
break
;
case
185
:
/* expr ::= expr GE expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_GE
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
186
:
/* expr ::= expr LE expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_LE
);}
break
;
case
186
:
/* expr ::= expr NE expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_NE
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
187
:
/* expr ::= expr GE expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_GE
);}
break
;
case
187
:
/* expr ::= expr EQ expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_EQ
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
188
:
/* expr ::= expr NE expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_NE
);}
break
;
case
188
:
/* expr ::= expr PLUS expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_PLUS
);
}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
189
:
/* expr ::= expr EQ expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_EQ
);}
break
;
case
189
:
/* expr ::= expr MINUS expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_MINUS
);
}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
190
:
/* expr ::= expr PLUS expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_PLUS
);
}
break
;
case
190
:
/* expr ::= expr STAR expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_STAR
);
}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
191
:
/* expr ::= expr MINUS expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_MINUS
);
}
break
;
case
191
:
/* expr ::= expr SLASH expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_DIVIDE
);}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
192
:
/* expr ::= expr STAR expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_STAR
);
}
break
;
case
192
:
/* expr ::= expr REM expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_REM
);
}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
193
:
/* expr ::= expr SLASH expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_DIVIDE
);}
break
;
case
193
:
/* expr ::= expr LIKE expr */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy90
,
yymsp
[
0
].
minor
.
yy90
,
TK_LIKE
);
}
yymsp
[
-
2
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
194
:
/* expr ::= expr REM expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_REM
);
}
break
;
case
194
:
/* expr ::= expr IN LP exprlist RP */
{
yylhsminor
.
yy90
=
tSQLExprCreate
(
yymsp
[
-
4
].
minor
.
yy90
,
(
tSQLExpr
*
)
yymsp
[
-
1
].
minor
.
yy498
,
TK_IN
);
}
yymsp
[
-
4
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
195
:
/* expr ::= expr LIKE expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_LIKE
);
}
break
;
case
195
:
/* exprlist ::= exprlist COMMA expritem */
case
202
:
/* itemlist ::= itemlist COMMA expr */
yytestcase
(
yyruleno
==
202
);
{
yylhsminor
.
yy498
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy498
,
yymsp
[
0
].
minor
.
yy90
,
0
);}
yymsp
[
-
2
].
minor
.
yy498
=
yylhsminor
.
yy498
;
case
196
:
/* expr ::= expr IN LP exprlist RP */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
4
].
minor
.
yy244
,
(
tSQLExpr
*
)
yymsp
[
-
1
].
minor
.
yy284
,
TK_IN
);
}
break
;
case
196
:
/* exprlist ::= expritem */
case
203
:
/* itemlist ::= expr */
yytestcase
(
yyruleno
==
203
);
{
yylhsminor
.
yy498
=
tSQLExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy90
,
0
);}
yymsp
[
0
].
minor
.
yy498
=
yylhsminor
.
yy498
;
case
197
:
/* exprlist ::= exprlist COMMA expritem */
case
204
:
/* itemlist ::= itemlist COMMA expr */
yytestcase
(
yyruleno
==
204
);
{
yygotominor
.
yy284
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy284
,
yymsp
[
0
].
minor
.
yy244
,
0
);}
break
;
case
19
7
:
/* expritem ::= expr
*/
{
yylhsminor
.
yy90
=
yymsp
[
0
].
minor
.
yy90
;}
yymsp
[
0
].
minor
.
yy90
=
yylhsminor
.
yy90
;
case
19
8
:
/* exprlist ::= expritem
*/
case
205
:
/* itemlist ::= expr */
yytestcase
(
yyruleno
==
205
);
{
yygotominor
.
yy284
=
tSQLExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy244
,
0
);}
break
;
case
199
:
/* cmd ::= INSERT INTO cpxName insert_value_list */
case
201
:
/* cmd ::= INSERT INTO cpxName insert_value_list */
{
tSetInsertSQLElems
(
pInfo
,
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
74
);
tSetInsertSQLElems
(
pInfo
,
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
237
);
}
break
;
case
20
0
:
/* insert_value_list ::= VALUES LP itemlist RP */
{
yy
msp
[
-
3
].
minor
.
yy74
=
tSQLListListAppend
(
NULL
,
yymsp
[
-
1
].
minor
.
yy498
);}
case
20
2
:
/* insert_value_list ::= VALUES LP itemlist RP */
{
yy
gotominor
.
yy237
=
tSQLListListAppend
(
NULL
,
yymsp
[
-
1
].
minor
.
yy284
);}
break
;
case
201
:
/* insert_value_list ::= insert_value_list VALUES LP itemlist RP */
{
yylhsminor
.
yy74
=
tSQLListListAppend
(
yymsp
[
-
4
].
minor
.
yy74
,
yymsp
[
-
1
].
minor
.
yy498
);}
yymsp
[
-
4
].
minor
.
yy74
=
yylhsminor
.
yy74
;
case
203
:
/* insert_value_list ::= insert_value_list VALUES LP itemlist RP */
{
yygotominor
.
yy237
=
tSQLListListAppend
(
yymsp
[
-
4
].
minor
.
yy237
,
yymsp
[
-
1
].
minor
.
yy284
);}
break
;
case
20
4
:
/* cmd ::= RESET QUERY CACHE */
case
20
6
:
/* cmd ::= RESET QUERY CACHE */
{
setDCLSQLElems
(
pInfo
,
RESET_QUERY_CACHE
,
0
);}
break
;
case
20
5
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case
20
7
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy4
7
1
,
NULL
,
ALTER_TABLE_ADD_COLUMN
);
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy4
2
1
,
NULL
,
ALTER_TABLE_ADD_COLUMN
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_ADD_COLUMN
);
}
break
;
case
20
6
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case
20
8
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -2630,14 +2225,14 @@ static void yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_DROP_COLUMN
);
}
break
;
case
20
7
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case
20
9
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy4
7
1
,
NULL
,
ALTER_TABLE_TAGS_ADD
);
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy4
2
1
,
NULL
,
ALTER_TABLE_TAGS_ADD
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_TAGS_ADD
);
}
break
;
case
2
08
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case
2
10
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -2648,7 +2243,7 @@ static void yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_TAGS_DROP
);
}
break
;
case
2
09
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case
2
11
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -2662,48 +2257,56 @@ static void yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_TAGS_CHG
);
}
break
;
case
21
0
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
case
21
2
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
tVariantList
*
A
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
A
=
tVariantListAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
18
6
,
-
1
);
A
=
tVariantListAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
23
6
,
-
1
);
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
6
].
minor
.
yy0
,
NULL
,
A
,
ALTER_TABLE_TAGS_SET
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_TAGS_SET
);
}
break
;
case
21
1
:
/* cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */
case
21
3
:
/* cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
+
yymsp
[
0
].
minor
.
yy0
.
n
);
setDCLSQLElems
(
pInfo
,
KILL_CONNECTION
,
1
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
break
;
case
21
2
:
/* cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */
case
21
4
:
/* cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
+
yymsp
[
-
2
].
minor
.
yy0
.
n
+
yymsp
[
-
1
].
minor
.
yy0
.
n
+
yymsp
[
0
].
minor
.
yy0
.
n
);
setDCLSQLElems
(
pInfo
,
KILL_STREAM
,
1
,
&
yymsp
[
-
4
].
minor
.
yy0
);}
break
;
case
21
3
:
/* cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */
case
21
5
:
/* cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
+
yymsp
[
-
2
].
minor
.
yy0
.
n
+
yymsp
[
-
1
].
minor
.
yy0
.
n
+
yymsp
[
0
].
minor
.
yy0
.
n
);
setDCLSQLElems
(
pInfo
,
KILL_QUERY
,
1
,
&
yymsp
[
-
4
].
minor
.
yy0
);}
break
;
default:
break
;
/********** End reduce actions ************************************************/
};
assert
(
yyruleno
<
sizeof
(
yyRuleInfo
)
/
sizeof
(
yyRuleInfo
[
0
])
);
assert
(
yyruleno
>=
0
&&
yyruleno
<
sizeof
(
yyRuleInfo
)
/
sizeof
(
yyRuleInfo
[
0
])
);
yygoto
=
yyRuleInfo
[
yyruleno
].
lhs
;
yysize
=
yyRuleInfo
[
yyruleno
].
nrhs
;
yyact
=
yy_find_reduce_action
(
yymsp
[
yysize
].
stateno
,(
YYCODETYPE
)
yygoto
);
/* There are no SHIFTREDUCE actions on nonterminals because the table
** generator has simplified them to pure REDUCE actions. */
assert
(
!
(
yyact
>
YY_MAX_SHIFT
&&
yyact
<=
YY_MAX_SHIFTREDUCE
)
);
/* It is not possible for a REDUCE to be followed by an error */
assert
(
yyact
!=
YY_ERROR_ACTION
);
yymsp
+=
yysize
+
1
;
yypParser
->
yytos
=
yymsp
;
yymsp
->
stateno
=
(
YYACTIONTYPE
)
yyact
;
yymsp
->
major
=
(
YYCODETYPE
)
yygoto
;
yyTraceShift
(
yypParser
,
yyact
,
"... then shift"
);
yypParser
->
yyidx
-=
yysize
;
yyact
=
yy_find_reduce_action
(
yymsp
[
-
yysize
].
stateno
,(
YYCODETYPE
)
yygoto
);
if
(
yyact
<=
YY_MAX_SHIFTREDUCE
){
if
(
yyact
>
YY_MAX_SHIFT
)
yyact
+=
YY_MIN_REDUCE
-
YY_MIN_SHIFTREDUCE
;
/* If the reduce action popped at least
** one element off the stack, then we can push the new element back
** onto the stack here, and skip the stack overflow test in yy_shift().
** That gives a significant speed improvement. */
if
(
yysize
){
yypParser
->
yyidx
++
;
yymsp
-=
yysize
-
1
;
yymsp
->
stateno
=
(
YYACTIONTYPE
)
yyact
;
yymsp
->
major
=
(
YYCODETYPE
)
yygoto
;
yymsp
->
minor
=
yygotominor
;
yyTraceShift
(
yypParser
,
yyact
);
}
else
{
yy_shift
(
yypParser
,
yyact
,
yygoto
,
&
yygotominor
);
}
}
else
{
assert
(
yyact
==
YY_ACCEPT_ACTION
);
yy_accept
(
yypParser
);
}
}
/*
...
...
@@ -2719,7 +2322,7 @@ static void yy_parse_failed(
fprintf
(
yyTraceFILE
,
"%sFail!
\n
"
,
yyTracePrompt
);
}
#endif
while
(
yypParser
->
yy
tos
>
yypParser
->
yystack
)
yy_pop_parser_stack
(
yypParser
);
while
(
yypParser
->
yy
idx
>=
0
)
yy_pop_parser_stack
(
yypParser
);
/* Here code is inserted which will be executed whenever the
** parser fails */
/************ Begin %parse_failure code ***************************************/
...
...
@@ -2734,10 +2337,10 @@ static void yy_parse_failed(
static
void
yy_syntax_error
(
yyParser
*
yypParser
,
/* The parser */
int
yymajor
,
/* The major type of the error token */
ParseTOKENTYPE
yyminor
/* The minor type of the error token */
YYMINORTYPE
yyminor
/* The minor type of the error token */
){
ParseARG_FETCH
;
#define TOKEN
yyminor
#define TOKEN
(yyminor.yy0)
/************ Begin %syntax_error code ****************************************/
pInfo
->
validSql
=
false
;
...
...
@@ -2777,10 +2380,7 @@ static void yy_accept(
fprintf
(
yyTraceFILE
,
"%sAccept!
\n
"
,
yyTracePrompt
);
}
#endif
#ifndef YYNOERRORRECOVERY
yypParser
->
yyerrcnt
=
-
1
;
#endif
assert
(
yypParser
->
yytos
==
yypParser
->
yystack
);
while
(
yypParser
->
yyidx
>=
0
)
yy_pop_parser_stack
(
yypParser
);
/* Here code is inserted which will be executed whenever the
** parser accepts */
/*********** Begin %parse_accept code *****************************************/
...
...
@@ -2815,7 +2415,7 @@ void Parse(
ParseARG_PDECL
/* Optional %extra_argument parameter */
){
YYMINORTYPE
yyminorunion
;
unsigned
int
yyact
;
/* The parser action. */
int
yyact
;
/* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
int
yyendofinput
;
/* True if we are at the end of input */
#endif
...
...
@@ -2824,8 +2424,29 @@ void Parse(
#endif
yyParser
*
yypParser
;
/* The parser */
/* (re)initialize the parser, if necessary */
yypParser
=
(
yyParser
*
)
yyp
;
assert
(
yypParser
->
yytos
!=
0
);
if
(
yypParser
->
yyidx
<
0
){
#if YYSTACKDEPTH<=0
if
(
yypParser
->
yystksz
<=
0
){
/*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
yyminorunion
=
yyzerominor
;
yyStackOverflow
(
yypParser
,
&
yyminorunion
);
return
;
}
#endif
yypParser
->
yyidx
=
0
;
yypParser
->
yyerrcnt
=
-
1
;
yypParser
->
yystack
[
0
].
stateno
=
0
;
yypParser
->
yystack
[
0
].
major
=
0
;
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sInitialize. Empty stack. State 0
\n
"
,
yyTracePrompt
);
}
#endif
}
yyminorunion
.
yy0
=
yyminor
;
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
yyendofinput
=
(
yymajor
==
0
);
#endif
...
...
@@ -2833,34 +2454,21 @@ void Parse(
#ifndef NDEBUG
if
(
yyTraceFILE
){
int
stateno
=
yypParser
->
yytos
->
stateno
;
if
(
stateno
<
YY_MIN_REDUCE
){
fprintf
(
yyTraceFILE
,
"%sInput '%s' in state %d
\n
"
,
yyTracePrompt
,
yyTokenName
[
yymajor
],
stateno
);
}
else
{
fprintf
(
yyTraceFILE
,
"%sInput '%s' with pending reduce %d
\n
"
,
yyTracePrompt
,
yyTokenName
[
yymajor
],
stateno
-
YY_MIN_REDUCE
);
}
fprintf
(
yyTraceFILE
,
"%sInput '%s'
\n
"
,
yyTracePrompt
,
yyTokenName
[
yymajor
]);
}
#endif
do
{
yyact
=
yy_find_shift_action
(
yypParser
,(
YYCODETYPE
)
yymajor
);
if
(
yyact
>=
YY_MIN_REDUCE
){
yy_reduce
(
yypParser
,
yyact
-
YY_MIN_REDUCE
,
yymajor
,
yyminor
);
}
else
if
(
yyact
<=
YY_MAX_SHIFTREDUCE
){
yy_shift
(
yypParser
,
yyact
,
yymajor
,
yyminor
);
#ifndef YYNOERRORRECOVERY
if
(
yyact
<=
YY_MAX_SHIFTREDUCE
){
if
(
yyact
>
YY_MAX_SHIFT
)
yyact
+=
YY_MIN_REDUCE
-
YY_MIN_SHIFTREDUCE
;
yy_shift
(
yypParser
,
yyact
,
yymajor
,
&
yyminorunion
);
yypParser
->
yyerrcnt
--
;
#endif
yymajor
=
YYNOCODE
;
}
else
if
(
yyact
==
YY_ACCEPT_ACTION
){
yypParser
->
yytos
--
;
yy_accept
(
yypParser
);
return
;
}
else
if
(
yyact
<=
YY_MAX_REDUCE
){
yy_reduce
(
yypParser
,
yyact
-
YY_MIN_REDUCE
);
}
else
{
assert
(
yyact
==
YY_ERROR_ACTION
);
yyminorunion
.
yy0
=
yyminor
;
#ifdef YYERRORSYMBOL
int
yymx
;
#endif
...
...
@@ -2890,9 +2498,9 @@ void Parse(
**
*/
if
(
yypParser
->
yyerrcnt
<
0
){
yy_syntax_error
(
yypParser
,
yymajor
,
yyminor
);
yy_syntax_error
(
yypParser
,
yymajor
,
yyminor
union
);
}
yymx
=
yypParser
->
yy
tos
->
major
;
yymx
=
yypParser
->
yy
stack
[
yypParser
->
yyidx
].
major
;
if
(
yymx
==
YYERRORSYMBOL
||
yyerrorhit
){
#ifndef NDEBUG
if
(
yyTraceFILE
){
...
...
@@ -2900,26 +2508,26 @@ void Parse(
yyTracePrompt
,
yyTokenName
[
yymajor
]);
}
#endif
yy_destructor
(
yypParser
,
(
YYCODETYPE
)
yymajor
,
&
yyminorunion
);
yy_destructor
(
yypParser
,
(
YYCODETYPE
)
yymajor
,
&
yyminorunion
);
yymajor
=
YYNOCODE
;
}
else
{
while
(
yypParser
->
yytos
>=
yypParser
->
yystack
&&
yymx
!=
YYERRORSYMBOL
&&
(
yyact
=
yy_find_reduce_action
(
yypParser
->
yytos
->
stateno
,
while
(
yypParser
->
yyidx
>=
0
&&
yymx
!=
YYERRORSYMBOL
&&
(
yyact
=
yy_find_reduce_action
(
yypParser
->
yystack
[
yypParser
->
yyidx
].
stateno
,
YYERRORSYMBOL
))
>=
YY_MIN_REDUCE
){
yy_pop_parser_stack
(
yypParser
);
}
if
(
yypParser
->
yy
tos
<
yypParser
->
yystack
||
yymajor
==
0
){
if
(
yypParser
->
yy
idx
<
0
||
yymajor
==
0
){
yy_destructor
(
yypParser
,(
YYCODETYPE
)
yymajor
,
&
yyminorunion
);
yy_parse_failed
(
yypParser
);
#ifndef YYNOERRORRECOVERY
yypParser
->
yyerrcnt
=
-
1
;
#endif
yymajor
=
YYNOCODE
;
}
else
if
(
yymx
!=
YYERRORSYMBOL
){
yy_shift
(
yypParser
,
yyact
,
YYERRORSYMBOL
,
yyminor
);
YYMINORTYPE
u2
;
u2
.
YYERRSYMDT
=
0
;
yy_shift
(
yypParser
,
yyact
,
YYERRORSYMBOL
,
&
u2
);
}
}
yypParser
->
yyerrcnt
=
3
;
...
...
@@ -2932,7 +2540,7 @@ void Parse(
** Applications can set this macro (for example inside %include) if
** they intend to abandon the parse upon the first syntax error seen.
*/
yy_syntax_error
(
yypParser
,
yymajor
,
yyminor
);
yy_syntax_error
(
yypParser
,
yymajor
,
yyminorunion
);
yy_destructor
(
yypParser
,(
YYCODETYPE
)
yymajor
,
&
yyminorunion
);
yymajor
=
YYNOCODE
;
...
...
@@ -2947,29 +2555,24 @@ void Parse(
** three input tokens have been successfully shifted.
*/
if
(
yypParser
->
yyerrcnt
<=
0
){
yy_syntax_error
(
yypParser
,
yymajor
,
yyminor
);
yy_syntax_error
(
yypParser
,
yymajor
,
yyminorunion
);
}
yypParser
->
yyerrcnt
=
3
;
yy_destructor
(
yypParser
,(
YYCODETYPE
)
yymajor
,
&
yyminorunion
);
if
(
yyendofinput
){
yy_parse_failed
(
yypParser
);
#ifndef YYNOERRORRECOVERY
yypParser
->
yyerrcnt
=
-
1
;
#endif
}
yymajor
=
YYNOCODE
;
#endif
}
}
while
(
yymajor
!=
YYNOCODE
&&
yypParser
->
yy
tos
>
yypParser
->
yystack
);
}
while
(
yymajor
!=
YYNOCODE
&&
yypParser
->
yy
idx
>=
0
);
#ifndef NDEBUG
if
(
yyTraceFILE
){
yyStackEntry
*
i
;
char
cDiv
=
'['
;
int
i
;
fprintf
(
yyTraceFILE
,
"%sReturn. Stack="
,
yyTracePrompt
);
for
(
i
=&
yypParser
->
yystack
[
1
];
i
<=
yypParser
->
yytos
;
i
++
){
fprintf
(
yyTraceFILE
,
"%c%s"
,
cDiv
,
yyTokenName
[
i
->
major
]);
cDiv
=
' '
;
}
for
(
i
=
1
;
i
<=
yypParser
->
yyidx
;
i
++
)
fprintf
(
yyTraceFILE
,
"%c%s"
,
i
==
1
?
'['
:
' '
,
yyTokenName
[
yypParser
->
yystack
[
i
].
major
]);
fprintf
(
yyTraceFILE
,
"]
\n
"
);
}
#endif
...
...
src/client/src/tscSQLParser.c
浏览文件 @
495bb309
...
...
@@ -291,7 +291,8 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
case
SHOW_STREAMS
:
case
SHOW_SCORES
:
case
SHOW_GRANTS
:
case
SHOW_CONFIGS
:
{
case
SHOW_CONFIGS
:
case
SHOW_VNODES
:
{
return
setShowInfo
(
pSql
,
pInfo
);
}
...
...
@@ -2595,6 +2596,9 @@ int32_t setShowInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
case
SHOW_CONFIGS
:
pCmd
->
showType
=
TSDB_MGMT_TABLE_CONFIGS
;
break
;
case
SHOW_VNODES
:
pCmd
->
showType
=
TSDB_MGMT_TABLE_VNODES
;
break
;
default:
return
TSDB_CODE_INVALID_SQL
;
}
...
...
@@ -2640,6 +2644,19 @@ int32_t setShowInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
}
}
}
}
else
if
(
type
==
SHOW_VNODES
)
{
// show vnodes may be ip addr of dnode in payload
if
(
pInfo
->
pDCLInfo
->
nTokens
>
0
)
{
SSQLToken
*
pDnodeIp
=
&
pInfo
->
pDCLInfo
->
a
[
0
];
if
(
pDnodeIp
->
n
>
TSDB_IPv4ADDR_LEN
)
{
// ip addr is too long
setErrMsg
(
pCmd
,
msg
);
return
TSDB_CODE_INVALID_SQL
;
}
strncpy
(
pCmd
->
payload
,
pDnodeIp
->
z
,
pDnodeIp
->
n
);
pCmd
->
payloadLen
=
strdequote
(
pCmd
->
payload
);
}
}
return
TSDB_CODE_SUCCESS
;
...
...
src/client/src/tscServer.c
浏览文件 @
495bb309
...
...
@@ -2175,7 +2175,7 @@ int tscBuildShowMsg(SSqlObj *pSql) {
pShowMsg
=
(
SShowMsg
*
)
pMsg
;
pShowMsg
->
type
=
pCmd
->
showType
;
if
((
pShowMsg
->
type
==
TSDB_MGMT_TABLE_TABLE
||
pShowMsg
->
type
==
TSDB_MGMT_TABLE_METRIC
)
&&
pCmd
->
payloadLen
!=
0
)
{
if
((
pShowMsg
->
type
==
TSDB_MGMT_TABLE_TABLE
||
pShowMsg
->
type
==
TSDB_MGMT_TABLE_METRIC
||
pShowMsg
->
type
==
TSDB_MGMT_TABLE_VNODES
)
&&
pCmd
->
payloadLen
!=
0
)
{
// only show tables support wildcard query
pShowMsg
->
payloadLen
=
htons
(
pCmd
->
payloadLen
);
memcpy
(
pShowMsg
->
payload
,
payload
,
pCmd
->
payloadLen
);
...
...
@@ -3652,7 +3652,7 @@ int tscRenewMeterMeta(SSqlObj *pSql, char *meterId) {
*/
if
(
pMeterMetaInfo
->
pMeterMeta
==
NULL
||
!
tscQueryOnMetric
(
pCmd
))
{
if
(
pMeterMetaInfo
->
pMeterMeta
)
{
tscTrace
(
"%p update meter meta, old: numOfTags:%d, numOfCols:%d, uid:%d, addr:%p"
,
pSql
,
tscTrace
(
"%p update meter meta, old: numOfTags:%d, numOfCols:%d, uid:%
ll
d, addr:%p"
,
pSql
,
pMeterMetaInfo
->
numOfTags
,
pCmd
->
numOfCols
,
pMeterMetaInfo
->
pMeterMeta
->
uid
,
pMeterMetaInfo
->
pMeterMeta
);
}
tscWaitingForCreateTable
(
&
pSql
->
cmd
);
...
...
src/inc/sql.y
浏览文件 @
495bb309
...
...
@@ -73,6 +73,9 @@ cmd ::= SHOW CONFIGS. { setDCLSQLElems(pInfo, SHOW_CONFIGS, 0); }
cmd ::= SHOW SCORES. { setDCLSQLElems(pInfo, SHOW_SCORES, 0); }
cmd ::= SHOW GRANTS. { setDCLSQLElems(pInfo, SHOW_GRANTS, 0); }
cmd ::= SHOW VNODES. { setDCLSQLElems(pInfo, SHOW_VNODES, 0); }
cmd ::= SHOW VNODES IPTOKEN(X). { setDCLSQLElems(pInfo, SHOW_VNODES, 1, &X); }
%type dbPrefix {SSQLToken}
dbPrefix(A) ::=. {A.n = 0;}
dbPrefix(A) ::= ids(X) DOT. {A = X; }
...
...
@@ -658,4 +661,4 @@ cmd ::= KILL QUERY IPTOKEN(X) COLON(Z) INTEGER(Y) COLON(K) INTEGER(F). {X
DELIMITERS DESC DETACH EACH END EXPLAIN FAIL FOR GLOB IGNORE IMMEDIATE INITIALLY INSTEAD
LIKE MATCH KEY OF OFFSET RAISE REPLACE RESTRICT ROW STATEMENT TRIGGER VIEW ALL
COUNT SUM AVG MIN MAX FIRST LAST TOP BOTTOM STDDEV PERCENTILE APERCENTILE LEASTSQUARES HISTOGRAM DIFF
SPREAD TWA INTERP LAST_ROW NOW IPTOKEN SEMI NONE PREV LINEAR IMPORT METRIC TBNAME JOIN METRICS STABLE NULL.
\ No newline at end of file
SPREAD TWA INTERP LAST_ROW NOW IPTOKEN SEMI NONE PREV LINEAR IMPORT METRIC TBNAME JOIN METRICS STABLE NULL.
src/inc/taosmsg.h
浏览文件 @
495bb309
...
...
@@ -158,6 +158,7 @@ enum _mgmt_table {
TSDB_MGMT_TABLE_CONNS
,
TSDB_MGMT_TABLE_SCORES
,
TSDB_MGMT_TABLE_GRANTS
,
TSDB_MGMT_TABLE_VNODES
,
TSDB_MGMT_TABLE_MAX
,
};
...
...
@@ -224,7 +225,7 @@ typedef struct {
char
meterId
[
TSDB_UNI_LEN
];
uint16_t
port
;
// for UDP only
char
empty
[
1
];
char
msgType
;
uint8_t
msgType
;
int32_t
msgLen
;
uint8_t
content
[
0
];
}
STaosHeader
;
...
...
src/inc/tglobalcfg.h
浏览文件 @
495bb309
...
...
@@ -256,6 +256,8 @@ SGlobalConfig *tsGetConfigOption(const char *option);
#define TSDB_CFG_OPTION_LEN 24
#define TSDB_CFG_VALUE_LEN 41
#define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
#ifdef __cplusplus
}
#endif
...
...
src/inc/tsqldef.h
浏览文件 @
495bb309
...
...
@@ -72,145 +72,144 @@
#define TK_CONFIGS 54
#define TK_SCORES 55
#define TK_GRANTS 56
#define TK_DOT 57
#define TK_TABLES 58
#define TK_STABLES 59
#define TK_VGROUPS 60
#define TK_DROP 61
#define TK_TABLE 62
#define TK_DATABASE 63
#define TK_DNODE 64
#define TK_IPTOKEN 65
#define TK_USER 66
#define TK_ACCOUNT 67
#define TK_USE 68
#define TK_DESCRIBE 69
#define TK_ALTER 70
#define TK_PASS 71
#define TK_PRIVILEGE 72
#define TK_LOCAL 73
#define TK_IF 74
#define TK_EXISTS 75
#define TK_CREATE 76
#define TK_PPS 77
#define TK_TSERIES 78
#define TK_DBS 79
#define TK_STORAGE 80
#define TK_QTIME 81
#define TK_CONNS 82
#define TK_STATE 83
#define TK_KEEP 84
#define TK_CACHE 85
#define TK_REPLICA 86
#define TK_DAYS 87
#define TK_ROWS 88
#define TK_ABLOCKS 89
#define TK_TBLOCKS 90
#define TK_CTIME 91
#define TK_CLOG 92
#define TK_COMP 93
#define TK_PRECISION 94
#define TK_LP 95
#define TK_RP 96
#define TK_TAGS 97
#define TK_USING 98
#define TK_AS 99
#define TK_COMMA 100
#define TK_NULL 101
#define TK_SELECT 102
#define TK_FROM 103
#define TK_VARIABLE 104
#define TK_INTERVAL 105
#define TK_FILL 106
#define TK_SLIDING 107
#define TK_ORDER 108
#define TK_BY 109
#define TK_ASC 110
#define TK_DESC 111
#define TK_GROUP 112
#define TK_HAVING 113
#define TK_LIMIT 114
#define TK_OFFSET 115
#define TK_SLIMIT 116
#define TK_SOFFSET 117
#define TK_WHERE 118
#define TK_NOW 119
#define TK_INSERT 120
#define TK_INTO 121
#define TK_VALUES 122
#define TK_RESET 123
#define TK_QUERY 124
#define TK_ADD 125
#define TK_COLUMN 126
#define TK_TAG 127
#define TK_CHANGE 128
#define TK_SET 129
#define TK_KILL 130
#define TK_CONNECTION 131
#define TK_COLON 132
#define TK_STREAM 133
#define TK_ABORT 134
#define TK_AFTER 135
#define TK_ATTACH 136
#define TK_BEFORE 137
#define TK_BEGIN 138
#define TK_CASCADE 139
#define TK_CLUSTER 140
#define TK_CONFLICT 141
#define TK_COPY 142
#define TK_DEFERRED 143
#define TK_DELIMITERS 144
#define TK_DETACH 145
#define TK_EACH 146
#define TK_END 147
#define TK_EXPLAIN 148
#define TK_FAIL 149
#define TK_FOR 150
#define TK_IGNORE 151
#define TK_IMMEDIATE 152
#define TK_INITIALLY 153
#define TK_INSTEAD 154
#define TK_MATCH 155
#define TK_KEY 156
#define TK_OF 157
#define TK_RAISE 158
#define TK_REPLACE 159
#define TK_RESTRICT 160
#define TK_ROW 161
#define TK_STATEMENT 162
#define TK_TRIGGER 163
#define TK_VIEW 164
#define TK_ALL 165
#define TK_COUNT 166
#define TK_SUM 167
#define TK_AVG 168
#define TK_MIN 169
#define TK_MAX 170
#define TK_FIRST 171
#define TK_LAST 172
#define TK_TOP 173
#define TK_BOTTOM 174
#define TK_STDDEV 175
#define TK_PERCENTILE 176
#define TK_APERCENTILE 177
#define TK_LEASTSQUARES 178
#define TK_HISTOGRAM 179
#define TK_DIFF 180
#define TK_SPREAD 181
#define TK_TWA 182
#define TK_INTERP 183
#define TK_LAST_ROW 184
#define TK_SEMI 185
#define TK_NONE 186
#define TK_PREV 187
#define TK_LINEAR 188
#define TK_IMPORT 189
#define TK_METRIC 190
#define TK_TBNAME 191
#define TK_JOIN 192
#define TK_METRICS 193
#define TK_STABLE 194
#define TK_VNODES 57
#define TK_IPTOKEN 58
#define TK_DOT 59
#define TK_TABLES 60
#define TK_STABLES 61
#define TK_VGROUPS 62
#define TK_DROP 63
#define TK_TABLE 64
#define TK_DATABASE 65
#define TK_DNODE 66
#define TK_USER 67
#define TK_ACCOUNT 68
#define TK_USE 69
#define TK_DESCRIBE 70
#define TK_ALTER 71
#define TK_PASS 72
#define TK_PRIVILEGE 73
#define TK_LOCAL 74
#define TK_IF 75
#define TK_EXISTS 76
#define TK_CREATE 77
#define TK_PPS 78
#define TK_TSERIES 79
#define TK_DBS 80
#define TK_STORAGE 81
#define TK_QTIME 82
#define TK_CONNS 83
#define TK_STATE 84
#define TK_KEEP 85
#define TK_CACHE 86
#define TK_REPLICA 87
#define TK_DAYS 88
#define TK_ROWS 89
#define TK_ABLOCKS 90
#define TK_TBLOCKS 91
#define TK_CTIME 92
#define TK_CLOG 93
#define TK_COMP 94
#define TK_PRECISION 95
#define TK_LP 96
#define TK_RP 97
#define TK_TAGS 98
#define TK_USING 99
#define TK_AS 100
#define TK_COMMA 101
#define TK_NULL 102
#define TK_SELECT 103
#define TK_FROM 104
#define TK_VARIABLE 105
#define TK_INTERVAL 106
#define TK_FILL 107
#define TK_SLIDING 108
#define TK_ORDER 109
#define TK_BY 110
#define TK_ASC 111
#define TK_DESC 112
#define TK_GROUP 113
#define TK_HAVING 114
#define TK_LIMIT 115
#define TK_OFFSET 116
#define TK_SLIMIT 117
#define TK_SOFFSET 118
#define TK_WHERE 119
#define TK_NOW 120
#define TK_INSERT 121
#define TK_INTO 122
#define TK_VALUES 123
#define TK_RESET 124
#define TK_QUERY 125
#define TK_ADD 126
#define TK_COLUMN 127
#define TK_TAG 128
#define TK_CHANGE 129
#define TK_SET 130
#define TK_KILL 131
#define TK_CONNECTION 132
#define TK_COLON 133
#define TK_STREAM 134
#define TK_ABORT 135
#define TK_AFTER 136
#define TK_ATTACH 137
#define TK_BEFORE 138
#define TK_BEGIN 139
#define TK_CASCADE 140
#define TK_CLUSTER 141
#define TK_CONFLICT 142
#define TK_COPY 143
#define TK_DEFERRED 144
#define TK_DELIMITERS 145
#define TK_DETACH 146
#define TK_EACH 147
#define TK_END 148
#define TK_EXPLAIN 149
#define TK_FAIL 150
#define TK_FOR 151
#define TK_IGNORE 152
#define TK_IMMEDIATE 153
#define TK_INITIALLY 154
#define TK_INSTEAD 155
#define TK_MATCH 156
#define TK_KEY 157
#define TK_OF 158
#define TK_RAISE 159
#define TK_REPLACE 160
#define TK_RESTRICT 161
#define TK_ROW 162
#define TK_STATEMENT 163
#define TK_TRIGGER 164
#define TK_VIEW 165
#define TK_ALL 166
#define TK_COUNT 167
#define TK_SUM 168
#define TK_AVG 169
#define TK_MIN 170
#define TK_MAX 171
#define TK_FIRST 172
#define TK_LAST 173
#define TK_TOP 174
#define TK_BOTTOM 175
#define TK_STDDEV 176
#define TK_PERCENTILE 177
#define TK_APERCENTILE 178
#define TK_LEASTSQUARES 179
#define TK_HISTOGRAM 180
#define TK_DIFF 181
#define TK_SPREAD 182
#define TK_TWA 183
#define TK_INTERP 184
#define TK_LAST_ROW 185
#define TK_SEMI 186
#define TK_NONE 187
#define TK_PREV 188
#define TK_LINEAR 189
#define TK_IMPORT 190
#define TK_METRIC 191
#define TK_TBNAME 192
#define TK_JOIN 193
#define TK_METRICS 194
#define TK_STABLE 195
#endif
src/rpc/src/trpc.c
100644 → 100755
浏览文件 @
495bb309
...
...
@@ -14,7 +14,6 @@
*/
#include "os.h"
#include "shash.h"
#include "taosmsg.h"
#include "tidpool.h"
...
...
@@ -30,6 +29,7 @@
#include "ttimer.h"
#include "tudp.h"
#include "tutil.h"
#include "lz4.h"
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
...
...
@@ -50,8 +50,7 @@ typedef struct {
char
encrypt
;
uint8_t
secret
[
TSDB_KEY_LEN
];
uint8_t
ckey
[
TSDB_KEY_LEN
];
uint16_t
localPort
;
// for UDP only
uint16_t
localPort
;
// for UDP only
uint32_t
peerUid
;
uint32_t
peerIp
;
// peer IP
uint16_t
peerPort
;
// peer port
...
...
@@ -66,7 +65,7 @@ typedef struct {
void
*
chandle
;
// handle passed by TCP/UDP connection layer
void
*
ahandle
;
// handle returned by upper app layter
int
retry
;
int
tretry
;
// total retry
int
tretry
;
// total retry
void
*
pTimer
;
void
*
pIdleTimer
;
char
*
pRspMsg
;
...
...
@@ -79,7 +78,7 @@ typedef struct {
typedef
struct
{
int
sessions
;
void
*
qhandle
;
// for scheduler
void
*
qhandle
;
// for scheduler
SRpcConn
*
connList
;
void
*
idPool
;
void
*
tmrCtrl
;
...
...
@@ -94,11 +93,11 @@ typedef struct rpc_server {
int
mask
;
int
numOfChanns
;
int
numOfThreads
;
int
idMgmt
;
// ID management method
int
idMgmt
;
// ID management method
int
type
;
int
idleTime
;
// milliseconds;
int
noFree
;
// do not free the request msg when rsp is received
int
index
;
// for UDP server, next thread for new connection
int
idleTime
;
// milliseconds;
int
noFree
;
// do not free the request msg when rsp is received
int
index
;
// for UDP server, next thread for new connection
uint16_t
localPort
;
char
label
[
12
];
void
*
(
*
fp
)(
char
*
,
void
*
ahandle
,
void
*
thandle
);
...
...
@@ -107,8 +106,7 @@ typedef struct rpc_server {
SRpcChann
*
channList
;
}
STaosRpc
;
int
tsRpcProgressTime
=
10
;
// milliseocnds
int
tsRpcProgressTime
=
10
;
// milliseocnds
// not configurable
int
tsRpcMaxRetry
;
...
...
@@ -141,6 +139,89 @@ void taosProcessSchedMsg(SSchedMsg *pMsg);
int
taosAuthenticateMsg
(
uint8_t
*
pMsg
,
int
msgLen
,
uint8_t
*
pAuth
,
uint8_t
*
pKey
);
int
taosBuildAuthHeader
(
uint8_t
*
pMsg
,
int
msgLen
,
uint8_t
*
pAuth
,
uint8_t
*
pKey
);
static
int32_t
taosCompressRpcMsg
(
char
*
pCont
,
int32_t
contLen
)
{
STaosHeader
*
pHeader
=
(
STaosHeader
*
)(
pCont
-
sizeof
(
STaosHeader
));
int32_t
overhead
=
sizeof
(
int32_t
)
*
2
;
int32_t
finalLen
=
0
;
if
(
!
NEEDTO_COMPRESSS_MSG
(
contLen
))
{
return
contLen
;
}
char
*
buf
=
malloc
(
contLen
+
overhead
+
8
);
// 16 extra bytes
if
(
buf
==
NULL
)
{
tError
(
"failed to allocate memory for rpc msg compression, contLen:%d, reason:%s"
,
contLen
,
strerror
(
errno
));
return
contLen
;
}
int32_t
compLen
=
LZ4_compress_default
(
pCont
,
buf
,
contLen
,
contLen
+
overhead
);
/*
* only the compressed size is less than the value of contLen - overhead, the compression is applied
* The first four bytes is set to 0, the second four bytes are utilized to keep the original length of message
*/
if
(
compLen
<
contLen
-
overhead
)
{
//tDump(pCont, contLen);
int32_t
*
pLen
=
(
int32_t
*
)
pCont
;
*
pLen
=
0
;
// first 4 bytes must be zero
pLen
=
(
int32_t
*
)(
pCont
+
sizeof
(
int32_t
));
*
pLen
=
htonl
(
contLen
);
// contLen is encoded in second 4 bytes
memcpy
(
pCont
+
overhead
,
buf
,
compLen
);
pHeader
->
comp
=
1
;
tTrace
(
"compress rpc msg, before:%lld, after:%lld"
,
contLen
,
compLen
);
finalLen
=
compLen
+
overhead
;
//tDump(pCont, contLen);
}
else
{
finalLen
=
contLen
;
}
free
(
buf
);
return
finalLen
;
}
static
STaosHeader
*
taosDecompressRpcMsg
(
STaosHeader
*
pHeader
,
SSchedMsg
*
pSchedMsg
,
int32_t
msgLen
)
{
int
overhead
=
sizeof
(
int32_t
)
*
2
;
if
(
pHeader
->
comp
==
0
)
{
pSchedMsg
->
msg
=
(
char
*
)(
&
(
pHeader
->
destId
));
return
pHeader
;
}
// decompress the content
assert
(
GET_INT32_VAL
(
pHeader
->
content
)
==
0
);
// contLen is original message length before compression applied
int
contLen
=
htonl
(
GET_INT32_VAL
(
pHeader
->
content
+
sizeof
(
int32_t
)));
// prepare the temporary buffer to decompress message
char
*
buf
=
malloc
(
sizeof
(
STaosHeader
)
+
contLen
);
//tDump(pHeader->content, msgLen);
if
(
buf
)
{
int32_t
originalLen
=
LZ4_decompress_safe
(
pHeader
->
content
+
overhead
,
buf
+
sizeof
(
STaosHeader
),
msgLen
-
overhead
,
contLen
);
memcpy
(
buf
,
pHeader
,
sizeof
(
STaosHeader
));
free
(
pHeader
);
// free the compressed message buffer
STaosHeader
*
pNewHeader
=
(
STaosHeader
*
)
buf
;
pNewHeader
->
msgLen
=
originalLen
+
(
int
)
sizeof
(
SIntMsg
);
assert
(
originalLen
==
contLen
);
pSchedMsg
->
msg
=
(
char
*
)(
&
(
pNewHeader
->
destId
));
//tDump(pHeader->content, contLen);
return
pNewHeader
;
}
else
{
tError
(
"failed to allocate memory to decompress msg, contLen:%d, reason:%s"
,
contLen
,
strerror
(
errno
));
pSchedMsg
->
msg
=
NULL
;
}
}
char
*
taosBuildReqHeader
(
void
*
param
,
char
type
,
char
*
msg
)
{
STaosHeader
*
pHeader
;
SRpcConn
*
pConn
=
(
SRpcConn
*
)
param
;
...
...
@@ -1074,8 +1155,9 @@ void *taosProcessDataFromPeer(char *data, int dataLen, uint32_t ip, uint16_t por
if
(
code
!=
0
)
{
// parsing error
if
(
pHeader
->
msgType
&
1
)
{
if
(
pHeader
->
msgType
&
1
U
)
{
memset
(
pReply
,
0
,
sizeof
(
pReply
));
msgLen
=
taosBuildErrorMsgToPeer
(
data
,
code
,
pReply
);
(
*
taosSendData
[
pServer
->
type
])(
ip
,
port
,
pReply
,
msgLen
,
chandle
);
tTrace
(
"%s cid:%d sid:%d id:%s, %s is sent with error code:%u pConn:%p"
,
pServer
->
label
,
chann
,
sid
,
...
...
@@ -1090,17 +1172,17 @@ void *taosProcessDataFromPeer(char *data, int dataLen, uint32_t ip, uint16_t por
// parsing OK
// internal communication is based on TAOS protocol, a trick here to make it efficient
pHeader
->
msgLen
=
msgLen
-
(
int
)
sizeof
(
STaosHeader
)
+
(
int
)
sizeof
(
SIntMsg
);
if
(
pHeader
->
spi
)
pHeader
->
msgLen
-=
sizeof
(
STaosDigest
);
if
(
pHeader
->
spi
)
msgLen
-=
sizeof
(
STaosDigest
);
msgLen
-=
(
int
)
sizeof
(
STaosHeader
);
pHeader
->
msgLen
=
msgLen
+
(
int
)
sizeof
(
SIntMsg
);
if
((
pHeader
->
msgType
&
1
)
==
0
&&
(
pHeader
->
content
[
0
]
==
TSDB_CODE_INVALID_VALUE
))
{
if
((
pHeader
->
msgType
&
1
U
)
==
0
&&
(
pHeader
->
content
[
0
]
==
TSDB_CODE_INVALID_VALUE
))
{
schedMsg
.
msg
=
NULL
;
// connection shall be closed
}
else
{
schedMsg
.
msg
=
(
char
*
)(
&
(
pHeader
->
destId
));
// memcpy(schedMsg.msg, (char *)(&(pHeader->destId)), pHeader->msgLen);
pHeader
=
taosDecompressRpcMsg
(
pHeader
,
&
schedMsg
,
msgLen
);
}
if
(
pHeader
->
msgType
<
TSDB_MSG_TYPE_HEARTBEAT
||
(
rpcDebugFlag
&
16
))
{
if
(
pHeader
->
msgType
<
TSDB_MSG_TYPE_HEARTBEAT
||
(
rpcDebugFlag
&
16
U
))
{
tTrace
(
"%s cid:%d sid:%d id:%s, %s is put into queue, msgLen:%d pConn:%p pTimer:%p"
,
pServer
->
label
,
chann
,
sid
,
pHeader
->
meterId
,
taosMsg
[
pHeader
->
msgType
],
pHeader
->
msgLen
,
pConn
,
pConn
->
pTimer
);
}
...
...
@@ -1132,9 +1214,12 @@ int taosSendMsgToPeerH(void *thandle, char *pCont, int contLen, void *ahandle) {
pChann
=
pServer
->
channList
+
pConn
->
chann
;
pHeader
=
(
STaosHeader
*
)(
pCont
-
sizeof
(
STaosHeader
));
msg
=
(
char
*
)
pHeader
;
msgLen
=
contLen
+
(
int32_t
)
sizeof
(
STaosHeader
);
if
((
pHeader
->
msgType
&
1
)
==
0
&&
pConn
->
localPort
)
pHeader
->
port
=
pConn
->
localPort
;
if
((
pHeader
->
msgType
&
1U
)
==
0
&&
pConn
->
localPort
)
pHeader
->
port
=
pConn
->
localPort
;
contLen
=
taosCompressRpcMsg
(
pCont
,
contLen
);
msgLen
=
contLen
+
(
int32_t
)
sizeof
(
STaosHeader
);
if
(
pConn
->
spi
)
{
// add auth part
...
...
@@ -1151,7 +1236,7 @@ int taosSendMsgToPeerH(void *thandle, char *pCont, int contLen, void *ahandle) {
pthread_mutex_lock
(
&
pChann
->
mutex
);
msgType
=
pHeader
->
msgType
;
if
((
msgType
&
1
)
==
0
)
{
if
((
msgType
&
1
U
)
==
0
)
{
// response
pConn
->
inType
=
0
;
tfree
(
pConn
->
pRspMsg
);
...
...
src/system/detail/inc/mgmt.h
浏览文件 @
495bb309
...
...
@@ -410,6 +410,9 @@ int mgmtRetrieveScores(SShowObj *pShow, char *data, int rows, SConnObj *pConn);
int
grantGetGrantsMeta
(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
);
int
grantRetrieveGrants
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
);
int
mgmtGetVnodeMeta
(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
);
int
mgmtRetrieveVnodes
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
);
// dnode balance api
int
mgmtInitBalance
();
void
mgmtCleanupBalance
();
...
...
src/system/detail/src/mgmtDnode.c
浏览文件 @
495bb309
...
...
@@ -389,3 +389,119 @@ int mgmtRetrieveConfigs(SShowObj *pShow, char *data, int rows, SConnObj *pConn)
pShow
->
numOfReads
+=
numOfRows
;
return
numOfRows
;
}
int
mgmtGetVnodeMeta
(
SMeterMeta
*
pMeta
,
SShowObj
*
pShow
,
SConnObj
*
pConn
)
{
int
cols
=
0
;
if
(
strcmp
(
pConn
->
pAcct
->
user
,
"root"
)
!=
0
)
return
TSDB_CODE_NO_RIGHTS
;
SSchema
*
pSchema
=
tsGetSchema
(
pMeta
);
pShow
->
bytes
[
cols
]
=
4
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_INT
;
strcpy
(
pSchema
[
cols
].
name
,
"vnode"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
4
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_INT
;
strcpy
(
pSchema
[
cols
].
name
,
"vgid"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
12
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"status"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pShow
->
bytes
[
cols
]
=
12
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"sync status"
);
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
pMeta
->
numOfColumns
=
htons
(
cols
);
pShow
->
numOfColumns
=
cols
;
pShow
->
offset
[
0
]
=
0
;
for
(
int
i
=
1
;
i
<
cols
;
++
i
)
pShow
->
offset
[
i
]
=
pShow
->
offset
[
i
-
1
]
+
pShow
->
bytes
[
i
-
1
];
// TODO: if other thread drop dnode ????
SDnodeObj
*
pDnode
=
NULL
;
if
(
pShow
->
payloadLen
>
0
)
{
uint32_t
ip
=
ip2uint
(
pShow
->
payload
);
pDnode
=
mgmtGetDnode
(
ip
);
if
(
NULL
==
pDnode
)
{
return
TSDB_CODE_NODE_OFFLINE
;
}
pShow
->
numOfRows
=
pDnode
->
openVnodes
;
pShow
->
pNode
=
pDnode
;
}
else
{
while
(
true
)
{
pShow
->
pNode
=
mgmtGetNextDnode
(
pShow
,
(
SDnodeObj
**
)
&
pDnode
);
if
(
pDnode
==
NULL
)
break
;
pShow
->
numOfRows
+=
pDnode
->
openVnodes
;
if
(
0
==
pShow
->
numOfRows
)
return
TSDB_CODE_NODE_OFFLINE
;
}
pShow
->
pNode
=
NULL
;
}
pShow
->
rowSize
=
pShow
->
offset
[
cols
-
1
]
+
pShow
->
bytes
[
cols
-
1
];
return
0
;
}
int
mgmtRetrieveVnodes
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
)
{
int
numOfRows
=
0
;
SDnodeObj
*
pDnode
=
NULL
;
char
*
pWrite
;
int
cols
=
0
;
char
ipstr
[
20
];
if
(
0
==
rows
)
return
0
;
if
(
pShow
->
payloadLen
)
{
// output the vnodes info of the designated dnode. And output all vnodes of this dnode, instead of rows (max 100)
pDnode
=
(
SDnodeObj
*
)(
pShow
->
pNode
);
if
(
pDnode
!=
NULL
)
{
SVnodeLoad
*
pVnode
;
for
(
int
i
=
0
;
i
<
TSDB_MAX_VNODES
;
i
++
)
{
pVnode
=
&
pDnode
->
vload
[
i
];
if
(
0
==
pVnode
->
vgId
)
{
continue
;
}
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
uint32_t
*
)
pWrite
=
pVnode
->
vnode
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
*
(
uint32_t
*
)
pWrite
=
pVnode
->
vgId
;
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
strcpy
(
pWrite
,
taosGetVnodeStatusStr
(
pVnode
->
status
));
cols
++
;
pWrite
=
data
+
pShow
->
offset
[
cols
]
*
rows
+
pShow
->
bytes
[
cols
]
*
numOfRows
;
strcpy
(
pWrite
,
taosGetVnodeSyncStatusStr
(
pVnode
->
syncStatus
));
cols
++
;
numOfRows
++
;
}
}
}
else
{
// TODO: output all vnodes of all dnodes
numOfRows
=
0
;
}
pShow
->
numOfReads
+=
numOfRows
;
return
numOfRows
;
}
src/system/detail/src/mgmtMeter.c
浏览文件 @
495bb309
...
...
@@ -675,7 +675,7 @@ int mgmtCreateMeter(SDbObj *pDb, SCreateTableMsg *pCreate) {
// send create message to the selected vnode servers
if
(
pCreate
->
numOfTags
==
0
)
{
mTrace
(
"table:%s, send create msg to dnode, vgId:%d, sid:%d, vnode:%d"
,
mTrace
(
"table:%s, send create
table
msg to dnode, vgId:%d, sid:%d, vnode:%d"
,
pMeter
->
meterId
,
pMeter
->
gid
.
vgId
,
pMeter
->
gid
.
sid
,
pVgroup
->
vnodeGid
[
0
].
vnode
);
grantAddTimeSeries
(
pMeter
->
numOfColumns
-
1
);
...
...
src/system/detail/src/mgmtShell.c
浏览文件 @
495bb309
...
...
@@ -788,12 +788,14 @@ int (*mgmtGetMetaFp[])(SMeterMeta *pMeta, SShowObj *pShow, SConnObj *pConn) = {
mgmtGetAcctMeta
,
mgmtGetUserMeta
,
mgmtGetDbMeta
,
mgmtGetMeterMeta
,
mgmtGetDnodeMeta
,
mgmtGetMnodeMeta
,
mgmtGetVgroupMeta
,
mgmtGetMetricMeta
,
mgmtGetModuleMeta
,
mgmtGetQueryMeta
,
mgmtGetStreamMeta
,
mgmtGetConfigMeta
,
mgmtGetConnsMeta
,
mgmtGetScoresMeta
,
grantGetGrantsMeta
,
mgmtGetVnodeMeta
,
};
int
(
*
mgmtRetrieveFp
[])(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
SConnObj
*
pConn
)
=
{
mgmtRetrieveAccts
,
mgmtRetrieveUsers
,
mgmtRetrieveDbs
,
mgmtRetrieveMeters
,
mgmtRetrieveDnodes
,
mgmtRetrieveMnodes
,
mgmtRetrieveVgroups
,
mgmtRetrieveMetrics
,
mgmtRetrieveModules
,
mgmtRetrieveQueries
,
mgmtRetrieveStreams
,
mgmtRetrieveConfigs
,
mgmtRetrieveConns
,
mgmtRetrieveScores
,
grantRetrieveGrants
,
mgmtRetrieveVnodes
,
};
int
mgmtProcessShowMsg
(
char
*
pMsg
,
int
msgLen
,
SConnObj
*
pConn
)
{
...
...
src/system/detail/src/vnodeQueryImpl.c
浏览文件 @
495bb309
...
...
@@ -2952,11 +2952,11 @@ static int32_t vnodeOpenVnodeDBFiles(SQInfo *pQInfo, SQueryFileInfo *pVnodeFiles
pVnodeFiles
->
dataFd
=
open
(
pVnodeFiles
->
dataFilePath
,
O_RDONLY
);
pVnodeFiles
->
lastFd
=
open
(
pVnodeFiles
->
lastFilePath
,
O_RDONLY
);
if
(
stat
(
pVnodeFiles
->
dataFilePath
,
&
fstat
)
<
0
)
return
-
1
;
pVnodeFiles
->
dataFileSize
=
fstat
.
st_size
;
if
(
stat
(
pVnodeFiles
->
lastFilePath
,
&
fstat
)
<
0
)
return
-
1
;
pVnodeFiles
->
lastFileSize
=
fstat
.
st_size
;
//
if (stat(pVnodeFiles->dataFilePath, &fstat) < 0) return -1;
//
pVnodeFiles->dataFileSize = fstat.st_size;
//
//
if (stat(pVnodeFiles->lastFilePath, &fstat) < 0) return -1;
//
pVnodeFiles->lastFileSize = fstat.st_size;
#if DEFAULT_IO_ENGINE == IO_ENGINE_MMAP
/* enforce kernel to preload data when the file is mapping */
...
...
src/system/detail/src/vnodeRead.c
浏览文件 @
495bb309
...
...
@@ -483,13 +483,9 @@ void vnodeFreeQInfo(void *param, bool decQueryRef) {
}
tfree
(
pQuery
->
pGroupbyExpr
);
dTrace
(
"QInfo:%p vid:%d sid:%d meterId:%s, QInfo is freed"
,
pQInfo
,
pObj
->
vnode
,
pObj
->
sid
,
pObj
->
meterId
);
/*
* destory signature, in order to avoid the query process pass the object
* safety check
*/
//destroy signature, in order to avoid the query process pass the object safety check
memset
(
pQInfo
,
0
,
sizeof
(
SQInfo
));
tfree
(
pQInfo
);
}
...
...
src/util/src/tglobalcfg.c
浏览文件 @
495bb309
...
...
@@ -644,6 +644,7 @@ static void doInitGlobalConfig() {
tsInitConfigOption
(
cfg
++
,
"defaultPass"
,
tsDefaultPass
,
TSDB_CFG_VTYPE_STRING
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_NOT_PRINT
,
0
,
0
,
TSDB_PASSWORD_LEN
,
TSDB_CFG_UTYPE_NONE
);
// socket type, udp by default
tsInitConfigOption
(
cfg
++
,
"sockettype"
,
tsSocketType
,
TSDB_CFG_VTYPE_STRING
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_SHOW
,
...
...
src/util/src/ttokenizer.c
浏览文件 @
495bb309
...
...
@@ -224,6 +224,7 @@ static SKeyword keywordTable[] = {
{
"METRICS"
,
TK_METRICS
},
{
"STABLE"
,
TK_STABLE
},
{
"FILE"
,
TK_FILE
},
{
"VNODES"
,
TK_VNODES
},
};
/* This is the hash table */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录