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

After adding a column with a default value, querying the value of this column will yield an error result in disaggregated mode #9665

Open
zimulala opened this issue Nov 22, 2024 · 1 comment · May be fixed by #9666
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major type/bug The issue is confirmed as a bug.

Comments

@zimulala
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
create table t(a int, c int);
insert into t values(1, 1), (2, 2), (3, 3);
alter table t set tiflash replica 1;
set session tidb_isolation_read_engines='tiflash';
select * from INFORMATION_SCHEMA.TIFLASH_REPLICA where TABLE_NAME='t';

Wait until PROGRESS's value is 1.

 alter table t add column col1 int default 30; 
 alter table t add column col2 year not null;
 alter table t add column col3 decimal(6,2) not null;
 alter table t add column col4 decimal(6,2) default "1.234";
 alter table t add column col5 int default 123;
 alter table t add column col6 varchar(255) default 'sss';
 alter table t add column col7 timestamp default '2017-02-11';
 alter table t add column col8 datetime default '2018-11-04 23:12:03';
 alter table t add column col9 year default '2012';
 alter table t add column col10 set('value1', 'value2', 'value3') default 'value3';
 alter table t add column col11 enum('value1', 'value2', 'value3') default 'value1';
 alter table t add column col12 datetime default '2018-11-04 23:12:03';
 alter table t add column col13 time default  '2017-02-23 12:18:30';
 alter table t add column col14 time default null;
set session tidb_isolation_read_engines='tiflash'; select col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11, col12, col13, col14 from test.t;

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

+------+------+------+------+------+------+---------------------+---------------------+------+--------+--------+----------+-------+
| col1 | col2 | col3 | col4 | col5 | col6 | col7                | col8                | col9 | col10  | col11  | col12    | col13 |
+------+------+------+------+------+------+---------------------+---------------------+------+--------+--------+----------+-------+
|   30 | 0000 | 0.00 | 1.23 |  123 | sss  | 2017-02-11 00:00:00 | 2018-11-04 23:12:03 | 2012 | value3 | value1 | 12:18:30 | NULL  |
|   30 | 0000 | 0.00 | 1.23 |  123 | sss  | 2017-02-11 00:00:00 | 2018-11-04 23:12:03 | 2012 | value3 | value1 | 12:18:30 | NULL  |
+------+------+------+------+------+------+---------------------+---------------------+------+--------+--------+----------+-------+

3. What did you see instead (Required)

+------+------+------+------+------+-------+------+------+------+-------+-------+-------+----------+----------+
| col1 | col2 | col3 | col4 | col5 | col6  | col7 | col8 | col9 | col10 | col11 | col12 | col13    | col14    |
+------+------+------+------+------+-------+------+------+------+-------+-------+-------+----------+----------+
|    0 | 0000 | 0.00 | 0.00 |    0 | sss | NULL | NULL | 0000 |       |       | NULL  | 00:00:00 | 00:00:00 |
|    0 | 0000 | 0.00 | 0.00 |    0 | sss | NULL | NULL | 0000 |       |       | NULL  | 00:00:00 | 00:00:00 |
|    0 | 0000 | 0.00 | 0.00 |    0 | sss | NULL | NULL | 0000 |       |       | NULL  | 00:00:00 | 00:00:00 |
+------+------+------+------+------+-------+------+------+------+-------+-------+-------+----------+----------+

4. What is your TiFlash version? (Required)

master

@zimulala zimulala added the type/bug The issue is confirmed as a bug. label Nov 22, 2024
@zimulala
Copy link
Author

/pick-up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.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.

2 participants