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
ba21c020
Commit
ba21c020
authored
Jan 28, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some GCC 9.2.1 -Wconversion on 64-bit
parent
f67c9b67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
storage/innobase/include/log0recv.h
storage/innobase/include/log0recv.h
+2
-2
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+11
-12
No files found.
storage/innobase/include/log0recv.h
View file @
ba21c020
...
...
@@ -368,7 +368,7 @@ struct recv_sys_t{
@param[in] len length of the data to be stored
@param[in] store_recv whether to store recv_t object
@return pointer to len bytes of memory (never NULL) */
inline
byte
*
alloc
(
uint32_t
len
,
bool
store_recv
=
false
);
inline
byte
*
alloc
(
size_t
len
,
bool
store_recv
=
false
);
#ifdef UNIV_DEBUG
/** Find the redo_list element corresponding to a redo log record.
...
...
@@ -378,7 +378,7 @@ struct recv_sys_t{
#endif
/** @return the free length of the latest alloc() block, in bytes */
inline
uint32
_t
get_free_len
()
const
;
inline
size
_t
get_free_len
()
const
;
};
/** The recovery system */
...
...
storage/innobase/log/log0recv.cc
View file @
ba21c020
...
...
@@ -870,16 +870,16 @@ void recv_sys_t::debug_free()
mutex_exit
(
&
mutex
);
}
inline
uint32
_t
recv_sys_t
::
get_free_len
()
const
inline
size
_t
recv_sys_t
::
get_free_len
()
const
{
if
(
UT_LIST_GET_LEN
(
redo_list
)
==
0
)
return
0
;
return
srv_page_size
-
static_cast
<
uint32
_t
>
(
UT_LIST_GET_FIRST
(
redo_list
)
->
modify_clock
);
static_cast
<
size
_t
>
(
UT_LIST_GET_FIRST
(
redo_list
)
->
modify_clock
);
}
inline
byte
*
recv_sys_t
::
alloc
(
uint32_t
len
,
bool
store_recv
)
inline
byte
*
recv_sys_t
::
alloc
(
size_t
len
,
bool
store_recv
)
{
ut_ad
(
mutex_own
(
&
mutex
));
ut_ad
(
len
);
...
...
@@ -895,16 +895,16 @@ inline byte* recv_sys_t::alloc(uint32_t len,bool store_recv)
return
block
->
frame
;
}
uint64_t
free_offset
=
block
->
modify_clock
;
size_t
free_offset
=
static_cast
<
size_t
>
(
block
->
modify_clock
)
;
ut_ad
(
free_offset
<=
srv_page_size
);
if
(
store_recv
&&
(
free_offset
+
len
+
sizeof
(
recv_t
::
data
)
+
1
)
>
srv_page_size
)
if
(
store_recv
&&
free_offset
+
len
+
sizeof
(
recv_t
::
data
)
+
1
>
srv_page_size
)
goto
create_block
;
if
(
free_offset
+
len
>
srv_page_size
)
goto
create_block
;
block
->
modify_clock
+=
len
;
block
->
modify_clock
=
free_offset
+
len
;
return
block
->
frame
+
free_offset
;
}
...
...
@@ -1813,15 +1813,14 @@ inline void recv_sys_t::add(mlog_id_t type, const page_id_t page_id,
/* Store the log record body in limited-size chunks, because the
heap grows into the buffer pool. */
uint32_t
len
=
uint32_t
(
rec_end
-
body
);
size_t
len
=
static_cast
<
size_t
>
(
rec_end
-
body
);
recv_t
*
recv
=
new
(
alloc
(
sizeof
(
recv_t
)
,
true
))
recv_t
(
len
,
type
,
lsn
,
end_lsn
);
recv_t
*
recv
=
new
(
alloc
(
sizeof
*
recv
,
true
))
recv_t
(
static_cast
<
uint32_t
>
(
len
)
,
type
,
lsn
,
end_lsn
);
recs
.
log
.
append
(
recv
);
for
(
recv_t
::
data_t
*
prev
=
nullptr
;;)
{
uint32_t
data_free_limit
=
get_free_len
()
-
sizeof
(
recv_t
::
data
);
const
uint32_t
l
=
std
::
min
(
len
,
data_free_limit
);
const
size_t
l
=
std
::
min
(
len
,
get_free_len
()
-
sizeof
(
recv_t
::
data
));
recv_t
::
data_t
*
d
=
new
(
alloc
(
sizeof
(
recv_t
::
data
)
+
l
))
recv_t
::
data_t
(
body
,
l
);
ut_d
(
find_block
(
d
)
->
fix
());
...
...
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