tidb-lightning import succeeded, but data was truncated
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
If possible, provide a recipe for reproducing the error.
tidb-lightning import succeeded, but data was truncated
tidb-lightning version :
V6.0.0
DDL:
create table test(name char(10));
datafile:
[tidb2@172 data]$ cat test.test.0.csv
111111111111
tidb-lightning execution result:
[tidb2@172 v6.0.0]$ ./tidb-lightning -c tidb-lightning.toml
Verbose debug logs will be written to tidb-lightning.log
+---+----------------------------------------------+-------------+--------+
| # | CHECK ITEM | TYPE | PASSED |
+---+----------------------------------------------+-------------+--------+
| 1 | Source csv files size is proper | performance | true |
+---+----------------------------------------------+-------------+--------+
| 2 | checkpoints are valid | critical | true |
+---+----------------------------------------------+-------------+--------+
| 3 | table schemas are valid | critical | true |
+---+----------------------------------------------+-------------+--------+
| 4 | Cluster is available | critical | true |
+---+----------------------------------------------+-------------+--------+
| 5 | Lightning has the correct storage permission | critical | true |
+---+----------------------------------------------+-------------+--------+
tidb lightning exit successfully
select result:
mysql> select length(name) from test;
+--------------+
| length(name) |
+--------------+
| 10 |
+--------------+
toml:
backend = "local"
tidb sql-mode :
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
2. What did you expect to see?
If the length of the data exceeds the value defined by the column, the import reports an error instead of truncation
3. What did you see instead?
tidb lightning exit successfully
tidb-lightning import succeeded, but data was truncated
4. What version of BR and TiDB/TiKV/PD are you using?
V6.0.0
5. Operation logs
- Please upload `br.log` for BR if possible
- Please upload `tidb-lightning.log` for TiDB-Lightning if possible
- Please upload `tikv-importer.log` from TiKV-Importer if possible
- Other interesting logs
6. Configuration of the cluster and the task
- `tidb-lightning.toml` for TiDB-Lightning if possible
- `tikv-importer.toml` for TiKV-Importer if possible
- `topology.yml` if deployed by TiUP
7. Screenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus if possible
Contributor guide
Assessment
This issue has not been assessed yet.