Skip to content

bug: Query ERROR 1105 (HY000): assert failed on i < m_idx.size() at rc_attr.h:342 #964

@davidshiz

Description

@davidshiz

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

mysql> select t1.id,t1.name,t2.id,t2.name from t1 left join t2 on t1.name=t2.name where t1.name in ('abc');
ERROR 1105 (HY000): assert failed on i < m_idx.size() at rc_attr.h:342, msg: [bad dpn index 0/0]

Expected behavior

mysql> select t1.id,t1.name,t2.id,t2.name from t1 left join t2 on t1.name=t2.name where t1.name in ('abc');
+------+------+------+------+
| id   | name | id   | name |
+------+------+------+------+
|    1 | abc  | NULL | NULL |
+------+------+------+------+
1 row in set (0.00 sec)

How To Reproduce

CREATE TABLE `t1` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  KEY `idx_n` (`name`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
CREATE TABLE `t2` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  KEY `idx_n` (`name`)
)DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

insert into t1 values(1,'abc');
insert into t1 values(2,'def');

select t1.id,t1.name,t2.id,t2.name from t1 left join t2 on t1.name=t2.name where t1.name in ('abc');

Environment

root@localhost:/# /stonedb57/install/bin/mysqld --version
/stonedb57/install/bin/mysqld  Ver 5.7.36-StoneDB for Linux on x86_64 (build-)
build information as follow:
        Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
        Branch name: stonedb-5.7-dev
        Last commit ID: d0c2e01b6
        Last commit time: Date:   Wed Nov 2 19:58:00 2022 +0800
        Build time: Date: Sun 06 Nov 2022 08:50:06 AM UTC
root@ub01:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!

Metadata

Metadata

Assignees

Labels

A-bugSomething isn't workingprio: highHigh priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions