【 使用环境 】 测试环境
【 OB or 其他组件 】OB
【 使用版本 】OB4.2.1.8社区版
【问题描述】LOAD DATA旁路导入不支持索引和分区,旁路导入的表格中有索引或者分区是会报错
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
建表sql如下:
CREATE TABLE hg38_splice_ai_20220217 (
chr varchar(32) DEFAULT NULL,
pos bigint(20) NOT NULL,
id varchar(10) DEFAULT NULL,
ref varchar(10) DEFAULT NULL,
alt varchar(10) DEFAULT NULL,
qual varchar(10) DEFAULT NULL,
filter varchar(10) DEFAULT NULL,
allele varchar(10) DEFAULT NULL,
gene varchar(30) DEFAULT NULL,
ds_ag decimal(6,5) DEFAULT NULL,
ds_al decimal(6,5) DEFAULT NULL,
ds_dg decimal(6,5) DEFAULT NULL,
ds_dl decimal(6,5) DEFAULT NULL,
dp_ag int(11) DEFAULT NULL,
dp_al int(11) DEFAULT NULL,
dp_dg int(11) DEFAULT NULL,
dp_dl int(11) DEFAULT NULL
) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = ‘zstd_1.3.8’ REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0
partition by list(pos%5)
(partition p0 values in (0),
partition p1 values in (1),
partition p2 values in (2),
partition p3 values in (3),
partition p4 values in (4))
导入报错如下:
Server version: 5.7.25 OceanBase_CE 4.2.1.8 (r108000022024072217-3149c25ca2dadbb7707686ad02a1367b1b43e0b5) (Built Jul 23 2024 02:01:58)
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use falcon-dev
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
±------------------------+
| Tables_in_falcon-dev |
±------------------------+
| hg38_splice_ai_20220217 |
| tbl1 |
±------------------------+
2 rows in set (0.01 sec)
mysql> source ./hg38_splice_ai_20220217.sql
Query OK, 0 rows affected (0.05 sec)
Query OK, 0 rows affected, 1 warning (3.98 sec)
ERROR:
No query specified
mysql> LOAD DATA /*+ direct(true,1024) parallel(16) /INFILE ‘/home/admin/hg38_splice_ai_20220217.2612.tsv’ INTO TABLE tbl1 FIELDS TERMINATED BY ‘\t’;
ERROR 1172 (42000): Result consisted of more than one row
mysql> LOAD DATA /+ direct(true,1024) parallel(16) */INFILE ‘/home/admin/hg38_splice_ai_20220217.2612.tsv’ INTO TABLE tbl1 FIELDS TERMINATED BY ‘\t’;
ERROR 1172 (42000): Result consisted of more than one row