Skip to content

Commit

Permalink
mysql-compatibility: update ZERO_DATE docs (#4436)
Browse files Browse the repository at this point in the history
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
  • Loading branch information
morgo and TomShawn authored Dec 22, 2020
1 parent 327cd91 commit 468a2ec
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions mysql-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,6 @@ TiDB supports most [SQL modes](/sql-mode.md):
+ TiDB uses all time zone rules currently installed in the system for calculation (usually the `tzdata` package). You can use all time zone names without importing the time zone table data. You cannot modify the calculation rules by importing the time zone table data.
+ MySQL uses the local time zone by default and relies on the current time zone rules built into the system (such as when to start daylight saving time) for calculation; and the time zone cannot be specified by the time zone name without [importing the time zone table data](https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html#time-zone-installation).

#### Zero month and zero day

By default, the `NO_ZERO_DATE` and `NO_ZERO_IN_DATE` modes are enabled in TiDB, which is the same in MySQL, but TiDB and MySQL handle the two SQL modes differently in the following aspects:

- The two SQL modes above are enabled in TiDB in the non-strict mode where no warning is prompted for inserting values of zero month/zero day/zero date. In MySQL, such `INSERT` operations prompt warning.
- In the strict mode, when `NO_ZERO_DATE` is enabled, you can still insert values of zero date; when `NO_ZERO_IN_DATE` is enabled, you cannot insert date of zero month/zero day. In the strict mode of MySQL, you can insert neither of them.

### Type system differences

The following column types are supported by MySQL, but **NOT** by TiDB:
Expand Down

0 comments on commit 468a2ec

Please sign in to comment.