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

v5.1.5 lightning import table schema with clustered index to v4.0.16 fail #40058

Closed
seiya-annie opened this issue Dec 20, 2022 · 3 comments
Closed
Labels
affects-5.1 This bug affects 5.1.x versions. component/lightning This issue is related to Lightning of TiDB. found/automation Found by automation tests severity/major type/bug The issue is confirmed as a bug.

Comments

@seiya-annie
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. install upstream with v4.0.16 version
  2. install downstream with v5.1.5 version
  3. use v5.1.5 lightning import table to upstream:
CREATE TABLE `sbtest1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `k` int(11) NOT NULL DEFAULT '0',
  `c` char(120) NOT NULL DEFAULT '',
  `pad` char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */,
  KEY `k_1` (`k`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=391701;

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

import successfully

3. What did you see instead (Required)

2022-12-17T09:13:42.546Z	INFO	host/host.go:30	Execute command	{"command": "/tidb-lightning \"-backend\" \"local\" \"-sorted-kv-dir\" \"/tmp/sorted-kv-dir\" \"-d\" \"s3://nfs/jianxu/test-data?access-key=minioadmin&secret-access-key=minioadmin&endpoint=http%3a%2f%2fminio.pingcap.net%3a9000&force-path-style=true\" \"-pd-urls\" \"upstream-pd.brie-acceptance-compatiblity-tps-1327240-1-662:2379\" \"-tidb-host\" \"upstream-tidb.brie-acceptance-compatiblity-tps-1327240-1-662\" \"-tidb-port\" \"4000\" \"-tidb-user\" \"root\" \"-tidb-password\" \"\" \"-c\" \"/tmp/tidb-lightning.toml\"", "timeout": "30m", "resource name": "lightning"}
Verbose debug logs will be written to /tmp/lightning.log.2022-12-17T09.13.42Z

Error: restore table schema `clustered`.`t1` failed: run create schema job failed: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 140 near "CLUSTERED,INDEX `idx`(`a`)) ENGINE = InnoDB DEFAULT CHARACTER SET = UTF8MB4 DEFAULT COLLATE = UTF8MB4_BIN AUTO_RANDOM_BASE = 3143025;" 
tidb lightning encountered error:  restore table schema `clustered`.`t1` failed: run create schema job failed: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 140 near "CLUSTERED,INDEX `idx`(`a`)) ENGINE = InnoDB DEFAULT CHARACTER SET = UTF8MB4 DEFAULT COLLATE = UTF8MB4_BIN AUTO_RANDOM_BASE = 3143025;" 

4. What is your TiDB version? (Required)

/ # ./tidb-lightning -V
Release Version: v5.1.5
Git Commit Hash: 1a128171cb65d68e109073bbabb4e1c1cf9e5e3c
Git Branch: heads/refs/tags/v5.1.5
Go Version: go1.16.4
UTC Build Time: 2022-12-16 11:05:22
Race Enabled: false
/ #

@seiya-annie seiya-annie added the type/bug The issue is confirmed as a bug. label Dec 20, 2022
@seiya-annie
Copy link
Author

@seiya-annie seiya-annie added component/lightning This issue is related to Lightning of TiDB. severity/major labels Dec 20, 2022
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 labels Dec 20, 2022
@sleepymole
Copy link
Contributor

Duplicate with pingcap/br#1362.

@sleepymole sleepymole added affects-5.1 This bug affects 5.1.x versions. and removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 labels Dec 20, 2022
@seiya-annie
Copy link
Author

this issue will not be fixed on v5.1.5.
customer can use latest lighting to import data.

@seiya-annie seiya-annie added the found/automation Found by automation tests label Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.1 This bug affects 5.1.x versions. component/lightning This issue is related to Lightning of TiDB. found/automation Found by automation tests severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants