summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/insert_into_empty.test
diff options
context:
space:
mode:
authorMichael Roosz <michael.roosz@check24.de>2023-01-04 10:06:34 +0100
committerThirunarayanan B <thiru@mariadb.com>2023-01-04 16:21:07 +0530
commitb5a54e8a9305885e2850d6dabde08ad369094ff3 (patch)
tree0189bd9dc3ac347f8a51a7b8ca2bed0bcdce75fb /mysql-test/suite/innodb/t/insert_into_empty.test
parent65683807e911bc3b5548b4a1163a58b0f9659027 (diff)
downloadmariadb-git-b5a54e8a9305885e2850d6dabde08ad369094ff3.tar.gz
MDEV-30321: blob data corrupted by row_merge_write_blob_to_tmp_file()
Diffstat (limited to 'mysql-test/suite/innodb/t/insert_into_empty.test')
-rw-r--r--mysql-test/suite/innodb/t/insert_into_empty.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test
index fab1b882868..468b150aae0 100644
--- a/mysql-test/suite/innodb/t/insert_into_empty.test
+++ b/mysql-test/suite/innodb/t/insert_into_empty.test
@@ -405,4 +405,21 @@ CHECK TABLE t1;
DROP TABLE t1;
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT= @format;
+--echo #
+--echo # MDEV-30321 blob data corrupted by row_merge_write_blob_to_tmp_file()
+--echo #
+
+CREATE TABLE t1 (
+ `id` int(11) NOT NULL,
+ `data` LONGBLOB NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES
+ (1, REPEAT('X', @@innodb_sort_buffer_size)),
+ (2, REPEAT('X', @@innodb_sort_buffer_size));
+
+SELECT COUNT(*) AS nb_corrupted_rows FROM t1 WHERE data != REPEAT('X', @@innodb_sort_buffer_size);
+DROP TABLE t1;
+
--echo # End of 10.7 tests