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
b32f057d
Commit
b32f057d
authored
Jan 15, 2021
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup: Remove ib_lock_t::type_mode_string()
parent
462cb666
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
55 deletions
+34
-55
storage/innobase/include/lock0priv.h
storage/innobase/include/lock0priv.h
+34
-51
storage/innobase/include/lock0types.h
storage/innobase/include/lock0types.h
+0
-4
No files found.
storage/innobase/include/lock0priv.h
View file @
b32f057d
...
...
@@ -64,61 +64,44 @@ operator<<(std::ostream& out, const lock_table_t& lock)
return
(
lock
.
print
(
out
));
}
/** Convert the member 'type_mode' into a human readable string.
@return human readable string */
inline
std
::
string
ib_lock_t
::
type_mode_string
()
const
{
std
::
ostringstream
sout
;
sout
<<
type_string
();
static_assert
(
LOCK_MODE_MASK
==
7
,
"compatibility"
);
static_assert
(
LOCK_IS
==
0
,
"compatibility"
);
static_assert
(
LOCK_IX
==
1
,
"compatibility"
);
static_assert
(
LOCK_S
==
2
,
"compatibility"
);
static_assert
(
LOCK_X
==
3
,
"compatibility"
);
static_assert
(
LOCK_AUTO_INC
==
4
,
"compatibility"
);
static_assert
(
LOCK_NONE
==
5
,
"compatibility"
);
static_assert
(
LOCK_NONE_UNSET
==
7
,
"compatibility"
);
const
char
*
const
modes
[
8
]
=
{
"IS"
,
"IX"
,
"S"
,
"X"
,
"AUTO_INC"
,
"NONE"
,
"?"
,
"NONE_UNSET"
};
sout
<<
" | LOCK_"
<<
modes
[
mode
()];
if
(
is_record_not_gap
())
{
sout
<<
" | LOCK_REC_NOT_GAP"
;
}
if
(
is_waiting
())
{
sout
<<
" | LOCK_WAIT"
;
}
if
(
is_gap
())
{
sout
<<
" | LOCK_GAP"
;
}
if
(
is_insert_intention
())
{
sout
<<
" | LOCK_INSERT_INTENTION"
;
}
return
(
sout
.
str
());
}
inline
std
::
ostream
&
ib_lock_t
::
print
(
std
::
ostream
&
out
)
const
{
out
<<
"[lock_t: type_mode="
<<
type_mode
<<
"("
<<
type_mode_string
()
<<
")"
;
if
(
is_record_lock
())
{
out
<<
un_member
.
rec_lock
;
}
else
{
out
<<
un_member
.
tab_lock
;
}
out
<<
"]"
;
return
(
out
);
static_assert
(
LOCK_MODE_MASK
==
7
,
"compatibility"
);
static_assert
(
LOCK_IS
==
0
,
"compatibility"
);
static_assert
(
LOCK_IX
==
1
,
"compatibility"
);
static_assert
(
LOCK_S
==
2
,
"compatibility"
);
static_assert
(
LOCK_X
==
3
,
"compatibility"
);
static_assert
(
LOCK_AUTO_INC
==
4
,
"compatibility"
);
static_assert
(
LOCK_NONE
==
5
,
"compatibility"
);
static_assert
(
LOCK_NONE_UNSET
==
7
,
"compatibility"
);
const
char
*
const
modes
[
8
]
=
{
"IS"
,
"IX"
,
"S"
,
"X"
,
"AUTO_INC"
,
"NONE"
,
"?"
,
"NONE_UNSET"
};
out
<<
"[lock_t: type_mode="
<<
type_mode
<<
"("
<<
type_string
()
<<
" | LOCK_"
<<
modes
[
mode
()];
if
(
is_record_not_gap
())
out
<<
" | LOCK_REC_NOT_GAP"
;
if
(
is_waiting
())
out
<<
" | LOCK_WAIT"
;
if
(
is_gap
())
out
<<
" | LOCK_GAP"
;
if
(
is_insert_intention
())
out
<<
" | LOCK_INSERT_INTENTION"
;
out
<<
")"
;
if
(
is_record_lock
())
out
<<
un_member
.
rec_lock
;
else
out
<<
un_member
.
tab_lock
;
out
<<
"]"
;
return
out
;
}
inline
...
...
storage/innobase/include/lock0types.h
View file @
b32f057d
...
...
@@ -225,10 +225,6 @@ struct ib_lock_t
@return the given output stream. */
std
::
ostream
&
print
(
std
::
ostream
&
out
)
const
;
/** Convert the member 'type_mode' into a human readable string.
@return human readable string */
std
::
string
type_mode_string
()
const
;
const
char
*
type_string
()
const
{
switch
(
type_mode
&
LOCK_TYPE_MASK
)
{
...
...
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