Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql-compatibility: update ZERO_DATE docs (#5154) #5233

Merged
merged 1 commit into from
Dec 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions mysql-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,6 @@ TiDB 支持大部分 [SQL 模式](/sql-mode.md)。不支持的 SQL 模式如下

- MySQL 默认使用本地时区,依赖于系统内置的当前的时区规则(例如什么时候开始夏令时等)进行计算;且在未[导入时区表数据](https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html#time-zone-installation)的情况下不能通过时区名称来指定时区。

#### 零月和零日

- 与 MySQL 一样,TiDB 默认启用了 `NO_ZERO_DATE` 和 `NO_ZERO_IN_DATE` 模式,但是 TiDB 与 MySQL 在处理这两个 SQL 模式有以下不同:
- TiDB 在非严格模式下启用以上两个 SQL 模式,插入零月/零日/零日期不会给出警告,MySQL 则会给出对应的警告。
- TiDB 在严格模式下,启用了 `NO_ZERO_DATE`,仍然能够插入零日期;如果启用了 `NO_ZERO_IN_DATE` 则无法插入零月/零日日期。MySQL 在严格模式下则都无法插入两种类型的日期。

### 类型系统

+ 不支持 FLOAT4/FLOAT8。
Expand Down