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
1e355912
Commit
1e355912
authored
Jan 24, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#16742 - ndb dd - round filesize upwards
parent
7d821c23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
storage/ndb/src/kernel/blocks/tsman.cpp
storage/ndb/src/kernel/blocks/tsman.cpp
+6
-11
No files found.
storage/ndb/src/kernel/blocks/tsman.cpp
View file @
1e355912
...
...
@@ -684,20 +684,15 @@ Tsman::open_file(Signal* signal,
req
->
file_size_lo
=
lo
;
Uint64
pages
=
(
Uint64
(
hi
)
<<
32
|
lo
)
/
File_formats
::
NDB_PAGE_SIZE
;
// Extent size in #pages
Uint32
extent_size
=
ts_ptr
.
p
->
m_extent_size
;
Uint32
extent_size
=
ts_ptr
.
p
->
m_extent_size
;
// Extent size in #pages
Uint64
extents
=
(
pages
+
extent_size
-
1
)
/
extent_size
;
extents
=
extents
?
extents
:
1
;
Uint64
data_pages
=
extents
*
extent_size
;
Uint32
eh_words
=
File_formats
::
Datafile
::
extent_header_words
(
extent_size
);
ndbrequire
(
eh_words
<
File_formats
::
Datafile
::
EXTENT_PAGE_WORDS
);
Uint32
extents_per_page
=
File_formats
::
Datafile
::
EXTENT_PAGE_WORDS
/
eh_words
;
Uint64
tmp
=
Uint64
(
extents_per_page
)
*
Uint64
(
extent_size
);
Uint64
extent_pages
=
pages
/
(
1
+
tmp
);
extent_pages
=
extent_pages
?
extent_pages
:
1
;
Uint64
data_pages
=
pages
-
extent_pages
-
1
;
Uint64
extents
=
data_pages
/
extent_size
;
data_pages
=
extents
*
extent_size
;
Uint64
extent_pages
=
(
extents
+
extents_per_page
-
1
)
/
extents_per_page
;
ptr
.
p
->
m_create
.
m_extent_pages
=
extent_pages
;
ptr
.
p
->
m_create
.
m_data_pages
=
data_pages
;
...
...
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