Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b5a54e8a
Commit
b5a54e8a
authored
Jan 04, 2023
by
Michael Roosz
Committed by
Thirunarayanan B
Jan 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-30321: blob data corrupted by row_merge_write_blob_to_tmp_file()
parent
65683807
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
mysql-test/suite/innodb/r/insert_into_empty.result
mysql-test/suite/innodb/r/insert_into_empty.result
+15
-0
mysql-test/suite/innodb/t/insert_into_empty.test
mysql-test/suite/innodb/t/insert_into_empty.test
+17
-0
storage/innobase/row/row0merge.cc
storage/innobase/row/row0merge.cc
+1
-1
No files found.
mysql-test/suite/innodb/r/insert_into_empty.result
View file @
b5a54e8a
...
...
@@ -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
mysql-test/suite/innodb/t/insert_into_empty.test
View file @
b5a54e8a
...
...
@@ -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
storage/innobase/row/row0merge.cc
View file @
b5a54e8a
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment