SQL Execution Error

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: sql执行报错

| username: 随缘天空

A SQL statement on TiDB 4.0 encounters an error when executed on TiDB 7.1.1, reporting error 1105 - probeWorker[0] meets error: runtime error: index out of range [1] with length 0. What could be the reason for this?

| username: WalterWj | Original post link

It should be a bug.

| username: 像风一样的男子 | Original post link

This type of error is 90% likely to be a bug. It’s probably due to some scenario not being covered. Go to GitHub and open an issue.

| username: 随缘天空 | Original post link

I’m not quite sure, I don’t know if it has anything to do with the SQL statement, because from the literal meaning of the error, it seems like an index mismatch. The required index is one, but in reality, it is zero.

| username: 随缘天空 | Original post link

Not clear.

| username: tidb菜鸟一只 | Original post link

This has nothing to do with the index; it’s just a C language error, similar to an out-of-bounds error in Java.

| username: 大飞哥online | Original post link

Bug, probably an out-of-bounds issue.

| username: Fly-bird | Original post link

Length exceeded?

| username: TiDB_C罗 | Original post link

Can you take a look at what the query is?

| username: 随缘天空 | Original post link

Someone else encountered an error while operating and consulted me, but I don’t have the corresponding SQL statement either.

| username: 随缘天空 | Original post link

The literal meaning is that the index to be used was not found or does not exist.

| username: 随缘天空 | Original post link

Not quite sure.

| username: 随缘天空 | Original post link

Is this a code-level issue or a TiDB database-level issue?

| username: Kongdom | Original post link

It should be considered a TiDB database-level issue, not an application problem.

| username: ajin0514 | Original post link

The literal meaning is that the index to be used was not found or does not exist.

| username: tidb菜鸟一只 | Original post link

The issue at the database level triggered a bug in TiDB, which is written in C…

| username: zhanggame1 | Original post link

Collect information, see if it can be reproduced, and then submit a BUG.

| username: 随缘天空 | Original post link

I’m not quite sure. Currently, this SQL executes normally in version 4.0, but an execution error occurs after upgrading to version 7.1.1. Since the database was migrated from 4.0, the user says everything migrated correctly, but I’m not sure if there might be a situation where an index was lost during the migration.

| username: 随缘天空 | Original post link

I’m not quite sure. The current question is whether it’s a bug issue or if the difference in environment variables between the V4.0 and V7.1.1 versions of the two clusters is causing it.

| username: Christophe | Original post link

Known bug in the lower version, it shouldn’t be present in v7. Can you post the SQL?