lightning: incorrect datatime value when sql-mode is NO_ZERO_IN_DATE #50757
Closed
Description
opened on Jan 26, 2024
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
sql-mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,IGNORE_SPACE'
$ tiup tidb-lightning:v7.1.3 -config a.toml -check-requirements=0
Starting component `tidb-lightning`: /home/tidb/.tiup/components/tidb-lightning/v7.1.3/tidb-lightning -config a.toml -check-requirements=0
Verbose debug logs will be written to tidb-lightning0125-01.logtidb lightning encountered error: [Lightning:Restore:ErrEncodeKV]encode kv error in file test.share_inventory_range_bak.0000000010000.sql:0 at offset 1005: failed to cast value as datetime BINARY for column `end_time` (#17): [types:1292]Incorrect datetime value: '1990-01-00 00:00:00'
2. What did you expect to see? (Required)
load data succeed
3. What did you see instead (Required)
[types:1292]Incorrect datetime value: '1990-01-00 00:00:00'
4. What is your TiDB version? (Required)
Metadata
Assignees
Labels
This bug affects 4.0.x versions.This bug affects 5.0.x versions.This bug affects 5.1.x versions.This bug affects 5.2.x versions.This bug affects 5.3.x versions.This bug affects the 5.4.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.This issue is related to Lightning of TiDB.Customers have encountered this bug.The issue is confirmed as a bug.
Activity