Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.2, 10.3.0, 10.4.0, 10.0(EOL)
Description
Problem found during RQG testing involving row based replication.
SET SESSION sql_mode=NO_ENGINE_SUBSTITUTION;
|
CREATE TABLE t_innodb_DEFAULT ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ;
|
CREATE TABLE t_innodb_INPLACE ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ;
|
CREATE TABLE t_innodb_COPY ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ;
|
CREATE TABLE t_myisam_DEFAULT ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = MyISAM ;
|
INSERT INTO t_innodb_DEFAULT (col_int, col2) VALUES (NULL, 1);
|
INSERT INTO t_innodb_INPLACE (col_int, col2) VALUES (NULL, 1);
|
INSERT INTO t_innodb_COPY (col_int, col2) VALUES (NULL, 1);
|
INSERT INTO t_myisam_DEFAULT (col_int, col2) VALUES (NULL, 1);
|
ALTER TABLE t_innodb_DEFAULT MODIFY COLUMN col_int INT NOT NULL;
|
Warnings:
|
Warning 1265 Data truncated for column 'col_int' at row 1
|
ALTER TABLE t_innodb_INPLACE MODIFY COLUMN col_int INT NOT NULL, ALGORITHM = INPLACE;
|
Warnings:
|
Warning 1265 Data truncated for column 'col_int' at row 1
|
ALTER TABLE t_innodb_COPY MODIFY COLUMN col_int INT NOT NULL, ALGORITHM = COPY;
|
Warnings:
|
Warning 1265 Data truncated for column 'col_int' at row 1
|
ALTER TABLE t_myisam_DEFAULT MODIFY COLUMN col_int INT NOT NULL;
|
Warnings:
|
Warning 1265 Data truncated for column 'col_int' at row 1
|
INSERT INTO t_innodb_DEFAULT (col_int, col2) VALUES (NULL, 2);
|
ERROR 23000: Column 'col_int' cannot be null
|
INSERT INTO t_innodb_INPLACE (col_int, col2) VALUES (NULL, 2);
|
ERROR 23000: Column 'col_int' cannot be null
|
INSERT INTO t_innodb_COPY (col_int, col2) VALUES (NULL, 2);
|
ERROR 23000: Column 'col_int' cannot be null
|
INSERT INTO t_myisam_DEFAULT (col_int, col2) VALUES (NULL, 2);
|
ERROR 23000: Column 'col_int' cannot be null
|
---- The behaviour of the different tables above is consistent ----
|
SELECT * FROM t_innodb_DEFAULT;
|
col2 col_int col_int_g
|
1 0 NULL <====== Why NULL?
|
SELECT * FROM t_innodb_INPLACE;
|
col2 col_int col_int_g
|
1 0 NULL <====== Why NULL?
|
SELECT * FROM t_innodb_COPY;
|
col2 col_int col_int_g
|
1 0 0
|
SELECT * FROM t_myisam_DEFAULT;
|
col2 col_int col_int_g
|
1 0 0
|
DROP TABLE t_innodb_DEFAULT;
|
DROP TABLE t_innodb_INPLACE;
|
DROP TABLE t_innodb_COPY;
|
DROP TABLE t_myisam_DEFAULT;
|
|
10.3 09bd2138522787a4e0b015695c462903f4a9e728 2019-02-22
|
10.4 5b4d6595d26aaaf0bf8bb3c9171cf1da96306a7c 2019-02-21
|
No replay on 10.2 af6fdc13072cc310cf17fd3b28c749515d9c563c 2019-02-19
|
(ALTER ... COLUMN ...INPLACE is not supported and DEFAULT seems to be COPY).
|
Attachments
Issue Links
- is caused by
-
MDEV-18819 ALTER_COLUMN_VCOL is not set for generated stored columns
-
- Closed
-
- relates to
-
MDEV-14168 Unconditionally allow ALGORITHM=INPLACE for setting a column NOT NULL
-
- Closed
-
-
MDEV-16365 Setting a column NOT NULL fails to return error for NULL values when there is no DEFAULT
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Summary | Wrong maintenance of persistent generated column during DDL | Draft: Wrong maintenance of persistent generated column during DDL |
Attachment | t_s_3A.test [ 47479 ] |
Attachment | rpl_t_s_3.test [ 47480 ] |
Assignee | Marko Mäkelä [ marko ] | |
Summary | Draft: Wrong maintenance of persistent generated column during DDL | InnoDB: Wrong maintenance of persistent generated column during DDL |
Description |
Problem found during RQG testing involving row based replication.
{noformat} SET SESSION sql_mode=NO_ENGINE_SUBSTITUTION; CREATE TABLE t_innodb_DEFAULT ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ; CREATE TABLE t_innodb_INPLACE ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ; CREATE TABLE t_innodb_COPY ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ; CREATE TABLE t_myisam_DEFAULT ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = MyISAM ; INSERT INTO t_innodb_DEFAULT (col_int, col2) VALUES (NULL, 1); INSERT INTO t_innodb_INPLACE (col_int, col2) VALUES (NULL, 1); INSERT INTO t_innodb_COPY (col_int, col2) VALUES (NULL, 1); INSERT INTO t_myisam_DEFAULT (col_int, col2) VALUES (NULL, 1); ALTER TABLE t_innodb_DEFAULT MODIFY COLUMN col_int INT NOT NULL; Warnings: Warning 1265 Data truncated for column 'col_int' at row 1 ALTER TABLE t_innodb_INPLACE MODIFY COLUMN col_int INT NOT NULL, ALGORITHM = INPLACE; Warnings: Warning 1265 Data truncated for column 'col_int' at row 1 ALTER TABLE t_innodb_COPY MODIFY COLUMN col_int INT NOT NULL, ALGORITHM = COPY; Warnings: Warning 1265 Data truncated for column 'col_int' at row 1 ALTER TABLE t_myisam_DEFAULT MODIFY COLUMN col_int INT NOT NULL; Warnings: Warning 1265 Data truncated for column 'col_int' at row 1 INSERT INTO t_innodb_DEFAULT (col_int, col2) VALUES (NULL, 2); ERROR 23000: Column 'col_int' cannot be null INSERT INTO t_innodb_INPLACE (col_int, col2) VALUES (NULL, 2); ERROR 23000: Column 'col_int' cannot be null INSERT INTO t_innodb_COPY (col_int, col2) VALUES (NULL, 2); ERROR 23000: Column 'col_int' cannot be null INSERT INTO t_myisam_DEFAULT (col_int, col2) VALUES (NULL, 2); ERROR 23000: Column 'col_int' cannot be null ---- The behaviour of the different tables above is consistent ---- SELECT * FROM t_innodb_DEFAULT; col2 col_int col_int_g 1 0 NULL <====== Why NULL? SELECT * FROM t_innodb_INPLACE; col2 col_int col_int_g 1 0 NULL <====== Why NULL? SELECT * FROM t_innodb_COPY; col2 col_int col_int_g 1 0 0 SELECT * FROM t_myisam_DEFAULT; col2 col_int col_int_g 1 0 0 DROP TABLE t_innodb_DEFAULT; DROP TABLE t_innodb_INPLACE; DROP TABLE t_innodb_COPY; DROP TABLE t_myisam_DEFAULT; 10.3 09bd2138522787a4e0b015695c462903f4a9e728 2019-02-22 10.4 5b4d6595d26aaaf0bf8bb3c9171cf1da96306a7c 2019-02-21 No replay on 10.2 af6fdc13072cc310cf17fd3b28c749515d9c563c 2019-02-19 (ALTER ... COLUMN ...INPLACE is not supported and DEFAULT seems to be COPY). {noformat} 10.2 no replay of the problem |
Problem found during RQG testing involving row based replication.
{noformat} SET SESSION sql_mode=NO_ENGINE_SUBSTITUTION; CREATE TABLE t_innodb_DEFAULT ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ; CREATE TABLE t_innodb_INPLACE ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ; CREATE TABLE t_innodb_COPY ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = InnoDB ; CREATE TABLE t_myisam_DEFAULT ( col2 INT, col_int INT, col_int_g INT AS (col_int) PERSISTENT ) ENGINE = MyISAM ; INSERT INTO t_innodb_DEFAULT (col_int, col2) VALUES (NULL, 1); INSERT INTO t_innodb_INPLACE (col_int, col2) VALUES (NULL, 1); INSERT INTO t_innodb_COPY (col_int, col2) VALUES (NULL, 1); INSERT INTO t_myisam_DEFAULT (col_int, col2) VALUES (NULL, 1); ALTER TABLE t_innodb_DEFAULT MODIFY COLUMN col_int INT NOT NULL; Warnings: Warning 1265 Data truncated for column 'col_int' at row 1 ALTER TABLE t_innodb_INPLACE MODIFY COLUMN col_int INT NOT NULL, ALGORITHM = INPLACE; Warnings: Warning 1265 Data truncated for column 'col_int' at row 1 ALTER TABLE t_innodb_COPY MODIFY COLUMN col_int INT NOT NULL, ALGORITHM = COPY; Warnings: Warning 1265 Data truncated for column 'col_int' at row 1 ALTER TABLE t_myisam_DEFAULT MODIFY COLUMN col_int INT NOT NULL; Warnings: Warning 1265 Data truncated for column 'col_int' at row 1 INSERT INTO t_innodb_DEFAULT (col_int, col2) VALUES (NULL, 2); ERROR 23000: Column 'col_int' cannot be null INSERT INTO t_innodb_INPLACE (col_int, col2) VALUES (NULL, 2); ERROR 23000: Column 'col_int' cannot be null INSERT INTO t_innodb_COPY (col_int, col2) VALUES (NULL, 2); ERROR 23000: Column 'col_int' cannot be null INSERT INTO t_myisam_DEFAULT (col_int, col2) VALUES (NULL, 2); ERROR 23000: Column 'col_int' cannot be null ---- The behaviour of the different tables above is consistent ---- SELECT * FROM t_innodb_DEFAULT; col2 col_int col_int_g 1 0 NULL <====== Why NULL? SELECT * FROM t_innodb_INPLACE; col2 col_int col_int_g 1 0 NULL <====== Why NULL? SELECT * FROM t_innodb_COPY; col2 col_int col_int_g 1 0 0 SELECT * FROM t_myisam_DEFAULT; col2 col_int col_int_g 1 0 0 DROP TABLE t_innodb_DEFAULT; DROP TABLE t_innodb_INPLACE; DROP TABLE t_innodb_COPY; DROP TABLE t_myisam_DEFAULT; 10.3 09bd2138522787a4e0b015695c462903f4a9e728 2019-02-22 10.4 5b4d6595d26aaaf0bf8bb3c9171cf1da96306a7c 2019-02-21 No replay on 10.2 af6fdc13072cc310cf17fd3b28c749515d9c563c 2019-02-19 (ALTER ... COLUMN ...INPLACE is not supported and DEFAULT seems to be COPY). {noformat} |
Attachment | rpl_t_s_3.test [ 47480 ] |
Fix Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.2 [ 14601 ] |
Fix Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.1 [ 16100 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Summary | InnoDB: Wrong maintenance of persistent generated column during DDL | InnoDB: Wrong results in ALTER IGNORE TABLE with ALGORITHM=INPLACE |
Link |
This issue relates to |
Link |
This issue relates to |
Fix Version/s | 10.1.39 [ 23305 ] | |
Fix Version/s | 10.2.23 [ 23307 ] | |
Fix Version/s | 10.3.14 [ 23216 ] | |
Fix Version/s | 10.4.4 [ 23310 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.2.2 [ 22013 ] | |
Affects Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Labels | upstream |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Affects Version/s | 10.4.0 [ 23115 ] | |
Affects Version/s | 10.3.0 [ 22127 ] | |
Affects Version/s | 10.3.14 [ 23216 ] | |
Affects Version/s | 10.4.3 [ 23230 ] |
Link |
This issue is caused by |
issue.field.resolutiondate | 2019-03-05 11:16:35.0 | 2019-03-05 11:16:35.097 |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 92843 ] | MariaDB v4 [ 155800 ] |
How to replay the problem?
Please
./mysql-test-run.pl --mem --suite=main t_s_3A | tee prt
and do not become confused by the fact that MTR reports a "pass".