From b40a15e3b61da1be335bb05494b08e9b0343a229 Mon Sep 17 00:00:00 2001 From: DocClaw <41385396+doc-claw-bot@users.noreply.github.com> Date: Thu, 10 Sep 2026 18:19:41 +0800 Subject: [PATCH 1/2] This is an automated cherry-pick of #23742 Signed-off-by: ti-chi-bot --- sql-statements/sql-statement-grant-privileges.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql-statements/sql-statement-grant-privileges.md b/sql-statements/sql-statement-grant-privileges.md index adedcb211f1af..7a041d1f235f1 100644 --- a/sql-statements/sql-statement-grant-privileges.md +++ b/sql-statements/sql-statement-grant-privileges.md @@ -83,7 +83,12 @@ mysql> SHOW GRANTS FOR 'newuser'; ## MySQL compatibility * Similar to MySQL, the `USAGE` privilege denotes the ability to log into a TiDB server. +<<<<<<< HEAD * Column level privileges are not currently supported. +======= +* Unlike MySQL, TiDB does not support `GRANT PROXY`. +* Starting from v8.5.6, TiDB supports a MySQL-compatible column-level privilege management mechanism. You can grant or revoke `SELECT`, `INSERT`, `UPDATE`, and `REFERENCES` privileges on specific columns in a specified table. For more information, see [Column-Level Privilege Management](/column-privilege-management.md). +>>>>>>> 8d85871d64 (sql: document unsupported GRANT PROXY in MySQL compatibility (#23742)) * Similar to MySQL, when the `NO_AUTO_CREATE_USER` sql mode is not present, the `GRANT` statement will automatically create a new user with an empty password when a user does not exist. Removing this sql-mode (it is enabled by default) presents a security risk. * In TiDB, after the `GRANT ` statement is executed successfully, the execution result takes effect immediately on the current connection. Whereas [in MySQL, for some privileges, the execution results take effect only on subsequent connections](https://dev.mysql.com/doc/refman/8.0/en/privilege-changes.html). See [TiDB #39356](https://github.com/pingcap/tidb/issues/39356) for details. From 7d44c2461e58ea5ecfd2dc000de8345fd296ee39 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 10 Sep 2026 22:28:43 +0800 Subject: [PATCH 2/2] Update sql-statements/sql-statement-grant-privileges.md --- sql-statements/sql-statement-grant-privileges.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sql-statements/sql-statement-grant-privileges.md b/sql-statements/sql-statement-grant-privileges.md index 7a041d1f235f1..42b508888b820 100644 --- a/sql-statements/sql-statement-grant-privileges.md +++ b/sql-statements/sql-statement-grant-privileges.md @@ -83,12 +83,8 @@ mysql> SHOW GRANTS FOR 'newuser'; ## MySQL compatibility * Similar to MySQL, the `USAGE` privilege denotes the ability to log into a TiDB server. -<<<<<<< HEAD * Column level privileges are not currently supported. -======= * Unlike MySQL, TiDB does not support `GRANT PROXY`. -* Starting from v8.5.6, TiDB supports a MySQL-compatible column-level privilege management mechanism. You can grant or revoke `SELECT`, `INSERT`, `UPDATE`, and `REFERENCES` privileges on specific columns in a specified table. For more information, see [Column-Level Privilege Management](/column-privilege-management.md). ->>>>>>> 8d85871d64 (sql: document unsupported GRANT PROXY in MySQL compatibility (#23742)) * Similar to MySQL, when the `NO_AUTO_CREATE_USER` sql mode is not present, the `GRANT` statement will automatically create a new user with an empty password when a user does not exist. Removing this sql-mode (it is enabled by default) presents a security risk. * In TiDB, after the `GRANT ` statement is executed successfully, the execution result takes effect immediately on the current connection. Whereas [in MySQL, for some privileges, the execution results take effect only on subsequent connections](https://dev.mysql.com/doc/refman/8.0/en/privilege-changes.html). See [TiDB #39356](https://github.com/pingcap/tidb/issues/39356) for details.