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
8d37ef29
Commit
8d37ef29
authored
Jun 09, 2021
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aria now marks not used varchar space with MEM_UNDEFINED on read.
parent
15d2a6cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
storage/maria/ma_blockrec.c
storage/maria/ma_blockrec.c
+5
-1
storage/maria/ma_dynrec.c
storage/maria/ma_dynrec.c
+2
-0
No files found.
storage/maria/ma_blockrec.c
View file @
8d37ef29
...
...
@@ -4912,9 +4912,11 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
case
FIELD_VARCHAR
:
{
ulong
length
;
uint
pack_length
__attribute__
((
unused
));
if
(
column
->
length
<=
256
)
{
length
=
(
uint
)
(
uchar
)
(
*
field_pos
++=
*
field_length_data
++
);
pack_length
=
1
;
}
else
{
...
...
@@ -4923,14 +4925,16 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
field_pos
[
1
]
=
field_length_data
[
1
];
field_pos
+=
2
;
field_length_data
+=
2
;
pack_length
=
2
;
}
#ifdef SANITY_CHECKS
if
(
length
>
column
->
length
)
if
(
length
>
column
->
length
-
pack_length
)
goto
err
;
#endif
if
(
read_long_data
(
info
,
field_pos
,
length
,
&
extent
,
&
data
,
&
end_of_data
))
DBUG_RETURN
(
my_errno
);
MEM_UNDEFINED
(
field_pos
+
length
,
column
->
length
-
length
-
pack_length
);
break
;
}
case
FIELD_BLOB
:
...
...
storage/maria/ma_dynrec.c
View file @
8d37ef29
...
...
@@ -1297,6 +1297,8 @@ size_t _ma_rec_unpack(register MARIA_HA *info, register uchar *to, uchar *from,
if
(
from
+
length
>
from_end
)
goto
err
;
memcpy
(
to
+
pack_length
,
from
,
length
);
MEM_UNDEFINED
(
to
+
pack_length
+
length
,
column_length
-
length
-
pack_length
);
from
+=
length
;
min_pack_length
--
;
continue
;
...
...
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