Skip to content

Commit

Permalink
cherry pick pingcap#5069 to release-4.0 (pingcap#5074)
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
  • Loading branch information
ti-srebot and TomShawn authored Dec 10, 2020
1 parent c583725 commit 9bca06b
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 40 deletions.
Binary file removed media/sqlgram/BRIETables.png
Binary file not shown.
Binary file removed media/sqlgram/BackupOption.png
Binary file not shown.
Binary file removed media/sqlgram/BackupStmt.png
Binary file not shown.
Binary file removed media/sqlgram/BackupTSO.png
Binary file not shown.
Binary file removed media/sqlgram/Boolean.png
Binary file not shown.
Binary file removed media/sqlgram/RestoreOption.png
Binary file not shown.
Binary file removed media/sqlgram/RestoreStmt.png
Binary file not shown.
Binary file removed media/sqlgram/ShowBRIEStmt.png
Binary file not shown.
41 changes: 22 additions & 19 deletions sql-statements/sql-statement-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,28 @@ aliases: ['/docs-cn/stable/sql-statements/sql-statement-backup/','/docs-cn/v4.0/

## 语法图

**BackupStmt:**

![BackupStmt](/media/sqlgram/BackupStmt.png)

**BRIETables:**

![BRIETables](/media/sqlgram/BRIETables.png)

**BackupOption:**

![BackupOption](/media/sqlgram/BackupOption.png)

**Boolean:**

![Boolean](/media/sqlgram/Boolean.png)

**BackupTSO:**

![BackupTSO](/media/sqlgram/BackupTSO.png)
```ebnf+diagram
BackupStmt ::=
"BACKUP" BRIETables "TO" stringLit BackupOption*
BRIETables ::=
"DATABASE" ( '*' | DBName (',' DBName)* )
| "TABLE" TableNameList
BackupOption ::=
"RATE_LIMIT" '='? LengthNum "MB" '/' "SECOND"
| "CONCURRENCY" '='? LengthNum
| "CHECKSUM" '='? Boolean
| "SEND_CREDENTIALS_TO_TIKV" '='? Boolean
| "LAST_BACKUP" '='? BackupTSO
| "SNAPSHOT" '='? ( BackupTSO | LengthNum TimestampUnit "AGO" )
Boolean ::=
NUM | "TRUE" | "FALSE"
BackupTSO ::=
LengthNum | stringLit
```

## 示例

Expand Down
32 changes: 17 additions & 15 deletions sql-statements/sql-statement-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,23 @@ aliases: ['/docs-cn/stable/sql-statements/sql-statement-restore/','/docs-cn/v4.0

## 语法图

**RestoreStmt:**

![RestoreStmt](/media/sqlgram/RestoreStmt.png)

**BRIETables:**

![BRIETables](/media/sqlgram/BRIETables.png)

**RestoreOption:**

![RestoreOption](/media/sqlgram/RestoreOption.png)

**Boolean:**

![Boolean](/media/sqlgram/Boolean.png)
```ebnf+diagram
RestoreStmt ::=
"RESTORE" BRIETables "FROM" stringLit RestoreOption*
BRIETables ::=
"DATABASE" ( '*' | DBName (',' DBName)* )
| "TABLE" TableNameList
RestoreOption ::=
"RATE_LIMIT" '='? LengthNum "MB" '/' "SECOND"
| "CONCURRENCY" '='? LengthNum
| "CHECKSUM" '='? Boolean
| "SEND_CREDENTIALS_TO_TIKV" '='? Boolean
Boolean ::=
NUM | "TRUE" | "FALSE"
```

## 示例

Expand Down
13 changes: 7 additions & 6 deletions sql-statements/sql-statement-show-backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ aliases: ['/docs-cn/stable/sql-statements/sql-statement-show-backups/','/docs-cn

## 语法图

**ShowBRIEStmt:**
```ebnf+diagram
ShowBRIEStmt ::=
"SHOW" ("BACKUPS" | "RESTORES") ShowLikeOrWhere?
![ShowBRIEStmt](/media/sqlgram/ShowBRIEStmt.png)

**ShowLikeOrWhereOpt:**

![ShowLikeOrWhereOpt](/media/sqlgram/ShowLikeOrWhereOpt.png)
ShowLikeOrWhere ::=
"LIKE" SimpleExpr
| "WHERE" Expression
```

## 示例

Expand Down

0 comments on commit 9bca06b

Please sign in to comment.