Dumpling is a fast, easy-to-use tool written by Go for dumping data from the database(MySQL, TiDB...) to local/cloud(S3, GCP...) in multifarious formats(SQL, CSV...).
Apache License 2.0
280
stars
85
forks
source link
dumpling doesn't get the primary key columns correctly #310
Please answer these questions before submitting your issue. Thanks!
What did you do? If possible, provide a recipe for reproducing the error.
Use dumpling to dump a table which a int column with both primary key and unique key. But dumpling didn't return the right primary columns which caused dumpling failed to run selectFromTableRegion nor selectFromTableSample and failed the whole dump progress.
4. Affected versions
TiDB v4.0.\* -> dumpling: v4.0.13, v5.0.2 ~ v5.0.3, v5.1.0
For TiDB v5.0.* dumpling will generate redundant where clauses. But this won't affect the result.
Bug Report
Please answer these questions before submitting your issue. Thanks!
selectFromTableRegion
norselectFromTableSample
and failed the whole dump progress.The following SQL is pasted from https://github.com/pingcap/dumpling/blob/v5.0.3/v4/export/sql.go#L326
What did you expect to see? Dumpling dumps the data correctly.
What did you see instead?
dump failed: unsupported primary key for selectTableRegion. pkFields: [id, id], pkColTypes: [BIGINT, BIGINT]