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
0e4317ce
Commit
0e4317ce
authored
Jan 14, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#166 pretty print external lock type
parent
8c25ba62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+8
-2
No files found.
storage/tokudb/ha_tokudb.cc
View file @
0e4317ce
...
@@ -6112,6 +6112,12 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
...
@@ -6112,6 +6112,12 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
return
error
;
return
error
;
}
}
static
const
char
*
lock_type_str
(
int
lock_type
)
{
if
(
lock_type
==
F_RDLCK
)
return
"F_RDLCK"
;
if
(
lock_type
==
F_WRLCK
)
return
"F_WRLCK"
;
if
(
lock_type
==
F_UNLCK
)
return
"F_UNLCK"
;
return
"?"
;
}
/*
/*
As MySQL will execute an external lock for every new table it uses
As MySQL will execute an external lock for every new table it uses
...
@@ -6130,9 +6136,9 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
...
@@ -6130,9 +6136,9 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
// error otherwise
// error otherwise
//
//
int
ha_tokudb
::
external_lock
(
THD
*
thd
,
int
lock_type
)
{
int
ha_tokudb
::
external_lock
(
THD
*
thd
,
int
lock_type
)
{
TOKUDB_HANDLER_DBUG_ENTER
(
"cmd=%d %d
"
,
thd_sql_command
(
thd
),
lock_type
);
TOKUDB_HANDLER_DBUG_ENTER
(
"cmd=%d %d
%s"
,
thd_sql_command
(
thd
),
lock_type
,
lock_type_str
(
lock_type
)
);
if
(
tokudb_debug
&
TOKUDB_DEBUG_LOCK
)
if
(
tokudb_debug
&
TOKUDB_DEBUG_LOCK
)
TOKUDB_TRACE
(
"%s cmd=%d %d
"
,
__FUNCTION__
,
thd_sql_command
(
thd
),
lock_type
);
TOKUDB_TRACE
(
"%s cmd=%d %d
%s"
,
__FUNCTION__
,
thd_sql_command
(
thd
),
lock_type
,
lock_type_str
(
lock_type
)
);
int
error
=
0
;
int
error
=
0
;
tokudb_trx_data
*
trx
=
NULL
;
tokudb_trx_data
*
trx
=
NULL
;
...
...
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