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

Query fail when there are timestamp or time columns after generated column #7468

Closed
Lloyd-Pottiger opened this issue May 12, 2023 · 0 comments · Fixed by #7469
Closed

Query fail when there are timestamp or time columns after generated column #7468

Lloyd-Pottiger opened this issue May 12, 2023 · 0 comments · Fixed by #7469

Comments

@Lloyd-Pottiger
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE test.`IDT_26539` (`COL102` float DEFAULT NULL, `COL103` float DEFAULT NULL, `COL1` float GENERATED ALWAYS AS ((`COL102` DIV 10)) VIRTUAL, `COL2` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL, `COL4` time DEFAULT NULL, `COL3` bigint DEFAULT NULL, `COL5` float DEFAULT NULL, KEY `UK_COL1` (`COL1`) /*!80000 INVISIBLE */) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
insert into test.IDT_26539 (COL102, COL103, COL2, COL4, COL3, COL5) values (NULL, NULL, NULL, NULL, NULL, NULL);
insert into test.IDT_26539 (COL102, COL103, COL2, COL4, COL3, COL5) values (NULL, NULL, 'r2Ic', NULL, NULL, NULL);
alter table test.IDT_26539 set tiflash replica 1;
set tidb_isolation_read_engines='tiflash'; select * from test.IDT_26539 where col2 = 'r2Ic';

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

success

3. What did you see instead (Required)

mysql> set tidb_isolation_read_engines='tiflash'; select * from test.IDT_26539 where col2 = 'r2Ic';
Query OK, 0 rows affected (0.00 sec)

ERROR 1105 (HY000): Not found column generated_column_2 in block. There are only columns: col102, col103, col2, col4, col3, col5, FunctionConvertDurationFromNanos(col4, 0_Int64)_collator_0

4. What is your TiFlash version? (Required)

master

ti-chi-bot bot pushed a commit that referenced this issue May 16, 2023
ti-chi-bot bot pushed a commit that referenced this issue May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants