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
2dc3c320
Commit
2dc3c320
authored
Apr 22, 2021
by
Aleksey Midenkov
Committed by
Sergei Golubchik
Oct 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-25292 Better debug trace
Improves readability of DDL log debug traces.
parent
045757af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
sql/ddl_log.cc
sql/ddl_log.cc
+16
-7
No files found.
sql/ddl_log.cc
View file @
2dc3c320
...
...
@@ -335,7 +335,7 @@ static bool write_ddl_log_file_entry(uint entry_pos)
static
bool
update_phase
(
uint
entry_pos
,
uchar
phase
)
{
DBUG_ENTER
(
"update_phase"
);
DBUG_PRINT
(
"
enter"
,
(
"phase: %d"
,
(
int
)
phase
));
DBUG_PRINT
(
"
ddl_log"
,
(
"pos: %u phase: %u"
,
entry_pos
,
(
u
int
)
phase
));
DBUG_RETURN
(
mysql_file_pwrite
(
global_ddl_log
.
file_id
,
&
phase
,
1
,
global_ddl_log
.
io_size
*
entry_pos
+
...
...
@@ -369,6 +369,8 @@ static bool update_next_entry_pos(uint entry_pos, uint next_entry)
uchar
buff
[
4
];
DBUG_ENTER
(
"update_next_entry_pos"
);
DBUG_PRINT
(
"ddl_log"
,
(
"pos: %u->%u"
,
entry_pos
,
next_entry
));
int4store
(
buff
,
next_entry
);
DBUG_RETURN
(
mysql_file_pwrite
(
global_ddl_log
.
file_id
,
buff
,
sizeof
(
buff
),
global_ddl_log
.
io_size
*
entry_pos
+
...
...
@@ -420,6 +422,7 @@ static bool disable_execute_entry(uint entry_pos)
{
uchar
buff
[
1
];
DBUG_ENTER
(
"disable_execute_entry"
);
DBUG_PRINT
(
"ddl_log"
,
(
"pos: {%u}"
,
entry_pos
));
buff
[
0
]
=
DDL_LOG_IGNORE_ENTRY_CODE
;
DBUG_RETURN
(
mysql_file_pwrite
(
global_ddl_log
.
file_id
,
buff
,
sizeof
(
buff
),
...
...
@@ -1296,13 +1299,15 @@ static int ddl_log_execute_action(THD *thd, MEM_ROOT *mem_root,
mysql_mutex_assert_owner
(
&
LOCK_gdl
);
DBUG_PRINT
(
"ddl_log"
,
(
"
entry type: %u action type: %u (%s) phase: %u next
: %u "
(
"
pos: %u=>%u->%u type: %u action: %u (%s) phase
: %u "
"handler: '%s' name: '%s' from_name: '%s' tmp_name: '%s'"
,
recovery_state
.
execute_entry_pos
,
ddl_log_entry
->
entry_pos
,
ddl_log_entry
->
next_entry
,
(
uint
)
ddl_log_entry
->
entry_type
,
(
uint
)
ddl_log_entry
->
action_type
,
ddl_log_action_name
[
ddl_log_entry
->
action_type
],
(
uint
)
ddl_log_entry
->
phase
,
ddl_log_entry
->
next_entry
,
ddl_log_entry
->
handler_name
.
str
,
ddl_log_entry
->
name
.
str
,
ddl_log_entry
->
from_name
.
str
,
...
...
@@ -2470,13 +2475,13 @@ bool ddl_log_write_entry(DDL_LOG_ENTRY *ddl_log_entry,
error
=
FALSE
;
DBUG_PRINT
(
"ddl_log"
,
(
"
entry type: %u action type: %u (%s) phase: %u next
: %u "
(
"
pos: %u->%u action: %u (%s) phase
: %u "
"handler: '%s' name: '%s' from_name: '%s' tmp_name: '%s'"
,
(
uint
)
ddl_log_entry
->
entry_type
,
(
*
active_entry
)
->
entry_pos
,
(
uint
)
ddl_log_entry
->
next_entry
,
(
uint
)
ddl_log_entry
->
action_type
,
ddl_log_action_name
[
ddl_log_entry
->
action_type
],
(
uint
)
ddl_log_entry
->
phase
,
ddl_log_entry
->
next_entry
,
ddl_log_entry
->
handler_name
.
str
,
ddl_log_entry
->
name
.
str
,
ddl_log_entry
->
from_name
.
str
,
...
...
@@ -2542,7 +2547,10 @@ bool ddl_log_write_execute_entry(uint first_entry,
if
(
ddl_log_get_free_entry
(
active_entry
))
DBUG_RETURN
(
TRUE
);
got_free_entry
=
TRUE
;
}
}
DBUG_PRINT
(
"ddl_log"
,
(
"pos: %u=>%u"
,
(
*
active_entry
)
->
entry_pos
,
first_entry
));
if
(
write_ddl_log_file_entry
((
*
active_entry
)
->
entry_pos
))
{
if
(
got_free_entry
)
...
...
@@ -2575,6 +2583,7 @@ bool ddl_log_increment_phase(uint entry_pos)
{
bool
error
;
DBUG_ENTER
(
"ddl_log_increment_phase"
);
DBUG_PRINT
(
"ddl_log"
,
(
"pos: %u"
,
entry_pos
));
mysql_mutex_lock
(
&
LOCK_gdl
);
error
=
ddl_log_increment_phase_no_lock
(
entry_pos
);
...
...
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