From 783031d7a25b28368407d6c201828d84fee3bcbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 9 Apr 2024 09:31:10 +0200 Subject: [PATCH 1/4] ebnf show create user --- sql-statements/sql-statement-show-create-user.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sql-statements/sql-statement-show-create-user.md b/sql-statements/sql-statement-show-create-user.md index d43ffbce8cad7..c2197c1520aec 100644 --- a/sql-statements/sql-statement-show-create-user.md +++ b/sql-statements/sql-statement-show-create-user.md @@ -10,13 +10,10 @@ This statement shows how to re-create a user using the `CREATE USER` syntax. ## Synopsis -**ShowCreateUserStmt:** - -![ShowCreateUserStmt](/media/sqlgram/ShowCreateUserStmt.png) - -**Username:** - -![Username](/media/sqlgram/Username.png) +```ebnf+diagram +ShowCreateUserStmt ::= + "SHOW" "CREATE" "USER" (Username ("@" Hostname)? | CURRENT_USER "()"? ) +``` ## Examples @@ -40,7 +37,7 @@ mysql> SHOW GRANTS FOR 'root'; ## MySQL compatibility -* The output of `SHOW CREATE USER` is designed to match MySQL, but several of the `CREATE` options are not yet supported by TiDB. Not yet supported options will be parsed but ignored. See [security compatibility] for more details. +* The output of `SHOW CREATE USER` is designed to match MySQL, but several of the `CREATE` options are not yet supported by TiDB. Not yet supported options will be parsed but ignored. See [security compatibility](/security-compatibility-with-mysql.md) for more details. ## See also From 8b73b5d6822c6c00c19e405c36079adbd21207cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 9 Apr 2024 17:06:12 +0200 Subject: [PATCH 2/4] Update sql-statements/sql-statement-show-create-user.md Co-authored-by: kennytm --- sql-statements/sql-statement-show-create-user.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-show-create-user.md b/sql-statements/sql-statement-show-create-user.md index c2197c1520aec..10b00b842c82d 100644 --- a/sql-statements/sql-statement-show-create-user.md +++ b/sql-statements/sql-statement-show-create-user.md @@ -12,7 +12,7 @@ This statement shows how to re-create a user using the `CREATE USER` syntax. ```ebnf+diagram ShowCreateUserStmt ::= - "SHOW" "CREATE" "USER" (Username ("@" Hostname)? | CURRENT_USER "()"? ) + "SHOW" "CREATE" "USER" (Username ("@" Hostname)? | "CURRENT_USER" ( "(" ")" )? ) ``` ## Examples From 9c842716a10c4b9c6ab31d7ce7d0f9e7269b0635 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 18 Apr 2024 10:30:19 +0800 Subject: [PATCH 3/4] wording updates --- sql-statements/sql-statement-show-create-user.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-show-create-user.md b/sql-statements/sql-statement-show-create-user.md index 10b00b842c82d..41fa5dcec8559 100644 --- a/sql-statements/sql-statement-show-create-user.md +++ b/sql-statements/sql-statement-show-create-user.md @@ -37,7 +37,7 @@ mysql> SHOW GRANTS FOR 'root'; ## MySQL compatibility -* The output of `SHOW CREATE USER` is designed to match MySQL, but several of the `CREATE` options are not yet supported by TiDB. Not yet supported options will be parsed but ignored. See [security compatibility](/security-compatibility-with-mysql.md) for more details. +* The output of `SHOW CREATE USER` is designed to match MySQL, but several of the `CREATE` options are not yet supported by TiDB. Not yet supported options will be parsed but ignored. See [Security compatibility](/security-compatibility-with-mysql.md) for more details. ## See also From b536e5c5ccda9d651ae23b8a49ca9153d1125b87 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 18 Apr 2024 10:41:39 +0800 Subject: [PATCH 4/4] fix broken links --- sql-statements/sql-statement-show-create-user.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sql-statements/sql-statement-show-create-user.md b/sql-statements/sql-statement-show-create-user.md index 41fa5dcec8559..b952c2dca3da3 100644 --- a/sql-statements/sql-statement-show-create-user.md +++ b/sql-statements/sql-statement-show-create-user.md @@ -37,8 +37,18 @@ mysql> SHOW GRANTS FOR 'root'; ## MySQL compatibility + + * The output of `SHOW CREATE USER` is designed to match MySQL, but several of the `CREATE` options are not yet supported by TiDB. Not yet supported options will be parsed but ignored. See [Security compatibility](/security-compatibility-with-mysql.md) for more details. + + + + +* The output of `SHOW CREATE USER` is designed to match MySQL, but several of the `CREATE` options are not yet supported by TiDB. Not yet supported options will be parsed but ignored. See [Security compatibility](https://docs.pingcap.com/tidb/stable/security-compatibility-with-mysql/) for more details. + + + ## See also * [CREATE USER](/sql-statements/sql-statement-create-user.md)