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
499426dd
Commit
499426dd
authored
Sep 25, 2024
by
Nikita Malyavin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time measures
parent
5f94533b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
sql/sql_base.cc
sql/sql_base.cc
+4
-1
sql/sys_vars.cc
sql/sys_vars.cc
+6
-0
No files found.
sql/sql_base.cc
View file @
499426dd
...
...
@@ -5009,7 +5009,7 @@ add_internal_tables(THD *thd, Query_tables_list *prelocking_ctx,
}
while
((
tables
=
tables
->
next_global
));
DBUG_RETURN
(
FALSE
);
}
extern
ulonglong
global_time_spent
;
/**
Extend the table_list to include foreign tables for prelocking.
...
...
@@ -5046,6 +5046,7 @@ prepare_fk_prelocking_list(THD *thd, Query_tables_list *prelocking_ctx,
}
*
need_prelocking
=
TRUE
;
clock_t
start
=
clock
();
while
((
fk
=
fk_list_it
++
))
{
...
...
@@ -5072,6 +5073,8 @@ prepare_fk_prelocking_list(THD *thd, Query_tables_list *prelocking_ctx,
&
prelocking_ctx
->
query_tables_last
,
table_list
->
for_insert_data
);
}
clock_t
measured_time
=
clock
()
-
start
;
global_time_spent
+=
measured_time
;
if
(
arena
)
thd
->
restore_active_arena
(
arena
,
&
backup
);
DBUG_RETURN
(
FALSE
);
...
...
sql/sys_vars.cc
View file @
499426dd
...
...
@@ -7327,3 +7327,9 @@ static Sys_var_enum Sys_block_encryption_mode(
"AES_ENCRYPT() and AES_DECRYPT() functions"
,
SESSION_VAR
(
block_encryption_mode
),
CMD_LINE
(
REQUIRED_ARG
),
block_encryption_mode_values
,
DEFAULT
(
0
));
ulonglong
global_time_spent
=
0
;
static
Sys_var_ulonglong
Sys_time_spent
(
"time_spent"
,
""
,
GLOBAL_VAR
(
global_time_spent
),
CMD_LINE
(
NO_ARG
),
VALID_RANGE
(
0
,
ULONGLONG_MAX
),
DEFAULT
(
0
),
BLOCK_SIZE
(
1
));
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