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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
99efe900
Commit
99efe900
authored
Jun 27, 2005
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: After review fixes
parent
8064ee21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
innobase/os/os0file.c
innobase/os/os0file.c
+10
-3
No files found.
innobase/os/os0file.c
View file @
99efe900
...
...
@@ -1668,7 +1668,8 @@ os_file_set_size(
desired_size
=
(
ib_longlong
)
size
+
(((
ib_longlong
)
size_high
)
<<
32
);
/* Write up to 1 megabyte at a time. */
buf_size
=
ut_min
(
UNIV_PAGE_SIZE
*
64
,
desired_size
);
buf_size
=
ut_min
(
64
,
(
ulint
)
(
desired_size
/
UNIV_PAGE_SIZE
))
*
UNIV_PAGE_SIZE
;
buf2
=
ut_malloc
(
buf_size
+
UNIV_PAGE_SIZE
);
/* Align the buffer for possible raw i/o */
...
...
@@ -1683,8 +1684,14 @@ os_file_set_size(
}
while
(
current_size
<
desired_size
)
{
ulint
n_bytes
=
ut_min
(
buf_size
,
(
ulint
)
(
desired_size
-
current_size
));
ulint
n_bytes
;
if
(
desired_size
-
current_size
<
(
ib_longlong
)
buf_size
)
{
n_bytes
=
(
ulint
)
(
desired_size
-
current_size
);
}
else
{
n_bytes
=
buf_size
;
}
ret
=
os_file_write
(
name
,
file
,
buf
,
(
ulint
)(
current_size
&
0xFFFFFFFF
),
(
ulint
)(
current_size
>>
32
),
...
...
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