Commit 64678ca5 authored by Marko Mäkelä's avatar Marko Mäkelä

Bug #22990029: Add a test case

parent aa8a31da
......@@ -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;
......@@ -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;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment