SELECT t0.标讯信息ID AS 标讯信息ID,
t0.标的物名称 AS 标的物名称,
t0.产品标准名称 AS 产品标准名称,
t0.产品品牌 AS 产品品牌,
t0.产品型号 AS 产品型号,
t1.预算 AS 预算,
t1.中标金额 AS 中标金额
FROM
(SELECT t0.info_id AS 标讯信息ID,
t0.bid_name AS 标的物名称,
t0.product_name AS 产品标准名称,
t0.product_brand AS 产品品牌,
t0.product_model AS 产品型号,
FROM jy_lycp.f_bidproduct t0 limit 10000) t0
LEFT JOIN
(SELECT t0.info_id AS 招标信息ID,
t0.info_type AS 招标信息分类,
t0.buyer_name AS 采购单位名称,
t0.buyer_depart AS 采购单位科室,
t0.buyer_classcode AS 采购单位行业分类,
t0.agency_name AS 代理机构名称,
t0.winner_name AS 中标单位,
t0.area_code AS 区域代码,
t0.industry_code AS 行业代码(医疗卫生)
,
t0.jy_href AS 剑鱼链接,
t0.publishtime AS 标讯发布时间,
t0.updatetime AS 更新时间,
t0.industry_code_other AS 行业代码(非医疗卫生)
,
t0.id AS ID,
t0.budget AS 预算,
t0.bidamount AS 中标金额
FROM jy_lycp.f_bidding t0 limit 10000) t1
ON (t0.标讯信息ID=t1.招标信息ID) LIMIT 100;
错误是什么?
能否提供下数据结构,和部分的样例数据,以及 explain 的分析信息?
[err=“runtime error: index out of range [0] with length 0”] [stack=“goroutine 10396407 [running]:\ngithub.com/pingcap/tidb/server.(*clientConn).Run.func1(0x4004660, 0xc0053822d0, 0xc00415f900)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:734 +0xee\ panic(0x3799860, 0xc006192a40)\ \t/usr/local/go/src/runtime/panic.go:679 +0x1b2\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset.func1(0xc0056e7100, 0x4004660, 0xc00582ca20, 0xc00415f900)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1749 +0x4e2\ panic(0x3799860, 0xc006192a40)\ \t/usr/local/go/src/runtime/panic.go:679 +0x1b2\ngithub.com/pingcap/tidb/util/chunk.(*Column).GetBytes(…)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/column.go:539\ngithub.com/pingcap/tidb/util/chunk.Row.GetBytes(...)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/util/chunk/row.go:77\ github.com/pingcap/tidb/server.dumpTextRow(0xc001be4000, 0x4, 0x400, 0xc00dea6200, 0x22, 0x40, 0xc0058c7720, 0x0, 0xc0056e7018, 0x135d246, …)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/util.go:327 +0x1896\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks(0xc00415f900, 0x4004660, 0xc00582ca20, 0x4024d60, 0xc0058c76d0, 0xc000027000, 0x1dfad36, 0x3678a20, 0x0)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1840 +0x427\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset(0xc00415f900, 0x4004660, 0xc00582ca20, 0x4024d60, 0xc0058c76d0, 0x24d00, 0x0, 0x0, 0x0, 0x0)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1762 +0x201\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt(0xc00415f900, 0x4004660, 0xc00582ca20, 0x402b2a0, 0xc005405800, 0x5f96f80, 0x0, 0x0, 0x1, 0x0, …)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1656 +0x242\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery(0xc00415f900, 0x40045a0, 0xc005575b00, 0xc006979c01, 0xb14, 0x0, 0x0)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1503 +0x44f\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch(0xc00415f900, 0x40045a0, 0xc005575b00, 0xc006979c00, 0xb15, 0xb14, 0x0, 0x0)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1037 +0x6f2\ngithub.com/pingcap/tidb/server.(*clientConn).Run(0xc00415f900, 0x4004660, 0xc0053822d0)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:795 +0x293\ngithub.com/pingcap/tidb/server.(*Server).onConn(0xc0007add40, 0xc00415f900)\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/server.go:477 +0xb1b\ created by github.com/pingcap/tidb/server.(*Server).Run\ \t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/server.go:380 +0x8a5\ ”]
很常见的一个错误,能否发一下具体版本号
tidb版本:v5.0.1
查询SQL中要是不加 ‘LIMIT 100
’ 是正常的
专业
多谢,已在v5.3版本上验证,问题已解决!多谢
牛
此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。