This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
[lightning] admin check failed after importing table with expression index using local backend #1404
Closed
Description
Please answer these questions before submitting your issue. Thanks!
- What did you do?
-
Create table t3 with expression index
CREATE TABLE `t3` ( `id` int(11) NOT NULL AUTO_INCREMENT, `a` varchar(20) DEFAULT NULL, `b` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */, KEY `idx_a` (`a`), KEY `idx_lower_b` ((lower(`b`))) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=90003;
-
Use dumpling to export the table
-
rename table t3 to t3bak
-
Use lightning local backend to import the table to TiDB
-
What did you expect to see?
Lightning import should be successful, and admin check for the table should pass after that. -
What did you see instead?
Lightning import is successful, however admin check failed.
MySQL [test]> admin check table t3;
ERROR 8134 (HY000): col _V$_idx_lower_b_0, handle 1, index:types.Datum{k:0x5, decimal:0x0, length:0x0, i:0, collation:"utf8mb4_bin", b:[]uint8{0x1}, x:interface {}(nil)} != record:types.Datum{k:0x5, decimal:0x0, length:0x0, i:0, collation:"utf8mb4_bin", b:[]uint8{0x62, 0x62, 0x62}, x:interface {}(nil)}, compare err:<nil>
MySQL [test]> admin check index t3 idx_lower_b;
ERROR 8134 (HY000): col _V$_idx_lower_b_0, handle 1, index:types.Datum{k:0x5, decimal:0x0, length:0x0, i:0, collation:"utf8mb4_bin", b:[]uint8{0x1}, x:interface {}(nil)} != record:types.Datum{k:0x5, decimal:0x0, length:0x0, i:0, collation:"utf8mb4_bin", b:[]uint8{0x62, 0x62, 0x62}, x:interface {}(nil)}, compare err:<nil>
MySQL [test]> admin check table t3bak;
Query OK, 0 rows affected (0.01 sec)
-
What version of BR and TiDB/TiKV/PD are you using?
dumpling - v5.1.1
tidb-lightning -V5.1.1
tidb-server -V5.1.1
tikv-server -V5.1.1 -
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
- Please upload
-
Configuration of the cluster and the task
tidb-lightning.toml
for TiDB-Lightning if possibletikv-importer.toml
for TiKV-Importer if possibletopology.yml
if deployed by TiUP
-
Screenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus if possible
Activity