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

"number of enum overflow enum boundary" TiFlash does not handle the case of SQL_MODE without STRICT_TRANS_TABLES #8311

Closed
Mini256 opened this issue Nov 3, 2023 · 3 comments · Fixed by #8533
Assignees
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. component/compute severity/major type/bug The issue is confirmed as a bug.

Comments

@Mini256
Copy link
Member

Mini256 commented Nov 3, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `t1` (
  `id` bigint(20) NOT NULL AUTO_RANDOM,
  `type` enum('A','B') DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- Notice: Rmove `STRICT_TRANS_TABLES` flag allow insert invalid value.
SET SESSION SQL_MODE = 'ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

-- Insert a valid value, TiDB will not throw a error, but filled in with a blank value.
INSERT INTO t1(type) VALUES('C');

ALTER TABLE t1 SET TIFLASH REPLICA 1;

-- Error
SELECT /*+ READ_FROM_STORAGE(tiflash[t1]) */ COUNT(DISTINCT type) FROM t1;

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

Work well like TiKV storage engine?

3. What did you see instead (Required)

Source of the issue:

https://ask.pingcap.com/t/error-1105-hy000-flashinternal-number-of-enum-overflow-enum-boundary/750

Encountered an error:

ERROR 1105 (HY000): [FLASH:Coprocessor:Internal] number of enum overflow enum boundary

4. What is your TiFlash version? (Required)

v7.1.1

@Mini256 Mini256 added the type/bug The issue is confirmed as a bug. label Nov 3, 2023
@Lloyd-Pottiger Lloyd-Pottiger added component/compute 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/critical labels Nov 6, 2023
@Lloyd-Pottiger
Copy link
Contributor

if (enum_value == 0 || enum_value > enum_value_size)

maybe we should allow enum_value == 0?

@zanmato1984
Copy link
Contributor

Adjusting severity.

@chaitairpay
Copy link

Hello @zanmato1984

Is this issue resolved ? When it will be available in community version ?

@solotzg solotzg mentioned this issue Dec 15, 2023
12 tasks
ti-chi-bot bot pushed a commit that referenced this issue Dec 18, 2023
ti-chi-bot bot pushed a commit that referenced this issue Dec 19, 2023
@solotzg solotzg self-assigned this Jan 5, 2024
ti-chi-bot bot pushed a commit that referenced this issue Jan 31, 2024
ti-chi-bot bot pushed a commit that referenced this issue Feb 26, 2024
ti-chi-bot bot added a commit that referenced this issue Jun 12, 2024
close #8311

Co-authored-by: TONG, Zhigao <[email protected]>
Co-authored-by: TONG, Zhigao <[email protected]>
Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
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. component/compute severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants