Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
We have a data set stored in Tidb (a distributed mysql database), a field in the database is Timestamp type, there will be data items such as 0000-00-00 00:00:00
If the jdbc connection parameter does not add the zeroDateTimeBehavior=xx command, the query will report an error, but the zeroDateTimeBehavior=convertToNull command seems to cause the “Enumerable bind” process to freeze and the query does not respond.
SQL:
select * from `catalog_name`.`database_name`.`table_name` limit 1;
zeroDateTimeBehavior=round will be ok
{ "version":"1.0", "defaultSchema":"icuser", "schemas":[ { "name":"tidb_test", "type":"custom", "factory":"com.xxxx.TidbCatalogSchema$Factory", "operand":{ "jdbcDriver":"com.mysql.cj.jdbc.Driver", "jdbcUrl":"jdbc:mysql://xxxxxx:4037/xx? zeroDateTimeBehavior=round ", "jdbcUser":"mysql", "jdbcPassword":"mysql" } } ] }
zeroDateTimeBehavior=convertToNull will cause stuck
{ "version": "1.0", "defaultSchema": "icuser", "schemas": [{ "name": "tidb_test", "type": "custom", "factory": "com.xxxx.TidbCatalogSchema$Factory", "operand": { "jdbcDriver": "com.mysql.cj.jdbc.Driver", "jdbcUrl": "jdbc:mysql://xxxxxx:4037/xx? zeroDateTimeBehavior=convertToNull", "jdbcUser": "mysql", "jdbcPassword": "mysql" } } ] }