From 976e11520c542c6d2e4c981d8358d655f6a685f1 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Sun, 11 Nov 2018 19:06:07 +0100 Subject: [PATCH 1/4] sql: Add SQL mode details --- sql/mysql-compatibility.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql/mysql-compatibility.md b/sql/mysql-compatibility.md index 4fe996b1b0afe..3b50996a3df1f 100644 --- a/sql/mysql-compatibility.md +++ b/sql/mysql-compatibility.md @@ -166,6 +166,15 @@ Create Table: CREATE TABLE `t1` ( Architecturally, TiDB does support a similar storage engine abstraction to MySQL, and user tables are created in the engine specified by the [`--store`](server-command-option.md#--store) option used when you start tidb-server (typically `tikv`). +### SQL Modes + +TiDB supports **all the SQL modes** from MySQL 5.7 with minor exceptions: + +1. The `ALLOW_INVALID_DATES` move is not yet supported. See [TiDB #8263](https://github.com/pingcap/tidb/issues/8263). +2. The compatibility modes deprecated in MySQL 5.7 and removed in MySQL 8.0 are not supported. +3. The mode `ONLY_FULL_GROUP_BY` has minor [semantic differences](../sql/aggregate-group-by-functions.md#differences-from-mysql) to MySQL 5.7, which we plan to address in the future. +4. The SQL modes `NO_DIR_IN_CREATE` and `NO_ENGINE_SUBSTITUTION` are supported for compatibility, but are not applicable to TiDB. + ### EXPLAIN The output of the query execution plan returned from the `EXPLAIN` command differs from MySQL. For more information, see [Understand the Query Execution Plan](../sql/understanding-the-query-execution-plan.md). From 664a9ccfb17e164021d813788bb68630e267446c Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Sun, 11 Nov 2018 19:08:37 +0100 Subject: [PATCH 2/4] remove double space --- sql/mysql-compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysql-compatibility.md b/sql/mysql-compatibility.md index 3b50996a3df1f..2ea75b891758c 100644 --- a/sql/mysql-compatibility.md +++ b/sql/mysql-compatibility.md @@ -170,7 +170,7 @@ Architecturally, TiDB does support a similar storage engine abstraction to MySQL TiDB supports **all the SQL modes** from MySQL 5.7 with minor exceptions: -1. The `ALLOW_INVALID_DATES` move is not yet supported. See [TiDB #8263](https://github.com/pingcap/tidb/issues/8263). +1. The `ALLOW_INVALID_DATES` move is not yet supported. See [TiDB #8263](https://github.com/pingcap/tidb/issues/8263). 2. The compatibility modes deprecated in MySQL 5.7 and removed in MySQL 8.0 are not supported. 3. The mode `ONLY_FULL_GROUP_BY` has minor [semantic differences](../sql/aggregate-group-by-functions.md#differences-from-mysql) to MySQL 5.7, which we plan to address in the future. 4. The SQL modes `NO_DIR_IN_CREATE` and `NO_ENGINE_SUBSTITUTION` are supported for compatibility, but are not applicable to TiDB. From 0ff13073601de839defeee33f6aafec1fedb49ea Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Sun, 11 Nov 2018 19:10:41 +0100 Subject: [PATCH 3/4] Update mysql-compatibility.md --- sql/mysql-compatibility.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/mysql-compatibility.md b/sql/mysql-compatibility.md index 2ea75b891758c..ee7018cca4280 100644 --- a/sql/mysql-compatibility.md +++ b/sql/mysql-compatibility.md @@ -170,8 +170,8 @@ Architecturally, TiDB does support a similar storage engine abstraction to MySQL TiDB supports **all the SQL modes** from MySQL 5.7 with minor exceptions: -1. The `ALLOW_INVALID_DATES` move is not yet supported. See [TiDB #8263](https://github.com/pingcap/tidb/issues/8263). -2. The compatibility modes deprecated in MySQL 5.7 and removed in MySQL 8.0 are not supported. +1. The `ALLOW_INVALID_DATES` mode is not yet supported. See [TiDB #8263](https://github.com/pingcap/tidb/issues/8263). +2. The compatibility modes deprecated in MySQL 5.7 and removed in MySQL 8.0 are not supported (such as `ORACLE`, `POSTGRESQL` etc). 3. The mode `ONLY_FULL_GROUP_BY` has minor [semantic differences](../sql/aggregate-group-by-functions.md#differences-from-mysql) to MySQL 5.7, which we plan to address in the future. 4. The SQL modes `NO_DIR_IN_CREATE` and `NO_ENGINE_SUBSTITUTION` are supported for compatibility, but are not applicable to TiDB. From 498d66651dbd5df476989d9d15c969f6133f0605 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Sun, 11 Nov 2018 20:24:17 +0100 Subject: [PATCH 4/4] Update mysql-compatibility.md --- sql/mysql-compatibility.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysql-compatibility.md b/sql/mysql-compatibility.md index ee7018cca4280..057634b877b63 100644 --- a/sql/mysql-compatibility.md +++ b/sql/mysql-compatibility.md @@ -168,7 +168,7 @@ Architecturally, TiDB does support a similar storage engine abstraction to MySQL ### SQL Modes -TiDB supports **all the SQL modes** from MySQL 5.7 with minor exceptions: +TiDB supports **all of the SQL modes** from MySQL 5.7 with minor exceptions: 1. The `ALLOW_INVALID_DATES` mode is not yet supported. See [TiDB #8263](https://github.com/pingcap/tidb/issues/8263). 2. The compatibility modes deprecated in MySQL 5.7 and removed in MySQL 8.0 are not supported (such as `ORACLE`, `POSTGRESQL` etc).