From bf192bc3d23dc4a7981690e11540eb8a9ca878d8 Mon Sep 17 00:00:00 2001 From: Lynn Date: Thu, 18 Jun 2020 15:23:52 +0800 Subject: [PATCH] cherry pick #2922 to release-4.0 Signed-off-by: ti-srebot --- sql-statements/sql-statement-add-index.md | 1 + sql-statements/sql-statement-begin.md | 4 +++- sql-statements/sql-statement-change-column.md | 2 ++ sql-statements/sql-statement-commit.md | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-add-index.md b/sql-statements/sql-statement-add-index.md index 9344bb490ae80..1d78682232cf3 100644 --- a/sql-statements/sql-statement-add-index.md +++ b/sql-statements/sql-statement-add-index.md @@ -67,6 +67,7 @@ mysql> EXPLAIN SELECT * FROM t1 WHERE c1 = 3; ## MySQL compatibility * `FULLTEXT`, `HASH` and `SPATIAL` indexes are not supported. +* `VISIBLE/INVISIBLE` index is not supported (currently only the master branch actually supports this feature). * Descending indexes are not supported (similar to MySQL 5.7). * Adding multiple indexes at the same time is currently not supported. * Adding the primary key constraint to a table is not supported by default. You can enable the feature by setting the `alter-primary-key` configuration item to `true`. For details, see [alter-primary-key](/tidb-configuration-file.md#alter-primary-key). diff --git a/sql-statements/sql-statement-begin.md b/sql-statements/sql-statement-begin.md index 630ce3b645bbd..a794ea777ccde 100644 --- a/sql-statements/sql-statement-begin.md +++ b/sql-statements/sql-statement-begin.md @@ -35,10 +35,12 @@ Query OK, 0 rows affected (0.01 sec) ## 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. +You can add the `PESSIMISTIC` or `OPTIMISTIC` option to the `BEGIN` statement in TiDB to indicate the type of transaction that this statement starts. ## See also * [COMMIT](/sql-statements/sql-statement-commit.md) * [ROLLBACK](/sql-statements/sql-statement-rollback.md) * [START TRANSACTION](/sql-statements/sql-statement-start-transaction.md) +* [TiDB optimistic transaction model](/optimistic-transaction.md) +* [TiDB pessimistic transaction model](/pessimistic-transaction.md) diff --git a/sql-statements/sql-statement-change-column.md b/sql-statements/sql-statement-change-column.md index 61c13f25d2c3b..56c8b91c72c28 100644 --- a/sql-statements/sql-statement-change-column.md +++ b/sql-statements/sql-statement-change-column.md @@ -65,6 +65,8 @@ ERROR 1105 (HY000): can't run multi schema change * Making multiple changes in a single `ALTER TABLE` statement is not currently supported. * Only certain types of data type changes are supported. For example, an `INTEGER` to `BIGINT` is supported, but the reverse is not possible. Changing from an integer to a string format or blob is not supported. +* Modifying precision of the `DECIMAL` type is not supported. +* Changing the `UNSIGNED` attribute is not supported. ## See also diff --git a/sql-statements/sql-statement-commit.md b/sql-statements/sql-statement-commit.md index 064c3860a84f2..274f6bddac604 100644 --- a/sql-statements/sql-statement-commit.md +++ b/sql-statements/sql-statement-commit.md @@ -17,6 +17,10 @@ In the absence of a `BEGIN` or `START TRANSACTION` statement, the default behavi ![CommitStmt](/media/sqlgram/CommitStmt.png) +**CompletionTypeWithinTransaction:** + +![CompletionTypeWithinTransaction](/media/sqlgram/CompletionTypeWithinTransaction.png) + ## Examples ```sql