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

Update "Type system differences" for MySQL Compatibility #4115

Merged
merged 1 commit into from
Nov 2, 2020

Commits on Oct 30, 2020

  1. Update "Type system differences" for MySQL Compatibility

    TiDB:
    ```
    mysql> SELECT tidb_version()\G
    *************************** 1. row ***************************
    tidb_version(): Release Version: v4.0.8
    Edition: Community
    Git Commit Hash: 66ac9fc31f1733e5eb8d11891ec1b38f9c422817
    Git Branch: heads/refs/tags/v4.0.8
    UTC Build Time: 2020-10-30 08:21:16
    GoVersion: go1.13
    Race Enabled: false
    TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
    Check Table Before Drop: false
    1 row in set (0.00 sec)
    
    mysql> CREATE TABLE t1 (id SERIAL, y SQL_TSI_YEAR, f FIXED(4,2));
    Query OK, 0 rows affected (0.11 sec)
    
    mysql> SHOW CREATE TABLE t1\G
    *************************** 1. row ***************************
           Table: t1
    Create Table: CREATE TABLE `t1` (
      `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      `y` year(4) DEFAULT NULL,
      `f` decimal(4,2) DEFAULT NULL,
      UNIQUE KEY `id` (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
    1 row in set (0.01 sec)
    ```
    
    MySQL:
    ```
    mysql> SELECT VERSION();
    +-----------+
    | VERSION() |
    +-----------+
    | 8.0.20    |
    +-----------+
    1 row in set (0.00 sec)
    
    mysql> CREATE TABLE t1 (id SERIAL, y SQL_TSI_YEAR, f FIXED(4,2));
    Query OK, 0 rows affected (0.06 sec)
    
    mysql> SHOW CREATE TABLE t1\G
    *************************** 1. row ***************************
           Table: t1
    Create Table: CREATE TABLE `t1` (
      `id` bigint unsigned NOT NULL AUTO_INCREMENT,
      `y` year DEFAULT NULL,
      `f` decimal(4,2) DEFAULT NULL,
      UNIQUE KEY `id` (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
    1 row in set (0.00 sec)
    ```
    dveeden committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    09081fd View commit details
    Browse the repository at this point in the history