From 53fb5b85e94b7055613517b8d2442eb094a90f7b 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 de3535fedeb5c..8813c210319ea 100644 --- a/sql-statements/sql-statement-show-create-user.md +++ b/sql-statements/sql-statement-show-create-user.md @@ -9,13 +9,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 @@ -39,7 +36,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 b6ca0adb7bbf8f1fc5540f05a2a1f314d3baef8c 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 8813c210319ea..f89b089003a9c 100644 --- a/sql-statements/sql-statement-show-create-user.md +++ b/sql-statements/sql-statement-show-create-user.md @@ -11,7 +11,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 cc07d25c18ffb726eaf5680b0f52a9acde347dec 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 f89b089003a9c..a9fdeb21f4104 100644 --- a/sql-statements/sql-statement-show-create-user.md +++ b/sql-statements/sql-statement-show-create-user.md @@ -36,7 +36,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 cb5202fa23786b8a29a7dccec6fabb37f00e350f 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 a9fdeb21f4104..7d1da873ce8c2 100644 --- a/sql-statements/sql-statement-show-create-user.md +++ b/sql-statements/sql-statement-show-create-user.md @@ -36,8 +36,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)