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

Wrong enum value parsed during evaluation #49487

Closed
aytrack opened this issue Dec 15, 2023 · 0 comments · Fixed by #49543
Closed

Wrong enum value parsed during evaluation #49487

aytrack opened this issue Dec 15, 2023 · 0 comments · Fixed by #49543
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@aytrack
Copy link
Contributor

aytrack commented Dec 15, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
drop table if exists t01;
CREATE TABLE `t01` (
  `6524d87a` timestamp DEFAULT '2024-10-02 01:54:55',
  `744e4d52` int(11) NOT NULL DEFAULT '2023959529',
  `087de3b2` varchar(122) DEFAULT '36h0hvfpylz0f0iv9h0ownfcg3rehi4',
  `26cbbf2a` enum('l7i9','3sdz3','83','4','92p','4g','8y5rn','7gp','7','1','e') NOT NULL DEFAULT '4',
  PRIMARY KEY (`744e4d52`,`26cbbf2a`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=gbk COLLATE=gbk_chinese_ci COMMENT='7ad99128'
PARTITION BY HASH (`744e4d52`) PARTITIONS 9;
insert ignore into t01 values ("2023-01-01 20:01:02", 123, 'abcd', '');
select `t01`.`26cbbf2a` as r0 from `t01` where `t01`.`6524d87a` in ( '2010-05-25') or not( `t01`.`26cbbf2a` > '1' ) ;

introduced by #49055

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

[11:47:15]TiDB root:test> select `t01`.`26cbbf2a` as r0 from `t01` where `t01`.`6524d87a` in ( '2010-05-25') or not( `t01`.`26cbbf2a` > '1' ) ;
+----+
| r0 |
+----+
|    |
+----+
1 row in set

3. What did you see instead (Required)

[11:47:56]TiDB root:test> select `t01`.`26cbbf2a` as r0 from `t01` where `t01`.`6524d87a` in ( '2010-05-25') or not( `t01`.`26cbbf2a` > '1' ) ;
(1105, 'Wrong enum value parsed during evaluation')

4. What is your TiDB version? (Required)

[11:48:15]TiDB root:test> select tidb_version();
+-----------------------------------------------------------+
| tidb_version()                                            |
+-----------------------------------------------------------+
| Release Version: v7.1.3                                   |
| Edition: Community                                        |
| Git Commit Hash: e091ee57040e27b70cac6a29b4e59f3b3162021e |
| Git Branch: heads/refs/tags/v7.1.3                        |
| UTC Build Time: 2023-12-12 10:17:49                       |
| GoVersion: go1.20.12                                      |
| Race Enabled: false                                       |
| TiKV Min Version: 6.2.0-alpha                             |
| Check Table Before Drop: false                            |
| Store: unistore                                           |
+-----------------------------------------------------------+
1 row in set
@aytrack aytrack added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner labels Dec 15, 2023
@ti-chi-bot ti-chi-bot added the affects-7.1 This bug affects the 7.1.x(LTS) versions. label Dec 15, 2023
@winoros winoros added affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. severity/major labels Dec 18, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 labels Dec 18, 2023
@winoros winoros added affects-6.1 This bug affects the 6.1.x(LTS) versions. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 labels Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants