diff options
Diffstat (limited to 'mysql-test/suite/gcol')
-rw-r--r-- | mysql-test/suite/gcol/r/innodb_virtual_index.result | 23 | ||||
-rw-r--r-- | mysql-test/suite/gcol/t/innodb_virtual_index.test | 18 |
2 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_index.result b/mysql-test/suite/gcol/r/innodb_virtual_index.result index 4540994a72d..b62c94ce409 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_index.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_index.result @@ -243,3 +243,26 @@ KEY (a(1)) INSERT INTO t1(b) VALUES(REPEAT('b',1000)); DELETE FROM t1; DROP TABLE t1; +# +# Bug #22990029 GCOLS: INCORRECT BEHAVIOR +# AFTER DATA INSERTED WITH IGNORE KEYWORD +# +CREATE TABLE t1(a INT PRIMARY KEY, b INT, vb DATE AS(b) VIRTUAL, KEY(vb)) +ENGINE=InnoDB; +INSERT IGNORE INTO t1 (a,b) VALUES(1,20190132); +Warnings: +Warning 1265 Data truncated for column 'vb' at row 1 +BEGIN; +DELETE FROM t1; +INSERT INTO t1 (a,b) VALUES(1,20190123); +ERROR 22007: Incorrect date value: '20190132' for column `test`.`t1`.`vb` at row 1 +SELECT * FROM t1; +a b vb +ROLLBACK; +SELECT * FROM t1; +a b vb +1 20190132 0000-00-00 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_index.test b/mysql-test/suite/gcol/t/innodb_virtual_index.test index 8f4e09fdf31..7aa241356c2 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_index.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_index.test @@ -263,3 +263,21 @@ CREATE TABLE t1( INSERT INTO t1(b) VALUES(REPEAT('b',1000)); DELETE FROM t1; DROP TABLE t1; + +--echo # +--echo # Bug #22990029 GCOLS: INCORRECT BEHAVIOR +--echo # AFTER DATA INSERTED WITH IGNORE KEYWORD +--echo # + +CREATE TABLE t1(a INT PRIMARY KEY, b INT, vb DATE AS(b) VIRTUAL, KEY(vb)) +ENGINE=InnoDB; +INSERT IGNORE INTO t1 (a,b) VALUES(1,20190132); +BEGIN; +DELETE FROM t1; +--error ER_TRUNCATED_WRONG_VALUE +INSERT INTO t1 (a,b) VALUES(1,20190123); +SELECT * FROM t1; +ROLLBACK; +SELECT * FROM t1; +CHECK TABLE t1; +DROP TABLE t1; |