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

Disaggrate TiFlash query result is wrong when query missing columns with default value #9085

Closed
Lloyd-Pottiger opened this issue May 27, 2024 · 1 comment · Fixed by #9086
Assignees
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. severity/major type/bug The issue is confirmed as a bug.

Comments

@Lloyd-Pottiger
Copy link
Contributor

Lloyd-Pottiger commented May 27, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
CREATE TABLE `relationships` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id2` int(11) NOT NULL,
  PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci AUTO_INCREMENT=90001;
insert into relationships (id2) values (1), (2), (3);
insert into relationships (id2) select id2 from relationships;
insert into relationships (id2) select id2 from relationships;
insert into relationships (id2) select id2 from relationships;
insert into relationships (id2) select id2 from relationships;
insert into relationships (id2) select id2 from relationships;
insert into relationships (id2) select id2 from relationships;
alter table relationships set tiflash replica 1;
alter table relationships add column weight int default '0';
select * from information_schema.tiflash_replica where TABLE_NAME = 'relationships';
set @@tidb_isolation_read_engines='tiflash'; select count(*) from relationships where weight = 0;

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

set @@tidb_isolation_read_engines='tiflash'; select count(*) from relationships where weight = 0;
+----------+
| count(*) |
+----------+
|      192 |
+----------+

3. What did you see instead (Required)

set @@tidb_isolation_read_engines='tiflash'; select count(*) from relationships where weight = 0;
+----------+
| count(*) |
+----------+
|      0 |
+----------+

4. What is your TiFlash version? (Required)

master

@Lloyd-Pottiger
Copy link
Contributor Author

same as #9084

ti-chi-bot bot pushed a commit that referenced this issue May 27, 2024
close #9084, close #9085

fix the issue that query result may be wrong when query missing columns with default value in Disaggrate TiFlash.

Signed-off-by: Lloyd-Pottiger <[email protected]>

Co-authored-by: Lloyd-Pottiger <[email protected]>
Co-authored-by: Lloyd-Pottiger <[email protected]>
Co-authored-by: JaySon <[email protected]>
ti-chi-bot bot pushed a commit that referenced this issue May 27, 2024
close #9084, close #9085

fix the issue that query result may be wrong when query missing columns with default value in Disaggrate TiFlash.

Signed-off-by: Lloyd-Pottiger <[email protected]>

Co-authored-by: Lloyd-Pottiger <[email protected]>
Co-authored-by: Lloyd-Pottiger <[email protected]>
Co-authored-by: JaySon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant