pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.04k stars 5.82k forks source link

Test compatibility using DataGrip #5892

Closed ngaut closed 1 year ago

ngaut commented 6 years ago

DataGrip is a Database management systems that support many databases, including MySQL. See https://www.jetbrains.com/datagrip/

shenli commented 6 years ago

In the first step, we need to check if there is any issue when running datagrid on TiDB.

liangmingran commented 6 years ago

first find a error report when runing datagrid on TiDB.

Error encountered when performing Introspect schema INFORMATION_SCHEMA: Unknown column 'generation_expression' in 'field list'.
Unknown column 'generation_expression' in 'field list'
and 5 duplicate reports (3 s 507 ms)

then datagrip cannot perform sql completion when runing datagrid on TiDB

coocood commented 6 years ago

@liangmingran Thank you for your report.

Xuanwo commented 6 years ago

The same issue: https://github.com/pingcap/tidb/issues/6949

IDEA and datagrip use the same sql plugin.

ghost commented 4 years ago

I downloaded DataGrip and manually verified that everything seems to work. I did manage to produce one unsupported query, when right clicking on a query to explain it:

[2020/09/01 20:56:52.651 -06:00] [INFO] [conn.go:745] ["command dispatched failed"] [conn=12] [connInfo="id:12, addr:127.0.0.1:34728 status:10, collation:utf8_general_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="/* ApplicationName=DataGrip 2020.2.2 */ explain extended SELECT * FROM test1"] [txn_mode=PESSIMISTIC] [err="[parser:1064]You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 63 near \"SELECT * FROM test1\" "]

I think this is acceptable since even if EXPLAIN EXTENDED was supported, the execution plan looks very different in TiDB. DataGrip still remains completely usable as well, so I am going to go ahead and close this issue.

zhushuaiCoding commented 3 years ago

Now I check the introspect using jdbc metadata option on the datagrip, which can cause the presentation information of the table to not be seen. image image

morgo commented 3 years ago

@zhushuaiCoding can you confirm what version of TiDB you are using, by executing select tidb_version().

This appears to be the same issue reported in https://github.com/pingcap/tidb/issues/6949 which has since been fixed.

zhushuaiCoding commented 3 years ago

Sorry, I didn't use tidb directly. I simply installed MySQL locally, and then the datagrip connection reported this error. Gothub search this problem, want to solve this problem, asked this problem, caused trouble to you, really sorry.

At 2021-03-11 11:17:09, "Morgan Tocker" notifications@github.com wrote:

@zhushuaiCoding can you confirm what version of TiDB you are using, by executing select tidb_version().

This appears to be the same issue reported in #6949 which has since been fixed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

634750802 commented 2 years ago

Without introspect using jdbc metadata enabled, DataGrip couldn't fetch schema info and raise an exception:

Error: [42000][1253] COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4'.

DataGrip version: 2021.2.4

Release Version: v5.4.0-2-g2506c8651 Edition: Community Git Commit Hash: 2506c8651c9614e3817891f107ff46bc0fae4fb4 Git Branch: HEAD UTC Build Time: 2022-02-16 08:54:10 GoVersion: go1.16.4 Race Enabled: false TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 Check Table Before Drop: false

WaitRainbow commented 2 years ago

yes... I finally found someone who had encountered the same as me.

I finally tried using Navicat to connect TiDB and it worked. But I still want to know what is the problem with DataGrip connecting to TIDB, have you found a solution to this problem?

634750802 commented 2 years ago

I think JetBrains has already supported TiDB officially now?

rudian commented 1 year ago

still haven't supported yet... dont know how long gonna wait

dveeden commented 1 year ago

still haven't supported yet... dont know how long gonna wait

Hello. Do you get any error or missing functionality when you try this? What is the TiDB and DataGrip version?

dveeden commented 1 year ago

Some info I found on this:

dveeden commented 1 year ago

There is a TiDB option in DataGrip 2023.1.2 image

dveeden commented 1 year ago

Some basic testing results are in https://youtrack.jetbrains.com/issue/DBE-14973/Add-TiDB-support#focus=Comments-27-7471752.0-0

dveeden commented 1 year ago

Basic support for TiDB in DataGrip seems to work well. There is some room for improvement, but I don't think there is much or anything we can do on the TiDB side at this moment to help with that.

Feel free to re-open this issue and/or create a new issue if there are specific issues with recent versions of DataGrip or any of the JetBrains tools for which improvements in TiDB could help.

dveeden commented 1 year ago

Note that DataGrip is already listed on https://docs.pingcap.com/tidb/stable/dev-guide-third-party-support#gui