Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
6e35d6c4
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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看板
提交
6e35d6c4
编写于
12月 24, 2019
作者:
L
lihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[1361]
上级
961a6c15
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
581 addition
and
533 deletion
+581
-533
src/client/src/sql.c
src/client/src/sql.c
+524
-517
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+23
-9
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-1
src/inc/sql.y
src/inc/sql.y
+6
-0
src/system/detail/src/mgmtVgroup.c
src/system/detail/src/mgmtVgroup.c
+26
-6
未找到文件。
src/client/src/sql.c
浏览文件 @
6e35d6c4
...
...
@@ -22,8 +22,6 @@
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#pragma GCC diagnostic ignored "-Wunused-variable"
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/
...
...
@@ -122,16 +120,16 @@ typedef union {
#define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo
#define ParseARG_STORE yypParser->pInfo = pInfo
#define YYFALLBACK 1
#define YYNSTATE 25
2
#define YYNRULE 21
6
#define YY_MAX_SHIFT 25
1
#define YY_MIN_SHIFTREDUCE 40
3
#define YY_MAX_SHIFTREDUCE 6
18
#define YY_MIN_REDUCE 6
19
#define YY_MAX_REDUCE 83
4
#define YY_ERROR_ACTION 83
5
#define YY_ACCEPT_ACTION 83
6
#define YY_NO_ACTION 8
37
#define YYNSTATE 25
3
#define YYNRULE 21
7
#define YY_MAX_SHIFT 25
2
#define YY_MIN_SHIFTREDUCE 40
4
#define YY_MAX_SHIFTREDUCE 6
20
#define YY_MIN_REDUCE 6
21
#define YY_MAX_REDUCE 83
7
#define YY_ERROR_ACTION 83
8
#define YY_ACCEPT_ACTION 83
9
#define YY_NO_ACTION 8
40
/************* End control #defines *******************************************/
/* The yyzerominor constant is used to initialize instances of
...
...
@@ -203,62 +201,62 @@ static const YYMINORTYPE yyzerominor = { 0 };
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (53
1
)
#define YY_ACTTAB_COUNT (53
4
)
static
const
YYACTIONTYPE
yy_action
[]
=
{
/* 0 */
44
3
,
74
,
78
,
244
,
85
,
77
,
153
,
249
,
444
,
836
,
/* 10 */
25
1
,
80
,
43
,
45
,
7
,
37
,
38
,
62
,
111
,
171
,
/* 20 */
31
,
44
3
,
443
,
205
,
41
,
39
,
42
,
40
,
241
,
444
,
/* 30 */
44
4
,
135
,
36
,
35
,
10
,
101
,
34
,
33
,
32
,
43
,
/* 40 */
45
,
60
0
,
37
,
38
,
156
,
524
,
135
,
31
,
135
,
133
,
/* 50 */
20
5
,
41
,
39
,
42
,
40
,
159
,
601
,
158
,
601
,
36
,
/* 60 */
35
,
15
4
,
514
,
34
,
33
,
32
,
404
,
405
,
406
,
407
,
/* 70 */
40
8
,
409
,
410
,
411
,
412
,
413
,
414
,
415
,
250
,
21
,
/* 80 */
43
,
45
,
17
2
,
37
,
38
,
227
,
226
,
202
,
31
,
59
,
/* 90 */
21
,
20
5
,
41
,
39
,
42
,
40
,
34
,
33
,
32
,
57
,
/* 100 */
36
,
35
,
55
0
,
551
,
34
,
33
,
32
,
45
,
232
,
37
,
/* 110 */
38
,
16
7
,
132
,
511
,
31
,
21
,
21
,
205
,
41
,
39
,
/* 120 */
42
,
40
,
16
8
,
569
,
511
,
502
,
36
,
35
,
134
,
178
,
/* 130 */
34
,
33
,
32
,
24
3
,
37
,
38
,
186
,
512
,
183
,
31
,
/* 140 */
53
2
,
101
,
205
,
41
,
39
,
42
,
40
,
228
,
233
,
511
,
/* 150 */
51
1
,
36
,
35
,
230
,
229
,
34
,
33
,
32
,
17
,
219
,
/* 160 */
24
2
,
218
,
217
,
216
,
215
,
214
,
213
,
212
,
211
,
496
,
/* 170 */
1
39
,
485
,
486
,
487
,
488
,
489
,
490
,
491
,
492
,
493
,
/* 180 */
49
4
,
495
,
163
,
582
,
11
,
97
,
573
,
133
,
576
,
529
,
/* 190 */
5
79
,
597
,
163
,
582
,
166
,
556
,
573
,
200
,
576
,
155
,
/* 200 */
5
79
,
36
,
35
,
148
,
220
,
34
,
33
,
32
,
21
,
87
,
/* 210 */
86
,
14
2
,
514
,
243
,
160
,
161
,
101
,
147
,
204
,
248
,
/* 220 */
24
7
,
426
,
514
,
76
,
160
,
161
,
163
,
582
,
530
,
241
,
/* 230 */
57
3
,
101
,
576
,
513
,
579
,
193
,
41
,
39
,
42
,
40
,
/* 240 */
24
2
,
596
,
510
,
27
,
36
,
35
,
49
,
571
,
34
,
33
,
/* 250 */
32
,
11
4
,
115
,
224
,
65
,
68
,
505
,
441
,
160
,
161
,
/* 260 */
12
4
,
192
,
518
,
50
,
188
,
515
,
499
,
516
,
498
,
517
,
/* 270 */
55
5
,
150
,
128
,
126
,
245
,
89
,
88
,
44
,
450
,
442
,
/* 280 */
61
,
12
4
,
124
,
572
,
595
,
60
,
581
,
44
,
575
,
527
,
/* 290 */
5
78
,
28
,
18
,
169
,
170
,
605
,
581
,
162
,
606
,
29
,
/* 300 */
54
1
,
580
,
29
,
542
,
47
,
52
,
599
,
15
,
151
,
583
,
/* 310 */
14
,
58
0
,
574
,
14
,
577
,
508
,
73
,
72
,
507
,
47
,
/* 320 */
53
,
44
,
22
,
2
09
,
522
,
152
,
523
,
22
,
140
,
520
,
/* 330 */
58
1
,
521
,
9
,
8
,
2
,
84
,
83
,
141
,
143
,
144
,
/* 340 */
14
5
,
615
,
146
,
137
,
131
,
580
,
138
,
136
,
531
,
566
,
/* 350 */
9
8
,
565
,
164
,
562
,
561
,
165
,
231
,
548
,
547
,
189
,
/* 360 */
11
2
,
113
,
519
,
452
,
110
,
210
,
129
,
25
,
191
,
223
,
/* 370 */
22
5
,
614
,
70
,
613
,
611
,
116
,
470
,
26
,
23
,
130
,
/* 380 */
4
39
,
91
,
79
,
437
,
81
,
435
,
434
,
537
,
194
,
198
,
/* 390 */
17
3
,
54
,
125
,
432
,
431
,
430
,
428
,
421
,
525
,
127
,
/* 400 */
42
5
,
51
,
423
,
102
,
46
,
203
,
103
,
104
,
95
,
199
,
/* 410 */
201
,
535
,
197
,
30
,
536
,
549
,
195
,
27
,
222
,
75
,
/* 420 */
23
4
,
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 */
12
3
,
92
,
509
,
1
,
24
,
182
,
107
,
105
,
106
,
108
,
/* 460 */
10
9
,
179
,
181
,
616
,
184
,
185
,
12
,
609
,
190
,
187
,
/* 470 */
1
3
,
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
,
/* 0 */
44
5
,
74
,
78
,
245
,
85
,
77
,
154
,
250
,
446
,
839
,
/* 10 */
25
2
,
80
,
43
,
45
,
7
,
37
,
38
,
62
,
112
,
172
,
/* 20 */
31
,
44
5
,
445
,
206
,
41
,
39
,
42
,
40
,
242
,
446
,
/* 30 */
44
6
,
136
,
36
,
35
,
10
,
102
,
34
,
33
,
32
,
43
,
/* 40 */
45
,
60
2
,
37
,
38
,
157
,
526
,
136
,
31
,
136
,
134
,
/* 50 */
20
6
,
41
,
39
,
42
,
40
,
160
,
603
,
159
,
603
,
36
,
/* 60 */
35
,
15
5
,
516
,
34
,
33
,
32
,
405
,
406
,
407
,
408
,
/* 70 */
40
9
,
410
,
411
,
412
,
413
,
414
,
415
,
416
,
251
,
21
,
/* 80 */
43
,
45
,
17
3
,
37
,
38
,
228
,
227
,
203
,
31
,
59
,
/* 90 */
21
,
20
6
,
41
,
39
,
42
,
40
,
34
,
33
,
32
,
57
,
/* 100 */
36
,
35
,
55
2
,
553
,
34
,
33
,
32
,
45
,
233
,
37
,
/* 110 */
38
,
16
8
,
133
,
513
,
31
,
21
,
21
,
206
,
41
,
39
,
/* 120 */
42
,
40
,
16
9
,
571
,
513
,
504
,
36
,
35
,
135
,
179
,
/* 130 */
34
,
33
,
32
,
24
4
,
37
,
38
,
187
,
514
,
184
,
31
,
/* 140 */
53
4
,
102
,
206
,
41
,
39
,
42
,
40
,
229
,
234
,
513
,
/* 150 */
51
3
,
36
,
35
,
231
,
230
,
34
,
33
,
32
,
17
,
220
,
/* 160 */
24
3
,
219
,
218
,
217
,
216
,
215
,
214
,
213
,
212
,
498
,
/* 170 */
1
40
,
487
,
488
,
489
,
490
,
491
,
492
,
493
,
494
,
495
,
/* 180 */
49
6
,
497
,
164
,
584
,
11
,
98
,
575
,
134
,
578
,
531
,
/* 190 */
5
81
,
599
,
164
,
584
,
167
,
558
,
575
,
201
,
578
,
156
,
/* 200 */
5
81
,
36
,
35
,
149
,
221
,
34
,
33
,
32
,
21
,
87
,
/* 210 */
86
,
14
3
,
516
,
244
,
161
,
162
,
102
,
148
,
205
,
249
,
/* 220 */
24
8
,
93
,
516
,
76
,
161
,
162
,
164
,
584
,
532
,
242
,
/* 230 */
57
5
,
102
,
578
,
515
,
581
,
194
,
41
,
39
,
42
,
40
,
/* 240 */
24
3
,
598
,
512
,
27
,
36
,
35
,
49
,
573
,
34
,
33
,
/* 250 */
32
,
11
5
,
116
,
225
,
65
,
68
,
507
,
443
,
161
,
162
,
/* 260 */
12
5
,
193
,
520
,
50
,
189
,
517
,
501
,
518
,
500
,
519
,
/* 270 */
55
7
,
151
,
129
,
127
,
246
,
89
,
88
,
44
,
452
,
444
,
/* 280 */
61
,
12
5
,
125
,
574
,
597
,
60
,
583
,
44
,
577
,
529
,
/* 290 */
5
80
,
28
,
18
,
170
,
171
,
607
,
583
,
163
,
608
,
29
,
/* 300 */
54
3
,
582
,
29
,
544
,
47
,
52
,
601
,
15
,
152
,
585
,
/* 310 */
14
,
58
2
,
576
,
14
,
579
,
510
,
73
,
72
,
509
,
47
,
/* 320 */
53
,
44
,
22
,
2
10
,
524
,
153
,
525
,
22
,
141
,
522
,
/* 330 */
58
3
,
523
,
9
,
8
,
2
,
84
,
83
,
142
,
144
,
145
,
/* 340 */
14
6
,
617
,
147
,
138
,
132
,
582
,
139
,
137
,
533
,
568
,
/* 350 */
9
9
,
567
,
165
,
564
,
563
,
166
,
232
,
550
,
549
,
190
,
/* 360 */
11
3
,
114
,
521
,
454
,
111
,
211
,
130
,
25
,
192
,
224
,
/* 370 */
22
6
,
616
,
70
,
615
,
613
,
117
,
472
,
26
,
23
,
131
,
/* 380 */
4
41
,
91
,
79
,
439
,
81
,
437
,
436
,
539
,
195
,
199
,
/* 390 */
17
4
,
54
,
126
,
434
,
433
,
432
,
430
,
422
,
527
,
128
,
/* 400 */
42
8
,
51
,
426
,
103
,
46
,
204
,
104
,
424
,
202
,
200
,
/* 410 */
198
,
96
,
196
,
30
,
537
,
538
,
551
,
27
,
223
,
75
,
/* 420 */
23
5
,
236
,
237
,
238
,
239
,
208
,
240
,
241
,
247
,
55
,
/* 430 */
620
,
175
,
150
,
176
,
63
,
66
,
178
,
177
,
619
,
181
,
/* 440 */
435
,
180
,
182
,
429
,
120
,
183
,
119
,
473
,
118
,
121
,
/* 450 */
12
2
,
124
,
123
,
90
,
92
,
511
,
1
,
24
,
107
,
105
,
/* 460 */
10
8
,
106
,
109
,
618
,
185
,
110
,
186
,
611
,
97
,
188
,
/* 470 */
1
2
,
13
,
191
,
540
,
58
,
100
,
158
,
545
,
197
,
101
,
/* 480 */
4
,
64
,
485
,
586
,
3
,
19
,
20
,
5
,
16
,
207
,
/* 490 */
6
,
209
,
484
,
483
,
482
,
481
,
480
,
479
,
478
,
476
,
/* 500 */
47
,
222
,
449
,
67
,
451
,
22
,
506
,
48
,
505
,
503
,
/* 510 */
56
,
470
,
468
,
460
,
466
,
462
,
464
,
69
,
71
,
458
,
/* 520 */
456
,
477
,
475
,
82
,
431
,
447
,
94
,
420
,
418
,
621
,
/* 530 */
623
,
623
,
623
,
95
,
};
static
const
YYCODETYPE
yy_lookahead
[]
=
{
/* 0 */
1
,
64
,
65
,
66
,
67
,
68
,
199
,
200
,
9
,
197
,
...
...
@@ -301,25 +299,25 @@ static const YYCODETYPE yy_lookahead[] = {
/* 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
,
2
43
,
201
,
108
,
/* 410 */
1
13
,
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 */
2
08
,
202
,
233
,
206
,
203
,
58
,
240
,
242
,
241
,
239
,
/* 460 */
2
38
,
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
,
/* 400 */
200
,
117
,
200
,
245
,
114
,
109
,
244
,
2
00
,
113
,
108
,
/* 410 */
1
07
,
201
,
106
,
119
,
201
,
201
,
201
,
103
,
75
,
84
,
/* 420 */
83
,
49
,
80
,
82
,
53
,
201
,
81
,
79
,
75
,
201
,
/* 430 */
5
,
133
,
201
,
5
,
205
,
205
,
58
,
133
,
5
,
5
,
/* 440 */
201
,
133
,
133
,
201
,
209
,
58
,
213
,
215
,
214
,
212
,
/* 450 */
2
10
,
208
,
211
,
202
,
202
,
233
,
206
,
203
,
241
,
243
,
/* 460 */
2
40
,
242
,
239
,
5
,
133
,
238
,
58
,
86
,
122
,
125
,
/* 470 */
96
,
96
,
123
,
97
,
101
,
96
,
1
,
97
,
96
,
96
,
/* 480 */
110
,
72
,
9
,
97
,
96
,
101
,
101
,
110
,
96
,
98
,
/* 490 */
96
,
98
,
5
,
5
,
5
,
5
,
1
,
5
,
5
,
5
,
/* 500 */
101
,
15
,
76
,
72
,
58
,
101
,
5
,
16
,
5
,
97
,
/* 510 */
96
,
5
,
5
,
5
,
5
,
5
,
5
,
128
,
128
,
5
,
/* 520 */
5
,
5
,
5
,
58
,
58
,
76
,
21
,
59
,
58
,
0
,
/* 530 */
261
,
261
,
261
,
21
,
};
#define YY_SHIFT_USE_DFLT (-83)
#define YY_SHIFT_COUNT (25
1
)
#define YY_SHIFT_COUNT (25
2
)
#define YY_SHIFT_MIN (-82)
#define YY_SHIFT_MAX (52
8
)
#define YY_SHIFT_MAX (52
9
)
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
,
...
...
@@ -330,28 +328,28 @@ static const short yy_shift_ofst[] = {
/* 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
,
28
2
,
/* 100 */
282
,
322
,
276
,
284
,
290
,
296
,
297
,
301
,
305
,
310
,
/* 110 */
294
,
314
,
322
,
322
,
343
,
343
,
322
,
335
,
337
,
372
,
/* 120 */
3
42
,
341
,
373
,
346
,
349
,
322
,
354
,
322
,
354
,
-
8
3
,
/* 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 */
2
83
,
307
,
246
,
238
,
145
,
204
,
218
,
221
,
226
,
319
,
/* 170 */
3
24
,
189
,
205
,
263
,
426
,
303
,
429
,
304
,
380
,
434
,
/* 180 */
328
,
435
,
329
,
397
,
458
,
331
,
407
,
381
,
344
,
370
,
/* 190 */
374
,
3
45
,
350
,
375
,
376
,
378
,
470
,
379
,
382
,
384
,
/* 200 */
3
77
,
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 */
51
2
,
513
,
514
,
516
,
464
,
465
,
448
,
506
,
509
,
466
,
/* 250 */
468
,
528
,
/* 90 */
20
,
20
,
20
,
20
,
20
,
20
,
236
,
322
,
322
,
32
2
,
/* 100 */
282
,
282
,
322
,
276
,
284
,
290
,
296
,
295
,
301
,
303
,
/* 110 */
306
,
294
,
314
,
322
,
322
,
343
,
343
,
322
,
335
,
337
,
/* 120 */
3
72
,
342
,
341
,
371
,
345
,
348
,
322
,
353
,
322
,
35
3
,
/* 130 */
-
83
,
-
83
,
26
,
67
,
67
,
67
,
67
,
67
,
93
,
118
,
/* 140 */
211
,
211
,
211
,
-
63
,
168
,
168
,
168
,
168
,
187
,
208
,
/* 150 */
-
44
,
4
,
59
,
59
,
159
,
198
,
201
,
203
,
206
,
209
,
/* 160 */
2
12
,
283
,
307
,
246
,
238
,
145
,
204
,
218
,
221
,
226
,
/* 170 */
3
19
,
324
,
189
,
205
,
263
,
425
,
298
,
428
,
304
,
378
,
/* 180 */
433
,
308
,
434
,
309
,
387
,
458
,
331
,
408
,
381
,
344
,
/* 190 */
374
,
3
75
,
349
,
346
,
373
,
376
,
379
,
475
,
382
,
380
,
/* 200 */
3
83
,
384
,
370
,
385
,
377
,
386
,
388
,
392
,
391
,
394
,
/* 210 */
393
,
409
,
473
,
487
,
488
,
489
,
490
,
495
,
492
,
493
,
/* 220 */
494
,
399
,
426
,
486
,
431
,
446
,
491
,
389
,
390
,
404
,
/* 230 */
501
,
503
,
412
,
414
,
404
,
506
,
507
,
508
,
509
,
510
,
/* 240 */
51
1
,
514
,
515
,
516
,
517
,
465
,
466
,
449
,
505
,
512
,
/* 250 */
468
,
470
,
529
,
};
#define YY_REDUCE_USE_DFLT (-218)
#define YY_REDUCE_COUNT (13
0
)
#define YY_REDUCE_COUNT (13
1
)
#define YY_REDUCE_MIN (-217)
#define YY_REDUCE_MAX (25
1
)
#define YY_REDUCE_MAX (25
4
)
static
const
short
yy_reduce_ofst
[]
=
{
/* 0 */
-
188
,
-
47
,
-
202
,
-
200
,
-
59
,
-
165
,
-
121
,
-
110
,
-
85
,
-
84
,
/* 10 */
-
60
,
-
193
,
-
199
,
-
61
,
-
217
,
-
173
,
-
23
,
-
13
,
-
15
,
16
,
...
...
@@ -362,39 +360,39 @@ static const short yy_reduce_ofst[] = {
/* 60 */
103
,
127
,
160
,
161
,
163
,
165
,
166
,
167
,
169
,
170
,
/* 70 */
171
,
172
,
173
,
174
,
175
,
176
,
177
,
178
,
179
,
180
,
/* 80 */
182
,
183
,
184
,
185
,
186
,
190
,
192
,
193
,
194
,
195
,
/* 90 */
196
,
197
,
199
,
200
,
202
,
109
,
207
,
210
,
213
,
137
,
/* 100 */
13
8
,
214
,
152
,
158
,
162
,
164
,
215
,
217
,
216
,
220
,
/* 110 */
22
2
,
219
,
223
,
224
,
227
,
228
,
229
,
230
,
232
,
231
,
/* 120 */
233
,
235
,
23
9
,
237
,
242
,
234
,
241
,
240
,
249
,
247
,
/* 130 */
25
1
,
/* 90 */
196
,
197
,
199
,
200
,
202
,
207
,
109
,
210
,
213
,
214
,
/* 100 */
13
7
,
138
,
215
,
152
,
158
,
162
,
216
,
219
,
217
,
220
,
/* 110 */
22
3
,
227
,
222
,
224
,
228
,
229
,
230
,
231
,
232
,
234
,
/* 120 */
233
,
235
,
23
7
,
240
,
241
,
243
,
239
,
251
,
242
,
252
,
/* 130 */
25
0
,
254
,
};
static
const
YYACTIONTYPE
yy_default
[]
=
{
/* 0 */
83
5
,
667
,
819
,
819
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 10 */
7
49
,
634
,
835
,
835
,
819
,
835
,
835
,
835
,
835
,
835
,
/* 20 */
83
5
,
835
,
835
,
669
,
656
,
669
,
669
,
744
,
835
,
835
,
/* 30 */
83
5
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 40 */
83
5
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 50 */
83
5
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
768
,
/* 60 */
7
68
,
742
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 70 */
83
5
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
654
,
/* 80 */
83
5
,
652
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 90 */
83
5
,
835
,
835
,
835
,
835
,
835
,
636
,
636
,
636
,
835
,
/* 100 */
83
5
,
636
,
775
,
779
,
773
,
761
,
769
,
760
,
756
,
755
,
/* 110 */
7
83
,
835
,
636
,
636
,
664
,
664
,
636
,
685
,
683
,
681
,
/* 120 */
6
73
,
679
,
675
,
677
,
671
,
636
,
662
,
636
,
662
,
700
,
/* 130 */
7
13
,
835
,
823
,
824
,
784
,
818
,
774
,
802
,
801
,
81
4
,
/* 140 */
8
08
,
807
,
835
,
806
,
805
,
804
,
803
,
835
,
835
,
835
,
/* 150 */
83
5
,
810
,
809
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 160 */
83
5
,
835
,
835
,
786
,
780
,
776
,
835
,
835
,
835
,
835
,
/* 170 */
83
5
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 180 */
83
5
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 190 */
83
5
,
820
,
835
,
750
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 200 */
770
,
835
,
762
,
835
,
835
,
835
,
835
,
835
,
835
,
722
,
/* 210 */
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 220 */
688
,
835
,
835
,
835
,
835
,
835
,
835
,
835
,
828
,
835
,
/* 230 */
83
5
,
835
,
716
,
826
,
835
,
835
,
835
,
835
,
835
,
835
,
/* 240 */
83
5
,
835
,
835
,
835
,
835
,
835
,
835
,
640
,
638
,
835
,
/* 250 */
632
,
835
,
/* 0 */
83
8
,
670
,
822
,
822
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 10 */
7
52
,
636
,
838
,
838
,
822
,
838
,
838
,
838
,
838
,
838
,
/* 20 */
83
8
,
838
,
838
,
672
,
659
,
672
,
672
,
747
,
838
,
838
,
/* 30 */
83
8
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 40 */
83
8
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 50 */
83
8
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
771
,
/* 60 */
7
71
,
745
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 70 */
83
8
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
657
,
/* 80 */
83
8
,
655
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 90 */
83
8
,
838
,
838
,
644
,
838
,
838
,
838
,
638
,
638
,
638
,
/* 100 */
83
8
,
838
,
638
,
778
,
782
,
776
,
764
,
772
,
763
,
759
,
/* 110 */
7
58
,
786
,
838
,
638
,
638
,
667
,
667
,
638
,
688
,
686
,
/* 120 */
6
84
,
676
,
682
,
678
,
680
,
674
,
638
,
665
,
638
,
665
,
/* 130 */
7
03
,
716
,
838
,
826
,
827
,
787
,
821
,
777
,
805
,
80
4
,
/* 140 */
8
17
,
811
,
810
,
838
,
809
,
808
,
807
,
806
,
838
,
838
,
/* 150 */
83
8
,
838
,
813
,
812
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 160 */
83
8
,
838
,
838
,
838
,
789
,
783
,
779
,
838
,
838
,
838
,
/* 170 */
83
8
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 180 */
83
8
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 190 */
83
8
,
838
,
823
,
838
,
753
,
838
,
838
,
838
,
838
,
838
,
/* 200 */
838
,
773
,
838
,
765
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 210 */
725
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
/* 220 */
838
,
691
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
831
,
/* 230 */
83
8
,
838
,
838
,
719
,
829
,
838
,
838
,
838
,
838
,
838
,
/* 240 */
83
8
,
838
,
838
,
838
,
838
,
838
,
838
,
838
,
642
,
640
,
/* 250 */
838
,
634
,
838
,
};
/********** End of lemon-generated parsing tables *****************************/
...
...
@@ -789,198 +787,199 @@ static const char *const yyRuleName[] = {
/* 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"
,
/* 24 */
"cmd ::= SHOW dbPrefix VGROUPS ids"
,
/* 25 */
"cmd ::= DROP TABLE ifexists ids cpxName"
,
/* 26 */
"cmd ::= DROP DATABASE ifexists ids"
,
/* 27 */
"cmd ::= DROP DNODE IPTOKEN"
,
/* 28 */
"cmd ::= DROP USER ids"
,
/* 29 */
"cmd ::= DROP ACCOUNT ids"
,
/* 30 */
"cmd ::= USE ids"
,
/* 31 */
"cmd ::= DESCRIBE ids cpxName"
,
/* 32 */
"cmd ::= ALTER USER ids PASS ids"
,
/* 33 */
"cmd ::= ALTER USER ids PRIVILEGE ids"
,
/* 34 */
"cmd ::= ALTER DNODE IPTOKEN ids"
,
/* 35 */
"cmd ::= ALTER DNODE IPTOKEN ids ids"
,
/* 36 */
"cmd ::= ALTER LOCAL ids"
,
/* 37 */
"cmd ::= ALTER LOCAL ids ids"
,
/* 38 */
"cmd ::= ALTER DATABASE ids alter_db_optr"
,
/* 39 */
"cmd ::= ALTER ACCOUNT ids acct_optr"
,
/* 40 */
"cmd ::= ALTER ACCOUNT ids PASS ids acct_optr"
,
/* 41 */
"ids ::= ID"
,
/* 42 */
"ids ::= STRING"
,
/* 43 */
"ifexists ::= IF EXISTS"
,
/* 44 */
"ifexists ::="
,
/* 45 */
"ifnotexists ::= IF NOT EXISTS"
,
/* 46 */
"ifnotexists ::="
,
/* 47 */
"cmd ::= CREATE DNODE IPTOKEN"
,
/* 48 */
"cmd ::= CREATE ACCOUNT ids PASS ids acct_optr"
,
/* 49 */
"cmd ::= CREATE DATABASE ifnotexists ids db_optr"
,
/* 50 */
"cmd ::= CREATE USER ids PASS ids"
,
/* 51 */
"pps ::="
,
/* 52 */
"pps ::= PPS INTEGER"
,
/* 53 */
"tseries ::="
,
/* 54 */
"tseries ::= TSERIES INTEGER"
,
/* 55 */
"dbs ::="
,
/* 56 */
"dbs ::= DBS INTEGER"
,
/* 57 */
"streams ::="
,
/* 58 */
"streams ::= STREAMS INTEGER"
,
/* 59 */
"storage ::="
,
/* 60 */
"storage ::= STORAGE INTEGER"
,
/* 61 */
"qtime ::="
,
/* 62 */
"qtime ::= QTIME INTEGER"
,
/* 63 */
"users ::="
,
/* 64 */
"users ::= USERS INTEGER"
,
/* 65 */
"conns ::="
,
/* 66 */
"conns ::= CONNS INTEGER"
,
/* 67 */
"state ::="
,
/* 68 */
"state ::= STATE ids"
,
/* 69 */
"acct_optr ::= pps tseries storage streams qtime dbs users conns state"
,
/* 70 */
"keep ::= KEEP tagitemlist"
,
/* 71 */
"tables ::= TABLES INTEGER"
,
/* 72 */
"cache ::= CACHE INTEGER"
,
/* 73 */
"replica ::= REPLICA INTEGER"
,
/* 74 */
"days ::= DAYS INTEGER"
,
/* 75 */
"rows ::= ROWS INTEGER"
,
/* 76 */
"ablocks ::= ABLOCKS ID"
,
/* 77 */
"tblocks ::= TBLOCKS INTEGER"
,
/* 78 */
"ctime ::= CTIME INTEGER"
,
/* 79 */
"clog ::= CLOG INTEGER"
,
/* 80 */
"comp ::= COMP INTEGER"
,
/* 81 */
"prec ::= PRECISION STRING"
,
/* 82 */
"db_optr ::="
,
/* 83 */
"db_optr ::= db_optr tables"
,
/* 84 */
"db_optr ::= db_optr cache"
,
/* 85 */
"db_optr ::= db_optr replica"
,
/* 86 */
"db_optr ::= db_optr days"
,
/* 87 */
"db_optr ::= db_optr rows"
,
/* 88 */
"db_optr ::= db_optr ablocks"
,
/* 89 */
"db_optr ::= db_optr tblocks"
,
/* 90 */
"db_optr ::= db_optr ctime"
,
/* 91 */
"db_optr ::= db_optr clog"
,
/* 92 */
"db_optr ::= db_optr comp"
,
/* 93 */
"db_optr ::= db_optr prec"
,
/* 94 */
"db_optr ::= db_optr keep"
,
/* 95 */
"alter_db_optr ::="
,
/* 96 */
"alter_db_optr ::= alter_db_optr replica"
,
/* 97 */
"alter_db_optr ::= alter_db_optr tables"
,
/* 98 */
"typename ::= ids"
,
/* 99 */
"typename ::= ids LP signed RP"
,
/* 100 */
"signed ::= INTEGER"
,
/* 101 */
"signed ::= PLUS INTEGER"
,
/* 102 */
"signed ::= MINUS INTEGER"
,
/* 103 */
"cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args"
,
/* 104 */
"create_table_args ::= LP columnlist RP"
,
/* 105 */
"create_table_args ::= LP columnlist RP TAGS LP columnlist RP"
,
/* 106 */
"create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP"
,
/* 107 */
"create_table_args ::= AS select"
,
/* 108 */
"columnlist ::= columnlist COMMA column"
,
/* 109 */
"columnlist ::= column"
,
/* 110 */
"column ::= ids typename"
,
/* 111 */
"tagitemlist ::= tagitemlist COMMA tagitem"
,
/* 112 */
"tagitemlist ::= tagitem"
,
/* 113 */
"tagitem ::= INTEGER"
,
/* 114 */
"tagitem ::= FLOAT"
,
/* 115 */
"tagitem ::= STRING"
,
/* 116 */
"tagitem ::= BOOL"
,
/* 117 */
"tagitem ::= NULL"
,
/* 118 */
"tagitem ::= MINUS INTEGER"
,
/* 119 */
"tagitem ::= MINUS FLOAT"
,
/* 120 */
"tagitem ::= PLUS INTEGER"
,
/* 121 */
"tagitem ::= PLUS FLOAT"
,
/* 122 */
"cmd ::= select"
,
/* 123 */
"select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt"
,
/* 124 */
"select ::= SELECT selcollist"
,
/* 125 */
"sclp ::= selcollist COMMA"
,
/* 126 */
"sclp ::="
,
/* 127 */
"selcollist ::= sclp expr as"
,
/* 128 */
"selcollist ::= sclp STAR"
,
/* 129 */
"as ::= AS ids"
,
/* 130 */
"as ::= ids"
,
/* 131 */
"as ::="
,
/* 132 */
"from ::= FROM tablelist"
,
/* 133 */
"tablelist ::= ids cpxName"
,
/* 134 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 135 */
"tmvar ::= VARIABLE"
,
/* 136 */
"interval_opt ::= INTERVAL LP tmvar RP"
,
/* 137 */
"interval_opt ::="
,
/* 138 */
"fill_opt ::="
,
/* 139 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 140 */
"fill_opt ::= FILL LP ID RP"
,
/* 141 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 142 */
"sliding_opt ::="
,
/* 143 */
"orderby_opt ::="
,
/* 144 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 145 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 146 */
"sortlist ::= item sortorder"
,
/* 147 */
"item ::= ids cpxName"
,
/* 148 */
"sortorder ::= ASC"
,
/* 149 */
"sortorder ::= DESC"
,
/* 150 */
"sortorder ::="
,
/* 151 */
"groupby_opt ::="
,
/* 152 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 153 */
"grouplist ::= grouplist COMMA item"
,
/* 154 */
"grouplist ::= item"
,
/* 155 */
"having_opt ::="
,
/* 156 */
"having_opt ::= HAVING expr"
,
/* 157 */
"limit_opt ::="
,
/* 158 */
"limit_opt ::= LIMIT signed"
,
/* 159 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 160 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 161 */
"slimit_opt ::="
,
/* 162 */
"slimit_opt ::= SLIMIT signed"
,
/* 163 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 164 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 165 */
"where_opt ::="
,
/* 166 */
"where_opt ::= WHERE expr"
,
/* 167 */
"expr ::= LP expr RP"
,
/* 168 */
"expr ::= ID"
,
/* 169 */
"expr ::= ID DOT ID"
,
/* 170 */
"expr ::= ID DOT STAR"
,
/* 171 */
"expr ::= INTEGER"
,
/* 172 */
"expr ::= MINUS INTEGER"
,
/* 173 */
"expr ::= PLUS INTEGER"
,
/* 174 */
"expr ::= FLOAT"
,
/* 175 */
"expr ::= MINUS FLOAT"
,
/* 176 */
"expr ::= PLUS FLOAT"
,
/* 177 */
"expr ::= STRING"
,
/* 178 */
"expr ::= NOW"
,
/* 179 */
"expr ::= VARIABLE"
,
/* 180 */
"expr ::= BOOL"
,
/* 181 */
"expr ::= ID LP exprlist RP"
,
/* 182 */
"expr ::= ID LP STAR RP"
,
/* 183 */
"expr ::= expr AND expr"
,
/* 184 */
"expr ::= expr OR expr"
,
/* 185 */
"expr ::= expr LT expr"
,
/* 186 */
"expr ::= expr GT expr"
,
/* 187 */
"expr ::= expr LE expr"
,
/* 188 */
"expr ::= expr GE expr"
,
/* 189 */
"expr ::= expr NE expr"
,
/* 190 */
"expr ::= expr EQ expr"
,
/* 191 */
"expr ::= expr PLUS expr"
,
/* 192 */
"expr ::= expr MINUS expr"
,
/* 193 */
"expr ::= expr STAR expr"
,
/* 194 */
"expr ::= expr SLASH expr"
,
/* 195 */
"expr ::= expr REM expr"
,
/* 196 */
"expr ::= expr LIKE expr"
,
/* 197 */
"expr ::= expr IN LP exprlist RP"
,
/* 198 */
"exprlist ::= exprlist COMMA expritem"
,
/* 199 */
"exprlist ::= expritem"
,
/* 200 */
"expritem ::= expr"
,
/* 201 */
"expritem ::="
,
/* 202 */
"cmd ::= INSERT INTO cpxName insert_value_list"
,
/* 203 */
"insert_value_list ::= VALUES LP itemlist RP"
,
/* 204 */
"insert_value_list ::= insert_value_list VALUES LP itemlist RP"
,
/* 205 */
"itemlist ::= itemlist COMMA expr"
,
/* 206 */
"itemlist ::= expr"
,
/* 207 */
"cmd ::= RESET QUERY CACHE"
,
/* 208 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 209 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 210 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 211 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 212 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 213 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 214 */
"cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER"
,
/* 215 */
"cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER"
,
/* 216 */
"cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER"
,
};
#endif
/* NDEBUG */
...
...
@@ -1375,6 +1374,7 @@ static const struct {
{
198
,
3
},
{
198
,
5
},
{
198
,
3
},
{
198
,
4
},
{
198
,
5
},
{
198
,
4
},
{
198
,
3
},
...
...
@@ -1652,8 +1652,8 @@ static void yy_reduce(
{
setDCLSQLElems
(
pInfo
,
SHOW_VNODES
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
15
:
/* dbPrefix ::= */
case
4
3
:
/* ifexists ::= */
yytestcase
(
yyruleno
==
43
);
case
4
5
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
45
);
case
4
4
:
/* ifexists ::= */
yytestcase
(
yyruleno
==
44
);
case
4
6
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
46
);
{
yygotominor
.
yy0
.
n
=
0
;}
break
;
case
16
:
/* dbPrefix ::= ids DOT */
...
...
@@ -1694,103 +1694,110 @@ static void yy_reduce(
setDCLSQLElems
(
pInfo
,
SHOW_VGROUPS
,
1
,
&
token
);
}
break
;
case
24
:
/* cmd ::= DROP TABLE ifexists ids cpxName */
case
24
:
/* cmd ::= SHOW dbPrefix VGROUPS ids */
{
SSQLToken
token
;
setDBName
(
&
token
,
&
yymsp
[
-
2
].
minor
.
yy0
);
setDCLSQLElems
(
pInfo
,
SHOW_VGROUPS
,
2
,
&
token
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
25
:
/* 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
5
:
/* cmd ::= DROP DATABASE ifexists ids */
case
2
6
:
/* cmd ::= DROP DATABASE ifexists ids */
{
setDCLSQLElems
(
pInfo
,
DROP_DATABASE
,
2
,
&
yymsp
[
0
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
case
2
6
:
/* cmd ::= DROP DNODE IPTOKEN */
case
2
7
:
/* cmd ::= DROP DNODE IPTOKEN */
{
setDCLSQLElems
(
pInfo
,
DROP_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
2
7
:
/* cmd ::= DROP USER ids */
case
2
8
:
/* cmd ::= DROP USER ids */
{
setDCLSQLElems
(
pInfo
,
DROP_USER
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
2
8
:
/* cmd ::= DROP ACCOUNT ids */
case
2
9
:
/* cmd ::= DROP ACCOUNT ids */
{
setDCLSQLElems
(
pInfo
,
DROP_ACCOUNT
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
29
:
/* cmd ::= USE ids */
case
30
:
/* cmd ::= USE ids */
{
setDCLSQLElems
(
pInfo
,
USE_DATABASE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
3
0
:
/* cmd ::= DESCRIBE ids cpxName */
case
3
1
:
/* 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
3
1
:
/* cmd ::= ALTER USER ids PASS ids */
case
3
2
:
/* cmd ::= ALTER USER ids PASS ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_USER_PASSWD
,
2
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
3
2
:
/* cmd ::= ALTER USER ids PRIVILEGE ids */
case
3
3
:
/* cmd ::= ALTER USER ids PRIVILEGE ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_USER_PRIVILEGES
,
2
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
3
3
:
/* cmd ::= ALTER DNODE IPTOKEN ids */
case
3
4
:
/* cmd ::= ALTER DNODE IPTOKEN ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_DNODE
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
3
4
:
/* cmd ::= ALTER DNODE IPTOKEN ids ids */
case
3
5
:
/* 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
5
:
/* cmd ::= ALTER LOCAL ids */
case
3
6
:
/* cmd ::= ALTER LOCAL ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_LOCAL
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
3
6
:
/* cmd ::= ALTER LOCAL ids ids */
case
3
7
:
/* cmd ::= ALTER LOCAL ids ids */
{
setDCLSQLElems
(
pInfo
,
ALTER_LOCAL
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
3
7
:
/* cmd ::= ALTER DATABASE ids alter_db_optr */
case
3
8
:
/* 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
8
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
case
3
9
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
{
SSQLToken
t
=
{
0
};
setCreateAcctSQL
(
pInfo
,
ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
t
,
&
yymsp
[
0
].
minor
.
yy155
);}
break
;
case
39
:
/* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
case
40
:
/* 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
4
0
:
/* ids ::= ID */
case
4
1
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
41
);
case
4
1
:
/* ids ::= ID */
case
4
2
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
42
);
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
4
2
:
/* ifexists ::= IF EXISTS */
case
4
4
:
/* ifnotexists ::= IF NOT EXISTS */
yytestcase
(
yyruleno
==
44
);
case
4
3
:
/* ifexists ::= IF EXISTS */
case
4
5
:
/* ifnotexists ::= IF NOT EXISTS */
yytestcase
(
yyruleno
==
45
);
{
yygotominor
.
yy0
.
n
=
1
;}
break
;
case
4
6
:
/* cmd ::= CREATE DNODE IPTOKEN */
case
4
7
:
/* cmd ::= CREATE DNODE IPTOKEN */
{
setDCLSQLElems
(
pInfo
,
CREATE_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
4
7
:
/* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
case
4
8
:
/* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
setCreateAcctSQL
(
pInfo
,
CREATE_ACCOUNT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy155
);}
break
;
case
4
8
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
case
4
9
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
setCreateDBSQL
(
pInfo
,
CREATE_DATABASE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy262
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
break
;
case
49
:
/* cmd ::= CREATE USER ids PASS ids */
case
50
:
/* cmd ::= CREATE USER ids PASS ids */
{
setDCLSQLElems
(
pInfo
,
CREATE_USER
,
2
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
5
0
:
/* 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
6
0
:
/* 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
);
case
5
1
:
/* pps ::= */
case
5
3
:
/* tseries ::= */
yytestcase
(
yyruleno
==
53
);
case
5
5
:
/* dbs ::= */
yytestcase
(
yyruleno
==
55
);
case
5
7
:
/* streams ::= */
yytestcase
(
yyruleno
==
57
);
case
5
9
:
/* storage ::= */
yytestcase
(
yyruleno
==
59
);
case
6
1
:
/* qtime ::= */
yytestcase
(
yyruleno
==
61
);
case
6
3
:
/* users ::= */
yytestcase
(
yyruleno
==
63
);
case
6
5
:
/* conns ::= */
yytestcase
(
yyruleno
==
65
);
case
6
7
:
/* state ::= */
yytestcase
(
yyruleno
==
67
);
{
yygotominor
.
yy0
.
n
=
0
;
}
break
;
case
5
1
:
/* 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
59
:
/* storage ::= STORAGE INTEGER */
yytestcase
(
yyruleno
==
59
);
case
6
1
:
/* 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
);
case
5
2
:
/* pps ::= PPS INTEGER */
case
5
4
:
/* tseries ::= TSERIES INTEGER */
yytestcase
(
yyruleno
==
54
);
case
5
6
:
/* dbs ::= DBS INTEGER */
yytestcase
(
yyruleno
==
56
);
case
5
8
:
/* streams ::= STREAMS INTEGER */
yytestcase
(
yyruleno
==
58
);
case
60
:
/* storage ::= STORAGE INTEGER */
yytestcase
(
yyruleno
==
60
);
case
6
2
:
/* qtime ::= QTIME INTEGER */
yytestcase
(
yyruleno
==
62
);
case
6
4
:
/* users ::= USERS INTEGER */
yytestcase
(
yyruleno
==
64
);
case
6
6
:
/* conns ::= CONNS INTEGER */
yytestcase
(
yyruleno
==
66
);
case
6
8
:
/* state ::= STATE ids */
yytestcase
(
yyruleno
==
68
);
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
6
8
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
case
6
9
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
yygotominor
.
yy155
.
users
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yygotominor
.
yy155
.
dbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
...
...
@@ -1803,143 +1810,143 @@ static void yy_reduce(
yygotominor
.
yy155
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
69
:
/* keep ::= KEEP tagitemlist */
case
70
:
/* keep ::= KEEP tagitemlist */
{
yygotominor
.
yy480
=
yymsp
[
0
].
minor
.
yy480
;
}
break
;
case
7
0
:
/* tables ::= TABLES INTEGER */
case
7
1
:
/* cache ::= CACHE INTEGER */
yytestcase
(
yyruleno
==
71
);
case
7
2
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
72
);
case
7
3
:
/* days ::= DAYS INTEGER */
yytestcase
(
yyruleno
==
73
);
case
7
4
:
/* rows ::= ROWS INTEGER */
yytestcase
(
yyruleno
==
74
);
case
7
5
:
/* ablocks ::= ABLOCKS ID */
yytestcase
(
yyruleno
==
75
);
case
7
6
:
/* tblocks ::= TBLOCKS INTEGER */
yytestcase
(
yyruleno
==
76
);
case
7
7
:
/* ctime ::= CTIME INTEGER */
yytestcase
(
yyruleno
==
77
);
case
7
8
:
/* clog ::= CLOG INTEGER */
yytestcase
(
yyruleno
==
78
);
case
79
:
/* comp ::= COMP INTEGER */
yytestcase
(
yyruleno
==
79
);
case
8
0
:
/* prec ::= PRECISION STRING */
yytestcase
(
yyruleno
==
80
);
case
7
1
:
/* tables ::= TABLES INTEGER */
case
7
2
:
/* cache ::= CACHE INTEGER */
yytestcase
(
yyruleno
==
72
);
case
7
3
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
73
);
case
7
4
:
/* days ::= DAYS INTEGER */
yytestcase
(
yyruleno
==
74
);
case
7
5
:
/* rows ::= ROWS INTEGER */
yytestcase
(
yyruleno
==
75
);
case
7
6
:
/* ablocks ::= ABLOCKS ID */
yytestcase
(
yyruleno
==
76
);
case
7
7
:
/* tblocks ::= TBLOCKS INTEGER */
yytestcase
(
yyruleno
==
77
);
case
7
8
:
/* ctime ::= CTIME INTEGER */
yytestcase
(
yyruleno
==
78
);
case
7
9
:
/* clog ::= CLOG INTEGER */
yytestcase
(
yyruleno
==
79
);
case
80
:
/* comp ::= COMP INTEGER */
yytestcase
(
yyruleno
==
80
);
case
8
1
:
/* prec ::= PRECISION STRING */
yytestcase
(
yyruleno
==
81
);
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
8
1
:
/* db_optr ::= */
case
8
2
:
/* db_optr ::= */
{
setDefaultCreateDbOption
(
&
yygotominor
.
yy262
);}
break
;
case
8
2
:
/* db_optr ::= db_optr tables */
case
9
6
:
/* alter_db_optr ::= alter_db_optr tables */
yytestcase
(
yyruleno
==
96
);
case
8
3
:
/* db_optr ::= db_optr tables */
case
9
7
:
/* alter_db_optr ::= alter_db_optr tables */
yytestcase
(
yyruleno
==
97
);
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
tablesPerVnode
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
8
3
:
/* db_optr ::= db_optr cache */
case
8
4
:
/* db_optr ::= db_optr cache */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
8
4
:
/* db_optr ::= db_optr replica */
case
9
5
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
95
);
case
8
5
:
/* db_optr ::= db_optr replica */
case
9
6
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
96
);
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
8
5
:
/* db_optr ::= db_optr days */
case
8
6
:
/* db_optr ::= db_optr days */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
8
6
:
/* db_optr ::= db_optr rows */
case
8
7
:
/* db_optr ::= db_optr rows */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
rowPerFileBlock
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
8
7
:
/* db_optr ::= db_optr ablocks */
case
8
8
:
/* db_optr ::= db_optr ablocks */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
numOfAvgCacheBlocks
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
break
;
case
8
8
:
/* db_optr ::= db_optr tblocks */
case
8
9
:
/* 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 */
case
90
:
/* db_optr ::= db_optr ctime */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
9
0
:
/* db_optr ::= db_optr clog */
case
9
1
:
/* db_optr ::= db_optr clog */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
commitLog
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
9
1
:
/* db_optr ::= db_optr comp */
case
9
2
:
/* db_optr ::= db_optr comp */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
9
2
:
/* db_optr ::= db_optr prec */
case
9
3
:
/* db_optr ::= db_optr prec */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
9
3
:
/* db_optr ::= db_optr keep */
case
9
4
:
/* db_optr ::= db_optr keep */
{
yygotominor
.
yy262
=
yymsp
[
-
1
].
minor
.
yy262
;
yygotominor
.
yy262
.
keep
=
yymsp
[
0
].
minor
.
yy480
;
}
break
;
case
9
4
:
/* alter_db_optr ::= */
case
9
5
:
/* alter_db_optr ::= */
{
setDefaultCreateDbOption
(
&
yygotominor
.
yy262
);}
break
;
case
9
7
:
/* typename ::= ids */
case
9
8
:
/* typename ::= ids */
{
tSQLSetColumnType
(
&
yygotominor
.
yy397
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
9
8
:
/* typename ::= ids LP signed RP */
case
9
9
:
/* typename ::= ids LP signed RP */
{
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy369
;
// negative value of name length
tSQLSetColumnType
(
&
yygotominor
.
yy397
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
break
;
case
99
:
/* signed ::= INTEGER */
case
10
0
:
/* signed ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
100
);
case
100
:
/* signed ::= INTEGER */
case
10
1
:
/* signed ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
101
);
{
yygotominor
.
yy369
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
10
1
:
/* signed ::= MINUS INTEGER */
case
10
2
:
/* signed ::= MINUS INTEGER */
{
yygotominor
.
yy369
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
break
;
case
10
2
:
/* cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
case
10
3
:
/* 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
3
:
/* create_table_args ::= LP columnlist RP */
case
10
4
:
/* create_table_args ::= LP columnlist RP */
{
yygotominor
.
yy344
=
tSetCreateSQLElems
(
yymsp
[
-
1
].
minor
.
yy421
,
NULL
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_NORMAL_METER
);
setSQLInfo
(
pInfo
,
yygotominor
.
yy344
,
NULL
,
TSQL_CREATE_NORMAL_METER
);
}
break
;
case
10
4
:
/* create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
case
10
5
:
/* create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
{
yygotominor
.
yy344
=
tSetCreateSQLElems
(
yymsp
[
-
5
].
minor
.
yy421
,
yymsp
[
-
1
].
minor
.
yy421
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_NORMAL_METRIC
);
setSQLInfo
(
pInfo
,
yygotominor
.
yy344
,
NULL
,
TSQL_CREATE_NORMAL_METRIC
);
}
break
;
case
10
5
:
/* create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
case
10
6
:
/* create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
yygotominor
.
yy344
=
tSetCreateSQLElems
(
NULL
,
NULL
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
1
].
minor
.
yy480
,
NULL
,
TSQL_CREATE_METER_FROM_METRIC
);
setSQLInfo
(
pInfo
,
yygotominor
.
yy344
,
NULL
,
TSQL_CREATE_METER_FROM_METRIC
);
}
break
;
case
10
6
:
/* create_table_args ::= AS select */
case
10
7
:
/* create_table_args ::= AS select */
{
yygotominor
.
yy344
=
tSetCreateSQLElems
(
NULL
,
NULL
,
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy138
,
TSQL_CREATE_STREAM
);
setSQLInfo
(
pInfo
,
yygotominor
.
yy344
,
NULL
,
TSQL_CREATE_STREAM
);
}
break
;
case
10
7
:
/* columnlist ::= columnlist COMMA column */
case
10
8
:
/* columnlist ::= columnlist COMMA column */
{
yygotominor
.
yy421
=
tFieldListAppend
(
yymsp
[
-
2
].
minor
.
yy421
,
&
yymsp
[
0
].
minor
.
yy397
);
}
break
;
case
10
8
:
/* columnlist ::= column */
case
10
9
:
/* columnlist ::= column */
{
yygotominor
.
yy421
=
tFieldListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy397
);}
break
;
case
1
09
:
/* column ::= ids typename */
case
1
10
:
/* column ::= ids typename */
{
tSQLSetColumnInfo
(
&
yygotominor
.
yy397
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy397
);
}
break
;
case
11
0
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
case
11
1
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
{
yygotominor
.
yy480
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy480
,
&
yymsp
[
0
].
minor
.
yy236
,
-
1
);
}
break
;
case
11
1
:
/* tagitemlist ::= tagitem */
case
11
2
:
/* tagitemlist ::= tagitem */
{
yygotominor
.
yy480
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy236
,
-
1
);
}
break
;
case
11
2
:
/* tagitem ::= INTEGER */
case
11
3
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
113
);
case
11
4
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
114
);
case
11
5
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
115
);
case
11
3
:
/* tagitem ::= INTEGER */
case
11
4
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
114
);
case
11
5
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
115
);
case
11
6
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
116
);
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yygotominor
.
yy236
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
11
6
:
/* tagitem ::= NULL */
case
11
7
:
/* tagitem ::= NULL */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yygotominor
.
yy236
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
11
7
:
/* tagitem ::= MINUS INTEGER */
case
11
8
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
118
);
case
1
19
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
119
);
case
12
0
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
120
);
case
11
8
:
/* tagitem ::= MINUS INTEGER */
case
11
9
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
119
);
case
1
20
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
120
);
case
12
1
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
121
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
yymsp
[
0
].
minor
.
yy0
.
type
;
...
...
@@ -1947,71 +1954,71 @@ static void yy_reduce(
tVariantCreate
(
&
yygotominor
.
yy236
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
case
12
1
:
/* cmd ::= select */
case
12
2
:
/* cmd ::= select */
{
setSQLInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy138
,
NULL
,
TSQL_QUERY_METER
);
}
break
;
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 */
case
12
3
:
/* select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
yygotominor
.
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
);
}
break
;
case
12
3
:
/* select ::= SELECT selcollist */
case
12
4
:
/* select ::= SELECT selcollist */
{
yygotominor
.
yy138
=
tSetQuerySQLElems
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy284
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
break
;
case
12
4
:
/* sclp ::= selcollist COMMA */
case
12
5
:
/* sclp ::= selcollist COMMA */
{
yygotominor
.
yy284
=
yymsp
[
-
1
].
minor
.
yy284
;}
break
;
case
12
5
:
/* sclp ::= */
case
12
6
:
/* sclp ::= */
{
yygotominor
.
yy284
=
0
;}
break
;
case
12
6
:
/* selcollist ::= sclp expr as */
case
12
7
:
/* selcollist ::= sclp expr as */
{
yygotominor
.
yy284
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy284
,
yymsp
[
-
1
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
}
break
;
case
12
7
:
/* selcollist ::= sclp STAR */
case
12
8
:
/* selcollist ::= sclp STAR */
{
tSQLExpr
*
pNode
=
tSQLExprIdValueCreate
(
NULL
,
TK_ALL
);
yygotominor
.
yy284
=
tSQLExprListAppend
(
yymsp
[
-
1
].
minor
.
yy284
,
pNode
,
0
);
}
break
;
case
12
8
:
/* as ::= AS ids */
case
1
29
:
/* as ::= ids */
yytestcase
(
yyruleno
==
129
);
case
12
9
:
/* as ::= AS ids */
case
1
30
:
/* as ::= ids */
yytestcase
(
yyruleno
==
130
);
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
13
0
:
/* as ::= */
case
13
1
:
/* as ::= */
{
yygotominor
.
yy0
.
n
=
0
;
}
break
;
case
13
1
:
/* from ::= FROM tablelist */
case
14
3
:
/* orderby_opt ::= ORDER BY sortlist */
yytestcase
(
yyruleno
==
143
);
case
15
1
:
/* groupby_opt ::= GROUP BY grouplist */
yytestcase
(
yyruleno
==
151
);
case
13
2
:
/* from ::= FROM tablelist */
case
14
4
:
/* orderby_opt ::= ORDER BY sortlist */
yytestcase
(
yyruleno
==
144
);
case
15
2
:
/* groupby_opt ::= GROUP BY grouplist */
yytestcase
(
yyruleno
==
152
);
{
yygotominor
.
yy480
=
yymsp
[
0
].
minor
.
yy480
;}
break
;
case
13
2
:
/* tablelist ::= ids cpxName */
case
13
3
:
/* 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
13
3
:
/* tablelist ::= tablelist COMMA ids cpxName */
case
13
4
:
/* 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
13
4
:
/* tmvar ::= VARIABLE */
case
13
5
:
/* tmvar ::= VARIABLE */
{
yygotominor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
break
;
case
13
5
:
/* interval_opt ::= INTERVAL LP tmvar RP */
case
14
0
:
/* sliding_opt ::= SLIDING LP tmvar RP */
yytestcase
(
yyruleno
==
140
);
case
13
6
:
/* interval_opt ::= INTERVAL LP tmvar RP */
case
14
1
:
/* sliding_opt ::= SLIDING LP tmvar RP */
yytestcase
(
yyruleno
==
141
);
{
yygotominor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
13
6
:
/* interval_opt ::= */
case
14
1
:
/* sliding_opt ::= */
yytestcase
(
yyruleno
==
141
);
case
13
7
:
/* interval_opt ::= */
case
14
2
:
/* sliding_opt ::= */
yytestcase
(
yyruleno
==
142
);
{
yygotominor
.
yy0
.
n
=
0
;
yygotominor
.
yy0
.
z
=
NULL
;
yygotominor
.
yy0
.
type
=
0
;
}
break
;
case
13
7
:
/* fill_opt ::= */
case
13
8
:
/* fill_opt ::= */
{
yygotominor
.
yy480
=
0
;
}
break
;
case
13
8
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
case
13
9
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
tVariant
A
=
{
0
};
toTSDBType
(
yymsp
[
-
3
].
minor
.
yy0
.
type
);
...
...
@@ -2021,27 +2028,27 @@ static void yy_reduce(
yygotominor
.
yy480
=
yymsp
[
-
1
].
minor
.
yy480
;
}
break
;
case
1
39
:
/* fill_opt ::= FILL LP ID RP */
case
1
40
:
/* fill_opt ::= FILL LP ID RP */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yygotominor
.
yy480
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
break
;
case
14
2
:
/* orderby_opt ::= */
case
15
0
:
/* groupby_opt ::= */
yytestcase
(
yyruleno
==
150
);
case
14
3
:
/* orderby_opt ::= */
case
15
1
:
/* groupby_opt ::= */
yytestcase
(
yyruleno
==
151
);
{
yygotominor
.
yy480
=
0
;}
break
;
case
14
4
:
/* sortlist ::= sortlist COMMA item sortorder */
case
14
5
:
/* sortlist ::= sortlist COMMA item sortorder */
{
yygotominor
.
yy480
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy480
,
&
yymsp
[
-
1
].
minor
.
yy236
,
yymsp
[
0
].
minor
.
yy220
);
}
break
;
case
14
5
:
/* sortlist ::= item sortorder */
case
14
6
:
/* sortlist ::= item sortorder */
{
yygotominor
.
yy480
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy236
,
yymsp
[
0
].
minor
.
yy220
);
}
break
;
case
14
6
:
/* item ::= ids cpxName */
case
14
7
:
/* item ::= ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
...
...
@@ -2049,174 +2056,174 @@ static void yy_reduce(
tVariantCreate
(
&
yygotominor
.
yy236
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
case
14
7
:
/* sortorder ::= ASC */
case
14
8
:
/* sortorder ::= ASC */
{
yygotominor
.
yy220
=
TSQL_SO_ASC
;
}
break
;
case
14
8
:
/* sortorder ::= DESC */
case
14
9
:
/* sortorder ::= DESC */
{
yygotominor
.
yy220
=
TSQL_SO_DESC
;}
break
;
case
1
49
:
/* sortorder ::= */
case
1
50
:
/* sortorder ::= */
{
yygotominor
.
yy220
=
TSQL_SO_ASC
;}
break
;
case
15
2
:
/* grouplist ::= grouplist COMMA item */
case
15
3
:
/* grouplist ::= grouplist COMMA item */
{
yygotominor
.
yy480
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy480
,
&
yymsp
[
0
].
minor
.
yy236
,
-
1
);
}
break
;
case
15
3
:
/* grouplist ::= item */
case
15
4
:
/* grouplist ::= item */
{
yygotominor
.
yy480
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy236
,
-
1
);
}
break
;
case
15
4
:
/* having_opt ::= */
case
16
4
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
164
);
case
20
0
:
/* expritem ::= */
yytestcase
(
yyruleno
==
200
);
case
15
5
:
/* having_opt ::= */
case
16
5
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
165
);
case
20
1
:
/* expritem ::= */
yytestcase
(
yyruleno
==
201
);
{
yygotominor
.
yy244
=
0
;}
break
;
case
15
5
:
/* having_opt ::= HAVING expr */
case
16
5
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
165
);
case
199
:
/* expritem ::= expr */
yytestcase
(
yyruleno
==
199
);
case
15
6
:
/* having_opt ::= HAVING expr */
case
16
6
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
166
);
case
200
:
/* expritem ::= expr */
yytestcase
(
yyruleno
==
200
);
{
yygotominor
.
yy244
=
yymsp
[
0
].
minor
.
yy244
;}
break
;
case
15
6
:
/* limit_opt ::= */
case
16
0
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
160
);
case
15
7
:
/* limit_opt ::= */
case
16
1
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
161
);
{
yygotominor
.
yy162
.
limit
=
-
1
;
yygotominor
.
yy162
.
offset
=
0
;}
break
;
case
15
7
:
/* limit_opt ::= LIMIT signed */
case
16
1
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
161
);
case
15
8
:
/* limit_opt ::= LIMIT signed */
case
16
2
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
162
);
{
yygotominor
.
yy162
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yygotominor
.
yy162
.
offset
=
0
;}
break
;
case
15
8
:
/* limit_opt ::= LIMIT signed OFFSET signed */
case
16
2
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
yytestcase
(
yyruleno
==
162
);
case
15
9
:
/* limit_opt ::= LIMIT signed OFFSET signed */
case
16
3
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
yytestcase
(
yyruleno
==
163
);
{
yygotominor
.
yy162
.
limit
=
yymsp
[
-
2
].
minor
.
yy369
;
yygotominor
.
yy162
.
offset
=
yymsp
[
0
].
minor
.
yy369
;}
break
;
case
1
59
:
/* limit_opt ::= LIMIT signed COMMA signed */
case
16
3
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
yytestcase
(
yyruleno
==
163
);
case
1
60
:
/* limit_opt ::= LIMIT signed COMMA signed */
case
16
4
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
yytestcase
(
yyruleno
==
164
);
{
yygotominor
.
yy162
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yygotominor
.
yy162
.
offset
=
yymsp
[
-
2
].
minor
.
yy369
;}
break
;
case
16
6
:
/* expr ::= LP expr RP */
case
16
7
:
/* expr ::= LP expr RP */
{
yygotominor
.
yy244
=
yymsp
[
-
1
].
minor
.
yy244
;
}
break
;
case
16
7
:
/* expr ::= ID */
case
16
8
:
/* expr ::= ID */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
break
;
case
16
8
:
/* expr ::= ID DOT ID */
case
16
9
:
/* 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
1
69
:
/* expr ::= ID DOT STAR */
case
1
70
:
/* 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
17
0
:
/* expr ::= INTEGER */
case
17
1
:
/* expr ::= INTEGER */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
break
;
case
17
1
:
/* expr ::= MINUS INTEGER */
case
17
2
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
172
);
case
17
2
:
/* expr ::= MINUS INTEGER */
case
17
3
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
173
);
{
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
17
3
:
/* expr ::= FLOAT */
case
17
4
:
/* expr ::= FLOAT */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
break
;
case
17
4
:
/* expr ::= MINUS FLOAT */
case
17
5
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
175
);
case
17
5
:
/* expr ::= MINUS FLOAT */
case
17
6
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
176
);
{
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
17
6
:
/* expr ::= STRING */
case
17
7
:
/* expr ::= STRING */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
break
;
case
17
7
:
/* expr ::= NOW */
case
17
8
:
/* expr ::= NOW */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
break
;
case
17
8
:
/* expr ::= VARIABLE */
case
17
9
:
/* expr ::= VARIABLE */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
break
;
case
1
79
:
/* expr ::= BOOL */
case
1
80
:
/* expr ::= BOOL */
{
yygotominor
.
yy244
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
break
;
case
18
0
:
/* expr ::= ID LP exprlist RP */
case
18
1
:
/* expr ::= ID LP exprlist RP */
{
yygotominor
.
yy244
=
tSQLExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy284
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
break
;
case
18
1
:
/* expr ::= ID LP STAR RP */
case
18
2
:
/* expr ::= ID LP STAR RP */
{
yygotominor
.
yy244
=
tSQLExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
break
;
case
18
2
:
/* expr ::= expr AND expr */
case
18
3
:
/* expr ::= expr AND expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_AND
);}
break
;
case
18
3
:
/* expr ::= expr OR expr */
case
18
4
:
/* expr ::= expr OR expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_OR
);
}
break
;
case
18
4
:
/* expr ::= expr LT expr */
case
18
5
:
/* expr ::= expr LT expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_LT
);}
break
;
case
18
5
:
/* expr ::= expr GT expr */
case
18
6
:
/* expr ::= expr GT expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_GT
);}
break
;
case
18
6
:
/* expr ::= expr LE expr */
case
18
7
:
/* expr ::= expr LE expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_LE
);}
break
;
case
18
7
:
/* expr ::= expr GE expr */
case
18
8
:
/* expr ::= expr GE expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_GE
);}
break
;
case
18
8
:
/* expr ::= expr NE expr */
case
18
9
:
/* expr ::= expr NE expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_NE
);}
break
;
case
1
89
:
/* expr ::= expr EQ expr */
case
1
90
:
/* expr ::= expr EQ expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_EQ
);}
break
;
case
19
0
:
/* expr ::= expr PLUS expr */
case
19
1
:
/* expr ::= expr PLUS expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_PLUS
);
}
break
;
case
19
1
:
/* expr ::= expr MINUS expr */
case
19
2
:
/* expr ::= expr MINUS expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_MINUS
);
}
break
;
case
19
2
:
/* expr ::= expr STAR expr */
case
19
3
:
/* expr ::= expr STAR expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_STAR
);
}
break
;
case
19
3
:
/* expr ::= expr SLASH expr */
case
19
4
:
/* expr ::= expr SLASH expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_DIVIDE
);}
break
;
case
19
4
:
/* expr ::= expr REM expr */
case
19
5
:
/* expr ::= expr REM expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_REM
);
}
break
;
case
19
5
:
/* expr ::= expr LIKE expr */
case
19
6
:
/* expr ::= expr LIKE expr */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy244
,
yymsp
[
0
].
minor
.
yy244
,
TK_LIKE
);
}
break
;
case
19
6
:
/* expr ::= expr IN LP exprlist RP */
case
19
7
:
/* expr ::= expr IN LP exprlist RP */
{
yygotominor
.
yy244
=
tSQLExprCreate
(
yymsp
[
-
4
].
minor
.
yy244
,
(
tSQLExpr
*
)
yymsp
[
-
1
].
minor
.
yy284
,
TK_IN
);
}
break
;
case
19
7
:
/* exprlist ::= exprlist COMMA expritem */
case
20
4
:
/* itemlist ::= itemlist COMMA expr */
yytestcase
(
yyruleno
==
204
);
case
19
8
:
/* exprlist ::= exprlist COMMA expritem */
case
20
5
:
/* itemlist ::= itemlist COMMA expr */
yytestcase
(
yyruleno
==
205
);
{
yygotominor
.
yy284
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy284
,
yymsp
[
0
].
minor
.
yy244
,
0
);}
break
;
case
19
8
:
/* exprlist ::= expritem */
case
20
5
:
/* itemlist ::= expr */
yytestcase
(
yyruleno
==
205
);
case
19
9
:
/* exprlist ::= expritem */
case
20
6
:
/* itemlist ::= expr */
yytestcase
(
yyruleno
==
206
);
{
yygotominor
.
yy284
=
tSQLExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy244
,
0
);}
break
;
case
20
1
:
/* cmd ::= INSERT INTO cpxName insert_value_list */
case
20
2
:
/* cmd ::= INSERT INTO cpxName insert_value_list */
{
tSetInsertSQLElems
(
pInfo
,
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy237
);
}
break
;
case
20
2
:
/* insert_value_list ::= VALUES LP itemlist RP */
case
20
3
:
/* insert_value_list ::= VALUES LP itemlist RP */
{
yygotominor
.
yy237
=
tSQLListListAppend
(
NULL
,
yymsp
[
-
1
].
minor
.
yy284
);}
break
;
case
20
3
:
/* insert_value_list ::= insert_value_list VALUES LP itemlist RP */
case
20
4
:
/* insert_value_list ::= insert_value_list VALUES LP itemlist RP */
{
yygotominor
.
yy237
=
tSQLListListAppend
(
yymsp
[
-
4
].
minor
.
yy237
,
yymsp
[
-
1
].
minor
.
yy284
);}
break
;
case
20
6
:
/* cmd ::= RESET QUERY CACHE */
case
20
7
:
/* cmd ::= RESET QUERY CACHE */
{
setDCLSQLElems
(
pInfo
,
RESET_QUERY_CACHE
,
0
);}
break
;
case
20
7
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case
20
8
:
/* 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
.
yy421
,
NULL
,
ALTER_TABLE_ADD_COLUMN
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_ADD_COLUMN
);
}
break
;
case
20
8
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case
20
9
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -2227,14 +2234,14 @@ static void yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_DROP_COLUMN
);
}
break
;
case
2
09
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case
2
10
:
/* 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
.
yy421
,
NULL
,
ALTER_TABLE_TAGS_ADD
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_TAGS_ADD
);
}
break
;
case
21
0
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case
21
1
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -2245,7 +2252,7 @@ static void yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_TAGS_DROP
);
}
break
;
case
21
1
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case
21
2
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -2259,7 +2266,7 @@ static void yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_TAGS_CHG
);
}
break
;
case
21
2
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
case
21
3
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
...
...
@@ -2271,13 +2278,13 @@ static void yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
ALTER_TABLE_TAGS_SET
);
}
break
;
case
21
3
:
/* cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */
case
21
4
:
/* 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
4
:
/* cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */
case
21
5
:
/* 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
5
:
/* cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */
case
21
6
:
/* 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:
...
...
src/client/src/tscSQLParser.c
浏览文件 @
6e35d6c4
...
...
@@ -2532,15 +2532,29 @@ int32_t setShowInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
return
ret
;
}
if
(
type
!=
SHOW_VGROUPS
&&
pInfo
->
pDCLInfo
->
nTokens
==
2
)
{
// set the like conds for show tables
SSQLToken
*
likeToken
=
&
pInfo
->
pDCLInfo
->
a
[
1
];
strncpy
(
pCmd
->
payload
,
likeToken
->
z
,
likeToken
->
n
);
pCmd
->
payloadLen
=
strdequote
(
pCmd
->
payload
);
if
(
pCmd
->
payloadLen
>
TSDB_METER_NAME_LEN
)
{
return
invalidSqlErrMsg
(
pCmd
,
msg2
);
if
(
pInfo
->
pDCLInfo
->
nTokens
==
2
)
{
if
(
type
==
SHOW_VGROUPS
)
{
// set the table name for show vgroups
SSQLToken
*
meterId
=
&
pInfo
->
pDCLInfo
->
a
[
1
];
if
(
0
==
pDbPrefixToken
->
n
)
{
SSQLToken
db
=
{
0
};
getCurrentDBName
(
pSql
,
&
db
);
pDbPrefixToken
=
&
db
;
}
ret
=
setObjFullName
(
pCmd
->
payload
,
NULL
,
pDbPrefixToken
,
meterId
,
&
(
pCmd
->
payloadLen
));
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
return
ret
;
}
}
else
{
// set the like conds for show tables/stables
SSQLToken
*
likeToken
=
&
pInfo
->
pDCLInfo
->
a
[
1
];
strncpy
(
pCmd
->
payload
,
likeToken
->
z
,
likeToken
->
n
);
pCmd
->
payloadLen
=
strdequote
(
pCmd
->
payload
);
if
(
pCmd
->
payloadLen
>
TSDB_METER_NAME_LEN
)
{
return
invalidSqlErrMsg
(
pCmd
,
msg2
);
}
}
}
}
...
...
src/client/src/tscServer.c
浏览文件 @
6e35d6c4
...
...
@@ -2191,7 +2191,8 @@ int tscBuildShowMsg(SSqlObj *pSql) {
pShowMsg
=
(
SShowMsg
*
)
pMsg
;
pShowMsg
->
type
=
pCmd
->
showType
;
if
((
pShowMsg
->
type
==
TSDB_MGMT_TABLE_TABLE
||
pShowMsg
->
type
==
TSDB_MGMT_TABLE_METRIC
||
pShowMsg
->
type
==
TSDB_MGMT_TABLE_VNODES
)
&&
pCmd
->
payloadLen
!=
0
)
{
if
((
pShowMsg
->
type
==
TSDB_MGMT_TABLE_TABLE
||
pShowMsg
->
type
==
TSDB_MGMT_TABLE_METRIC
||
pShowMsg
->
type
==
TSDB_MGMT_TABLE_VNODES
||
pShowMsg
->
type
==
TSDB_MGMT_TABLE_VGROUP
)
&&
pCmd
->
payloadLen
!=
0
)
{
// only show tables support wildcard query
pShowMsg
->
payloadLen
=
htons
(
pCmd
->
payloadLen
);
memcpy
(
pShowMsg
->
payload
,
payload
,
pCmd
->
payloadLen
);
...
...
src/inc/sql.y
浏览文件 @
6e35d6c4
...
...
@@ -108,6 +108,12 @@ cmd ::= SHOW dbPrefix(X) VGROUPS. {
setDCLSQLElems(pInfo, SHOW_VGROUPS, 1, &token);
}
cmd ::= SHOW dbPrefix(X) VGROUPS ids(Y). {
SSQLToken token;
setDBName(&token, &X);
setDCLSQLElems(pInfo, SHOW_VGROUPS, 2, &token, &Y);
}
//drop configure for tables
cmd ::= DROP TABLE ifexists(Y) ids(X) cpxName(Z). {
X.n += Z.n;
...
...
src/system/detail/src/mgmtVgroup.c
浏览文件 @
6e35d6c4
...
...
@@ -237,11 +237,25 @@ int mgmtGetVgroupMeta(SMeterMeta *pMeta, SShowObj *pShow, SConnObj *pConn) {
pSchema
[
cols
].
bytes
=
htons
(
pShow
->
bytes
[
cols
]);
cols
++
;
int
maxReplica
=
0
;
SVgObj
*
pVgroup
=
pDb
->
pHead
;
while
(
pVgroup
!=
NULL
)
{
int
maxReplica
=
0
;
SVgObj
*
pVgroup
=
NULL
;
STabObj
*
pMeter
=
NULL
;
if
(
pShow
->
payloadLen
>
0
)
{
pMeter
=
mgmtGetMeter
(
pShow
->
payload
);
if
(
NULL
==
pMeter
)
{
return
TSDB_CODE_INVALID_METER_ID
;
}
pVgroup
=
mgmtGetVgroup
(
pMeter
->
gid
.
vgId
);
if
(
NULL
==
pVgroup
)
return
TSDB_CODE_INVALID_METER_ID
;
maxReplica
=
pVgroup
->
numOfVnodes
>
maxReplica
?
pVgroup
->
numOfVnodes
:
maxReplica
;
pVgroup
=
pVgroup
->
next
;
}
else
{
SVgObj
*
pVgroup
=
pDb
->
pHead
;
while
(
pVgroup
!=
NULL
)
{
maxReplica
=
pVgroup
->
numOfVnodes
>
maxReplica
?
pVgroup
->
numOfVnodes
:
maxReplica
;
pVgroup
=
pVgroup
->
next
;
}
}
for
(
int
i
=
0
;
i
<
maxReplica
;
++
i
)
{
...
...
@@ -276,10 +290,16 @@ int mgmtGetVgroupMeta(SMeterMeta *pMeta, SShowObj *pShow, SConnObj *pConn) {
pShow
->
offset
[
0
]
=
0
;
for
(
int
i
=
1
;
i
<
cols
;
++
i
)
pShow
->
offset
[
i
]
=
pShow
->
offset
[
i
-
1
]
+
pShow
->
bytes
[
i
-
1
];
pShow
->
numOfRows
=
pDb
->
numOfVgroups
;
pShow
->
pNode
=
pDb
->
pHead
;
pShow
->
rowSize
=
pShow
->
offset
[
cols
-
1
]
+
pShow
->
bytes
[
cols
-
1
];
if
(
NULL
==
pMeter
)
{
pShow
->
numOfRows
=
pDb
->
numOfVgroups
;
pShow
->
pNode
=
pDb
->
pHead
;
}
else
{
pShow
->
numOfRows
=
1
;
pShow
->
pNode
=
pVgroup
;
}
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录