From 9a521a0266ad2d9f0ccbc526e65ee91320648d36 Mon Sep 17 00:00:00 2001 From: Shuaipeng Yu Date: Mon, 25 May 2020 12:13:13 +0800 Subject: [PATCH 1/2] add shutdown statement Signed-off-by: Shuaipeng Yu --- sql-statements/sql-statement-shutdown.md | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 sql-statements/sql-statement-shutdown.md diff --git a/sql-statements/sql-statement-shutdown.md b/sql-statements/sql-statement-shutdown.md new file mode 100644 index 000000000000..8307b830a83c --- /dev/null +++ b/sql-statements/sql-statement-shutdown.md @@ -0,0 +1,36 @@ +--- +title: SHUTDOWN +summary: TiDB 数据库中 SHUTDOWN 的使用概况。 +category: reference +aliases: ['/docs-cn/dev/reference/sql/statements/shutdown/'] +--- + +# SHUTDOWN + +`SHUTDOWN` 语句用于在 TiDB 中执行停机操作。执行 `SHUTDOWN` 语句需要用户拥有 `SHUTDOWN privilege`。 + +## 语法图 + +**Statement:** + +![Statement](/media/sqlgram/Statement.png) + +## 示例 + +{{< copyable "sql" >}} + +```sql +SHUTDOWN; +``` + +``` +Query OK, 0 rows affected (0.00 sec) +``` + +## MySQL 兼容性 + +> **注意:** +> +> 由于 TiDB 是分布式数据库,因此 TiDB 中的停机操作停止的是客户端连接的 TiDB 实例,而不是整个 TiDB 集群。 + +`SHUTDOWN` 语句与 MySQL 不完全兼容。如有任何其他兼容性差异,请在 GitHub 上提交 [issue](/report-issue.md)。 From c3dab9b3140ba3e25fa7ce678326dbaec13e132d Mon Sep 17 00:00:00 2001 From: Shuaipeng Yu Date: Mon, 25 May 2020 14:47:07 +0800 Subject: [PATCH 2/2] update the gram Signed-off-by: Shuaipeng Yu --- media/sqlgram/ShutdownStmt.png | Bin 0 -> 2718 bytes sql-statements/sql-statement-shutdown.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 media/sqlgram/ShutdownStmt.png diff --git a/media/sqlgram/ShutdownStmt.png b/media/sqlgram/ShutdownStmt.png new file mode 100644 index 0000000000000000000000000000000000000000..31781abff7e172d868529f7b76102833b1a3d44c GIT binary patch literal 2718 zcmV;P3Ssq$P)004R> z004l5008;`004mK004C`008P>0026e000+ooVrmw00004XF*Lt006O$eEU(800001 zb5ch_0Itp)=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01m_e01m_fl`9S#000T~ zNkl|7F3WdU=rL~nGAw5YT z5U>so4tJilvz0eC-udX#$zypugc{nm=irKLnJliVy2|SHpdj#YcLx_&7Z@TE@$~3P z_&}GJSHSrT7a%<&qxC`a!_wNi+oAU>&RiVy5XOFX=;+>k`{yiLxB%XIb1n#lLY^1{ zDEY`yAosncrLFDlJC{$T7_%=zV*{9&lr$%1^M@dv{3^N(o(==a#bqq``T3gV$a3c^ zE$r^JHr^^4bP%Eo-naj&CEJE#>r%hHtqs2aHW6f58F1_7b$V{U04XdCTLQy|S<^cIh+F{;4fQZDBn+m#HmghD z$GD86=R_S!jHm55jdX_SnC%cx`cO!&N!>53t9d<|`+6xyve@^e;?r`WKAu7-6f#vd z&XN->2-h@K6qY|WkE5f!Keg)J1#qF{XBaWU9$pza3R+u#gFIO#9XNy#!8t20Bp|%h zMgqfPhjHF53W!|>em4siEUJ$+CPB*PYuo!QTHQcex(y>(d%1UFs_r)}wqwfK`4( zK01(v;ZDW^%m8Tng*2M=q(*g>_lGL4RL~obI($5zvmR)TveWhdP1CZ~>*#`7zIZ+z z2Pt6aajcenFtUKz0n{3lHYmvJ5-@tgG64Zq*iM6Ap%ZX2zd zq4e6U*--RT0fi9VIYL;FpG(W|GXhBCE@JiO1TUlz7Ubp7edE0)+=GP=T}kn2x{dJS zz6Pzlkzkt3+34ETLu8gukYyimshV2%)K$Uvc7~qX8HR4={Ga z@S(iy7sw@XA8JM9df2w_yV>4Bh4Jzgjy>`sK2Ae-=;O%}H4nwG!yA8c963<%1}Y_)p^Mp|w%R zMW_#=R&uV~5PI1Bkglz)hIS+@!))lfq2W%~M60=(dyv%fCoUNw{2@1!x?KcwCV9Yi z?TDcv0a`&+;Pjv;p8GulY(7cc@^dn&wbX~mc(Q$W(H&e60DEMbpV(uTfzt%(1^@v` z)tPv*C%pS|L2R!A(;i+R!iU+Xm$#TMsGQ7nno(l>WTx?ri-3IAOgcm&i!N=Mi-xFR zX{N{GVBz5Yt{Py$Q+#_eWDncj}$qg*hoAdzL1 zp#aK7WV>FKh;$Dj*9Z$z7MO2IW9|qSIazpj<^5${Zd|K`t;8j{dyc2mANVz&ys)5S zKnRqY)8f};64chQcfeb_g3LLw%0JCcxT6hZ_G zW5h8ou3GyOydadG4&L`1*}od({>K8ymL=b`WcU1B;8=jc?u_M+dpL^Ox#O87)!p+lyi8s{asQ%_s{4=eAG%M?IYsQ7n};{8hu1ezRpz6D5#_70j@=382E!N3)tfc!Q54t% zE>!y>w86-9npN#?Rabdm;*B5jWIe8rH}!T+$DF7gfkoF~=n`5(bjy|`>+Fp+?W@r3 zKKpMf>MIv&%Q)0Y98KeK{G;ou7h`>8$IGSWMnw=@B zslT_kxAUWK0;;aAf%0-Lxy6^^O9niIWrb;SmWA{90yZz>D|+KbP%4$GEw+gPHh;iF zh^nor3Edx`@Y^LmHZ-cf{w5JBDirF?O5%<^frU&%_Q7bcyR|k})d`2%pDy^ZFvP>d zL-3rvJx_!Y0NnRgJh#mPbC>}zYf{L!3W(tw*MKn}&}TdnuKIVB#pGWOE`}EO>bICY*>aq0=xdbMUT0eulp#yav7g Y4{}xTD+B5?Pyhe`07*qoM6N<$g45vyUjP6A literal 0 HcmV?d00001 diff --git a/sql-statements/sql-statement-shutdown.md b/sql-statements/sql-statement-shutdown.md index 8307b830a83c..1142a953b7d9 100644 --- a/sql-statements/sql-statement-shutdown.md +++ b/sql-statements/sql-statement-shutdown.md @@ -13,7 +13,7 @@ aliases: ['/docs-cn/dev/reference/sql/statements/shutdown/'] **Statement:** -![Statement](/media/sqlgram/Statement.png) +![Statement](/media/sqlgram/ShutdownStmt.png) ## 示例