Skip to content

Commit

Permalink
update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
yikeke committed Apr 2, 2019
1 parent 004de09 commit d5ff644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ mysql> COMMIT;
ERROR 1062 (23000): Duplicate entry 'bill' for key 'username'
```

* 第一个 `INSERT` 语句不会导致重复键错误,这同 MySQL 的规则一致。该检查将推迟到事务提交时才会进行。
* 第一条 `INSERT` 语句不会导致重复键错误,这同 MySQL 的规则一致。该检查将推迟到事务提交时才会进行。

如果将 `tidb_constraint_check_in_place` 更改为 `TRUE`,则会在执行语句时就对唯一约束进行检查。例如:

Expand All @@ -143,4 +143,4 @@ ERROR 1062 (23000): Duplicate entry 'bill' for key 'username'
..
```

* 第一个 `INSERT` 语句导致了重复键错误。这会造成额外的网络通信开销,并可能降低插入操作的吞吐量。
* 第一条 `INSERT` 语句导致了重复键错误。这会造成额外的网络通信开销,并可能降低插入操作的吞吐量。

0 comments on commit d5ff644

Please sign in to comment.