|
61 | 61 | _ StmtNode = &CompactTableStmt{} |
62 | 62 | _ StmtNode = &SetResourceGroupStmt{} |
63 | 63 | _ StmtNode = &TrafficStmt{} |
| 64 | + _ StmtNode = &RecommendIndexStmt{} |
64 | 65 |
|
65 | 66 | _ Node = &PrivElem{} |
66 | 67 | _ Node = &VariableAssignment{} |
@@ -1396,41 +1397,6 @@ func (n *SetPwdStmt) Accept(v Visitor) (Node, bool) { |
1396 | 1397 | return v.Leave(n) |
1397 | 1398 | } |
1398 | 1399 |
|
1399 | | -type ChangeStmt struct { |
1400 | | - stmtNode |
1401 | | - |
1402 | | - NodeType string |
1403 | | - State string |
1404 | | - NodeID string |
1405 | | -} |
1406 | | - |
1407 | | -// Restore implements Node interface. |
1408 | | -func (n *ChangeStmt) Restore(ctx *format.RestoreCtx) error { |
1409 | | - ctx.WriteKeyWord("CHANGE ") |
1410 | | - ctx.WriteKeyWord(n.NodeType) |
1411 | | - ctx.WriteKeyWord(" TO NODE_STATE ") |
1412 | | - ctx.WritePlain("=") |
1413 | | - ctx.WriteString(n.State) |
1414 | | - ctx.WriteKeyWord(" FOR NODE_ID ") |
1415 | | - ctx.WriteString(n.NodeID) |
1416 | | - return nil |
1417 | | -} |
1418 | | - |
1419 | | -// SecureText implements SensitiveStatement interface. |
1420 | | -func (n *ChangeStmt) SecureText() string { |
1421 | | - return fmt.Sprintf("change %s to node_state='%s' for node_id '%s'", strings.ToLower(n.NodeType), n.State, n.NodeID) |
1422 | | -} |
1423 | | - |
1424 | | -// Accept implements Node Accept interface. |
1425 | | -func (n *ChangeStmt) Accept(v Visitor) (Node, bool) { |
1426 | | - newNode, skipChildren := v.Enter(n) |
1427 | | - if skipChildren { |
1428 | | - return v.Leave(newNode) |
1429 | | - } |
1430 | | - n = newNode.(*ChangeStmt) |
1431 | | - return v.Leave(n) |
1432 | | -} |
1433 | | - |
1434 | 1400 | // SetRoleStmtType is the type for FLUSH statement. |
1435 | 1401 | type SetRoleStmtType int |
1436 | 1402 |
|
@@ -2571,6 +2537,8 @@ const ( |
2571 | 2537 | AdminUnsetBDRRole |
2572 | 2538 | AdminAlterDDLJob |
2573 | 2539 | AdminWorkloadRepoCreate |
| 2540 | + // adminTpCount is the total number of admin statement types. |
| 2541 | + adminTpCount |
2574 | 2542 | ) |
2575 | 2543 |
|
2576 | 2544 | // HandleRange represents a range where handle value >= Begin and < End. |
@@ -3505,6 +3473,8 @@ const ( |
3505 | 3473 | BRIEKindShowJob |
3506 | 3474 | BRIEKindShowQuery |
3507 | 3475 | BRIEKindShowBackupMeta |
| 3476 | + // brieKindCount is the total number of BRIE kinds. |
| 3477 | + brieKindCount |
3508 | 3478 | // common BRIE options |
3509 | 3479 | BRIEOptionRateLimit BRIEOptionType = iota + 1 |
3510 | 3480 | BRIEOptionConcurrency |
|
0 commit comments