From 9413b2d878a3b8f63d0821ccfc3aa3cbce0004b9 Mon Sep 17 00:00:00 2001 From: toutdesuite Date: Mon, 23 Mar 2020 20:03:14 +0800 Subject: [PATCH 1/2] sql: add explanation for different versions --- reference/sql/statements/use.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/sql/statements/use.md b/reference/sql/statements/use.md index 94a51865525c8..d0bc0dda8f1cd 100644 --- a/reference/sql/statements/use.md +++ b/reference/sql/statements/use.md @@ -71,7 +71,7 @@ mysql> SHOW TABLES; ## MySQL compatibility -This statement is understood to be fully compatible with MySQL. Any compatibility differences should be [reported via an issue](/report-issue.md) on GitHub. +For TiDB 2.0, you can use the `USE` statement to access any database. For TiDB 3.0 or later versions, it checks whether you have access to the database when using the `USE` statement. This statement is understood to be fully compatible with MySQL. Any compatibility differences should be [reported via an issue](/report-issue.md) on GitHub. ## See also From d14fa7419d3ea5855d1696f9d761e48ad659e0f7 Mon Sep 17 00:00:00 2001 From: toutdesuite Date: Tue, 24 Mar 2020 15:13:53 +0800 Subject: [PATCH 2/2] address comments --- reference/sql/statements/use.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/sql/statements/use.md b/reference/sql/statements/use.md index d0bc0dda8f1cd..224034e2cb7b9 100644 --- a/reference/sql/statements/use.md +++ b/reference/sql/statements/use.md @@ -71,7 +71,9 @@ mysql> SHOW TABLES; ## MySQL compatibility -For TiDB 2.0, you can use the `USE` statement to access any database. For TiDB 3.0 or later versions, it checks whether you have access to the database when using the `USE` statement. This statement is understood to be fully compatible with MySQL. Any compatibility differences should be [reported via an issue](/report-issue.md) on GitHub. +In TiDB 2.0 versions, you can use `USE` statements to access any database. In TiDB 3.0 or later versions, TiDB checks whether you have the privilege to access the database when you use `USE` statements. + +Currently, `USE` statements are understood to be fully compatible with MySQL. Any compatibility differences should be [reported via an issue](/report-issue.md) on GitHub. ## See also