Skip to content

the operatorInfo lost whereCondition #41032

Closed
@ChenPeng2013

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)


use test;
drop table if exists PK_SIGNED_10087;
CREATE TABLE `PK_SIGNED_10087` (
  `COL1` mediumint(8) unsigned NOT NULL,
  `COL2` varchar(20) DEFAULT NULL,
  `COL4` datetime DEFAULT NULL,
  `COL3` bigint(20) DEFAULT NULL,
  `COL5` float DEFAULT NULL,
  PRIMARY KEY (`COL1`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
insert into PK_SIGNED_10087 values(0, "痥腜蟿鮤枓欜喧檕澙姭袐裄钭僇剕焍哓閲疁櫘", "0017-11-14 05:40:55", -4504684261333179273, 7.97449e37);


prepare stmt from 'SELECT/*+ HASH_JOIN(t1, t2) */ t2.* FROM PK_SIGNED_10087 t1 JOIN PK_SIGNED_10087 t2 ON t1.col1 = t2.col1 WHERE t2.col1 >= ? AND t1.col1 >= ?;';
set @a=0, @b=0;
execute stmt using @a,@b;
set @a=8950167, @b=16305982;
execute stmt using @a,@b;

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

MySQL [test]> execute stmt using @a,@b;
Empty set (0.00 sec)

3. What did you see instead (Required)

MySQL [test]> execute stmt using @a,@b;
+------+--------------------------------------------------------------+---------------------+----------------------+------------+
| COL1 | COL2                                                         | COL4                | COL3                 | COL5       |
+------+--------------------------------------------------------------+---------------------+----------------------+------------+
|    0 | 痥腜蟿鮤枓欜喧檕澙姭袐裄钭僇剕焍哓閲疁櫘                     | 0017-11-14 05:40:55 | -4504684261333179273 | 7.97449e37 |
+------+--------------------------------------------------------------+---------------------+----------------------+------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

Release Version: v6.6.0-alpha-356-g3412b5d86
Edition: Community
Git Commit Hash: 3412b5d8614c8f54ea03898c49cf6248b68787e9
Git Branch: master
UTC Build Time: 2023-02-03 01:05:36
GoVersion: go1.19.1
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: unistore

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions