SELECT * FROM checking_diff
; 查询报错:Unsupported datum flag 6 for Int vector.
排查到:只要select、update操作中包含error_type字段都会报错:Unsupported datum flag 6 for Int vector.。
例如报错查询:
SELECT error_type
FROM checking_diff
LIMIT 10;
SELECT * FROM checking_diff
tidb 报错日志:
[2020/09/30 14:05:00.917 +08:00] [ERROR] [conn.go:728] [“command dispatched failed”] [conn=39770] [connInfo=“id:39770, addr:218.76.8.29:51551 status:10, collation:utf8_general_ci, user:root”] [command=Query] [status=“inTxn:0, autocommit:1”] [sql=“SELECT * FROM checking_diff
\
LIMIT 0, 1000”] [txn_mode=PESSIMISTIC] [err="[tikv:10000]Unsupported datum flag 6 for Int vector"]
[2020/09/30 14:11:50.995 +08:00] [ERROR] [conn.go:728] [“command dispatched failed”] [conn=39770] [connInfo=“id:39770, addr:218.76.8.29:51551 status:10, collation:utf8_general_ci, user:root”] [command=Query] [status=“inTxn:0, autocommit:1”] [sql=“SELECT error_type
FROM checking_diff
limit 10\
”] [txn_mode=PESSIMISTIC] [err="[tikv:10000]Unsupported datum flag 6 for Int vector"]
可正常查询:SELECT id,out_trade_no,total_amount FROM xlink_dev
.checking_diff
LIMIT 10
集群版本:
Release Version: v4.0.0
Edition: Community
Git Commit Hash: 689a6b6439ae7835947fcaccf329a3fc303986cb
Git Branch: heads/refs/tags/v4.0.0
UTC Build Time: 2020-05-28 01:37:40
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
checking_diff表结构:
CREATE TABLE checking_diff
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT ‘id’,
third_trade_no
varchar(50) DEFAULT NULL COMMENT ‘第三方订单号’,
out_trade_no
varchar(40) DEFAULT NULL COMMENT ‘外部订单号’,
third_amount
bigint(20) DEFAULT NULL COMMENT ‘第三方订单金额’,
total_amount
bigint(20) DEFAULT NULL COMMENT ‘平台订单金额’,
error_type
int(1) DEFAULT NULL COMMENT ‘1:长款,2:短款,3金额差异,4,存疑,5正常’,
trade_time
datetime DEFAULT NULL COMMENT ‘交易时间’,
checking_date
date DEFAULT NULL COMMENT ‘对账时间yyyy-MM-dd’,
institution_code
varchar(15) DEFAULT NULL COMMENT ‘通道编码’,
merchant_id
int(11) DEFAULT NULL COMMENT ‘商户号’,
checking_type
char(1) DEFAULT NULL COMMENT ‘类型 1.以商户维度处理, 2.以渠道维度处理’,
task_id
int(11) DEFAULT NULL COMMENT ‘任务ID’,
status
int(1) DEFAULT NULL COMMENT ‘0:未处理,1:已处理’,
pre_order_no
varchar(64) DEFAULT NULL COMMENT ‘业务单号’,
trade_type
varchar(32) DEFAULT NULL COMMENT ‘交易类型’,
error_type_tmp
int(11) DEFAULT NULL COMMENT ‘1:长款,2:短款,3金额差异,4,存疑,5正常’,
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=1350001