Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime error: index out of range [8] with length 8 #20071

Closed
ChenPeng2013 opened this issue Sep 17, 2020 · 5 comments · Fixed by #20478
Closed

runtime error: index out of range [8] with length 8 #20071

ChenPeng2013 opened this issue Sep 17, 2020 · 5 comments · Fixed by #20478
Assignees
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@ChenPeng2013
Copy link
Contributor

ChenPeng2013 commented Sep 17, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
drop table if exists table_30_utf8_4;
drop table if exists t;
create table t(a int);
insert into t values(1);
create table table_30_utf8_4 (
`pk` int primary key,
`col_int_key_unsigned` int unsigned ,
`col_int_key_signed` int,
`col_float_key_signed` float  ,
`col_float_key_unsigned` float unsigned
) character set utf8 
partition by hash(pk)
partitions 4;

insert ignore into table_30_utf8_4 values (0,91, 10, 14,19.0495);
alter table table_30_utf8_4 add column a int as (col_int_key_signed * 2);


SELECT count(1) AS val FROM table_30_utf8_4 WHERE table_30_utf8_4.col_int_key_unsigned!=table_30_utf8_4.a OR (SELECT count(1) AS val FROM t WHERE table_30_utf8_4.col_float_key_signed!=table_30_utf8_4.col_float_key_unsigned )!=7984764426240273913;

2. What did you expect to see? (Required)

mysql> SELECT count(1) AS val FROM table_30_utf8_4 WHERE table_30_utf8_4.col_int_key_unsigned!=table_30_utf8_4.a OR (SELECT count(1) AS val FROM t WHERE table_30_utf8_4.col_float_key_signed!=table_30_utf8_4.col_float_key_unsigned )!=7984764426240273913;
+-----+
| val |
+-----+
|   1 |
+-----+
1 row in set (0.00 sec)

3. What did you see instead (Required)

mysql> SELECT count(1) AS val FROM table_30_utf8_4 WHERE table_30_utf8_4.col_int_key_unsigned!=table_30_utf8_4.a OR (SELECT count(1) AS val FROM t WHERE table_30_utf8_4.col_float_key_signed!=table_30_utf8_4.col_float_key_unsigned )!=7984764426240273913;
ERROR 1105 (HY000): runtime error: index out of range [5] with length 5

4. What is your TiDB version? (Required)

master and release-4.0

@ChenPeng2013 ChenPeng2013 added the type/bug The issue is confirmed as a bug. label Sep 17, 2020
@ichn-hu
Copy link
Contributor

ichn-hu commented Sep 17, 2020

/assign @ichn-hu

@wshwsh12
Copy link
Contributor

/assign @wshwsh12

@ichn-hu
Copy link
Contributor

ichn-hu commented Oct 14, 2020

/unassign @ichn-hu

@ichn-hu
Copy link
Contributor

ichn-hu commented Oct 14, 2020

/assign @wjhuang2016

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
6 participants