Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightning:When importing non-enumerated values in Lightning, everything imports successfully without errors or prompts, and the inserted values are not the strings from the source file. #57637

Open
shaoxiqian opened this issue Nov 22, 2024 · 0 comments
Labels
type/bug The issue is confirmed as a bug.

Comments

@shaoxiqian
Copy link
Contributor

Bug Report

When importing non-enumerated values in Lightning, everything imports successfully without errors or prompts, and the inserted values are not the strings from the source file.

1. Minimal reproduce step (Required)

  1. create table a
CREATE TABLE `a` (
    `id` bigint(20)  NOT NULL AUTO_INCREMENT,
    `mode` enum('aaa','bbb','ccc')  NOT NULL,
    PRIMARY KEY(`id`) CLUSTERED)
    ENGINE = InnoDB DEFAULT CHARACTER SET = UTF8MB4 DEFAULT COLLATE = UTF8MB4_BIN AUTO_INCREMENT = 1284046222587412087
  1. use lightning to load data from csv
    image
    test.a.1.csv

lightning toml

[lightning]
level = "info"
check-requirements = false
status-addr = ':8289'
index-concurrency = 64
table-concurrency = 64
io-concurrency = 32
region-concurrency = 64

[tikv-importer]
backend = "local"
incremental-import = true
sorted-kv-dir = "/tiup/sort"
range-concurrency = 64

[tidb]
# Information of the target cluster
port = 4000
user = "root"
password = ""
host = "tidb-1-peer"
status-port = 10080
pd-addr = "pd-peer:2379"
build-stats-concurrency = 20
distsql-scan-concurrency = 15
index-serial-scan-concurrency = 20
checksum-table-concurrency = 2
[mydumper]
no-schema = true
data-source-dir = 'xxx'
[mydumper.csv]
header = false

[checkpoint]
# Whether to enable checkpoints.
enable = true
driver = "file"

[post-restore]
checksum = false
analyze = false

[conflict]
strategy = "replace"

2. What did you expect to see? (Required)

Lightning reports an error or prompts that the inserted value is not within the enumeration range.

3. What did you see instead (Required)

Lightning imports successfully, with no prompts or errors, and the inserted value is null."

image

4. What is your TiDB version? (Required)

v8.4.0

@shaoxiqian shaoxiqian added the type/bug The issue is confirmed as a bug. label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

1 participant