Skip to content

lightning: incorrect datatime value when sql-mode is NO_ZERO_IN_DATE #50757

Closed
@GMHDBJD

Description

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

affects-4.0This bug affects 4.0.x versions.affects-5.0This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.component/lightningThis issue is related to Lightning of TiDB.report/customerCustomers have encountered this bug.severity/minortype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions