diff options
author | Monty <monty@mariadb.org> | 2018-08-24 18:08:56 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-08-24 18:08:56 +0300 |
commit | f195286a3eae6328a1f90948205e90201c0479c5 (patch) | |
tree | 81c03eae09401c7961ad37ec0a107f568e1360e6 /mysql-test/suite/maria | |
parent | 0cafc1316410d118c0b6298daf4d923b3258c502 (diff) | |
download | mariadb-git-f195286a3eae6328a1f90948205e90201c0479c5.tar.gz |
MDEV-17021 Server crash or assertion `length <= column->length' failure in write_block_record
Problem was that the number of NULL bit's was record wrong in the
.frm file because there could be more fields marked NOT_NULL after the
number of not_null fields where recorded.
Fixed by copying test for virtual fields from prepare_create_field()
The code change, only the test, doesn't have to be merged to 10.3
as this is fixed there.
Diffstat (limited to 'mysql-test/suite/maria')
-rw-r--r-- | mysql-test/suite/maria/create.result | 26 | ||||
-rw-r--r-- | mysql-test/suite/maria/create.test | 31 |
2 files changed, 57 insertions, 0 deletions
diff --git a/mysql-test/suite/maria/create.result b/mysql-test/suite/maria/create.result new file mode 100644 index 00000000000..83c5b8d22e4 --- /dev/null +++ b/mysql-test/suite/maria/create.result @@ -0,0 +1,26 @@ +CREATE OR REPLACE TABLE t1 ( +f1 DECIMAL(43,0) NOT NULL, +f2 TIME(4) NULL, +f3 BINARY(101) NULL, +f4 TIMESTAMP(4) NULL, +f5 DATETIME(1) NULL, +f6 SET('a','b','c') NOT NULL DEFAULT 'a', +f7 VARBINARY(2332) NOT NULL DEFAULT '', +f8 DATE NULL, +f9 BLOB NULL, +f10 MEDIUMINT(45) NOT NULL DEFAULT 0, +f11 YEAR NULL, +f12 BIT(58) NULL, +v2 TIME(1) AS (f2) VIRTUAL, +v3 BINARY(115) AS (f3) VIRTUAL, +v4 TIMESTAMP(3) AS (f4) VIRTUAL, +v7 VARBINARY(658) AS (f7) PERSISTENT, +v8 DATE AS (f8) PERSISTENT, +v9 TINYTEXT AS (f9) PERSISTENT, +v11 YEAR AS (f11) VIRTUAL +) ENGINE=Aria; +INSERT IGNORE INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12) VALUES +(0.8,'16:01:46',NULL,'2006-03-01 12:44:34','2029-10-10 21:27:53','a','foo','1989-12-24','bar',9,1975,b'1'); +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +DROP TABLE t1; diff --git a/mysql-test/suite/maria/create.test b/mysql-test/suite/maria/create.test new file mode 100644 index 00000000000..2e61a95d743 --- /dev/null +++ b/mysql-test/suite/maria/create.test @@ -0,0 +1,31 @@ +--source include/have_maria.inc + +# MDEV-17021 +# Server crash or assertion `length <= column->length' failure in +# write_block_record +# + +CREATE OR REPLACE TABLE t1 ( + f1 DECIMAL(43,0) NOT NULL, + f2 TIME(4) NULL, + f3 BINARY(101) NULL, + f4 TIMESTAMP(4) NULL, + f5 DATETIME(1) NULL, + f6 SET('a','b','c') NOT NULL DEFAULT 'a', + f7 VARBINARY(2332) NOT NULL DEFAULT '', + f8 DATE NULL, + f9 BLOB NULL, + f10 MEDIUMINT(45) NOT NULL DEFAULT 0, + f11 YEAR NULL, + f12 BIT(58) NULL, + v2 TIME(1) AS (f2) VIRTUAL, + v3 BINARY(115) AS (f3) VIRTUAL, + v4 TIMESTAMP(3) AS (f4) VIRTUAL, + v7 VARBINARY(658) AS (f7) PERSISTENT, + v8 DATE AS (f8) PERSISTENT, + v9 TINYTEXT AS (f9) PERSISTENT, + v11 YEAR AS (f11) VIRTUAL +) ENGINE=Aria; +INSERT IGNORE INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12) VALUES + (0.8,'16:01:46',NULL,'2006-03-01 12:44:34','2029-10-10 21:27:53','a','foo','1989-12-24','bar',9,1975,b'1'); +DROP TABLE t1; |