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

desc is not compatible with MySQL #10337

Closed
lonng opened this issue May 3, 2019 · 1 comment
Closed

desc is not compatible with MySQL #10337

lonng opened this issue May 3, 2019 · 1 comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. type/compatibility

Comments

@lonng
Copy link
Contributor

lonng commented May 3, 2019

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
➜ tidiff --mysql.db=tt --tidb.db=tt 'select version()'
MySQL(127.0.0.1:3306)> select version()
+-----------+
| version() |
+-----------+
| 8.0.16    |
+-----------+
1 row in set (0.001 sec)

TiDB(127.0.0.1:4000)> select version()
+------------------------------------------+
| version()                                |
+------------------------------------------+
| 5.7.25-TiDB-v3.0.0-beta.1-187-g5876abd70 |
+------------------------------------------+
1 row in set (0.004 sec)

➜ tidiff --mysql.db=tt --tidb.db=tt 'create table t2 (a timestamp default current_timestamp on update current_timestamp)'
MySQL(127.0.0.1:3306)> create table t2 (a timestamp default current_timestamp on update current_timestamp)
Empty set
0 row in set (0.007 sec)

TiDB(127.0.0.1:4000)> create table t2 (a timestamp default current_timestamp on update current_timestamp)
Empty set
0 row in set (0.010 sec)

➜ tidiff --mysql.db=tt --tidb.db=tt desc t2
MySQL(127.0.0.1:3306)> desc t2
+----------------------------------------------------------------------------------------------------+
| Field | Type      | Null | Key | Default           | Extra                                         |
+----------------------------------------------------------------------------------------------------+
| a     | timestamp | YES  |     | CURRENT_TIMESTAMP | DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
+----------------------------------------------------------------------------------------------------+
1 row in set (0.004 sec)

TiDB(127.0.0.1:4000)> desc t2
+----------------------------------------------------------------------------------+
| Field | Type      | Null | Key | Default           | Extra                       |
+----------------------------------------------------------------------------------+
| a     | timestamp | YES  |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+----------------------------------------------------------------------------------+
1 row in set (0.004 sec)
  1. What did you expect to see?

The result shoud be same as MySQL

  1. What did you see instead?

Showing above.

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                                                                           |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v3.0.0-beta.1-187-g5876abd70
Git Commit Hash: 5876abd70ccc054704ab0e8cbf02ed129c6efc76
Git Branch: refine-point-get-failpoint
UTC Build Time: 2019-04-30 03:35:49
GoVersion: go version go1.12 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.003 sec)
@lonng lonng added type/compatibility good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels May 3, 2019
@lonng lonng closed this as completed Jul 23, 2019
@zimulala
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. type/compatibility
Projects
None yet
Development

No branches or pull requests

2 participants