mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-30321: blob data corrupted by row_merge_write_blob_to_tmp_file()
This commit is contained in:
committed by
Thirunarayanan B
parent
65683807e9
commit
b5a54e8a93
@@ -387,4 +387,19 @@ Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL INNODB_DEFAULT_ROW_FORMAT= @format;
|
||||
#
|
||||
# MDEV-30321 blob data corrupted by row_merge_write_blob_to_tmp_file()
|
||||
#
|
||||
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);
|
||||
nb_corrupted_rows
|
||||
0
|
||||
DROP TABLE t1;
|
||||
# End of 10.7 tests
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1066,7 +1066,7 @@ static dberr_t row_merge_write_blob_to_tmp_file(
|
||||
uint32_t len= field->len;
|
||||
dberr_t err= os_file_write(
|
||||
IORequestWrite, "(bulk insert)", blob_file->fd,
|
||||
field->data, blob_file->offset * srv_page_size, len);
|
||||
field->data, blob_file->offset, len);
|
||||
|
||||
if (err != DB_SUCCESS)
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user