Incorrect datetime results in ResultSetMetaData

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: ResultSetMetaData中查询datetime结果不正确

| username: TiDBer_VtkBZH6I

[TiDB Usage Environment] Test
[TiDB Version] 5.7.25-TiDB-v5.0.1
[Reproduction Path] When the begin_time field (datetime type, default is empty) has no data, using an automation tool to synchronize data results in an error.
[Encountered Problem: Phenomenon and Impact] When the begin_time field (datetime type, default is empty) has no data, using an automation tool to synchronize data results in an error. The issue was found to be due to the ResultSetMetaData fetching the begin_time field, where isNullable should normally be 0, but the query result shows 1, causing data synchronization to fail.
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]
The error when using the tool to synchronize data is as follows:


The ResultSetMetaData query result for TiDB is as follows:
image

The ResultSetMetaData query result for MySQL is as follows:
image

How can this be handled so that the query results are normal?

| username: tidb菜鸟一只 | Original post link

Are the table structures of MySQL and TiDB the same? Can you share them for a look?

| username: TiDBer_VtkBZH6I | Original post link

The images you provided are not visible. Please provide the text content you need translated.