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
c92bf28b
Commit
c92bf28b
authored
Jan 04, 2018
by
Sergei Golubchik
Committed by
Aleksey Midenkov
Jan 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: don't use thd->set_current_time() directly
parent
d20d7a92
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
17 deletions
+9
-17
sql/event_queue.cc
sql/event_queue.cc
+1
-1
sql/log_event.cc
sql/log_event.cc
+2
-13
sql/sql_class.h
sql/sql_class.h
+4
-1
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/table.cc
sql/table.cc
+1
-1
No files found.
sql/event_queue.cc
View file @
c92bf28b
...
@@ -617,7 +617,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
...
@@ -617,7 +617,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
top
=
(
Event_queue_element
*
)
queue_top
(
&
queue
);
top
=
(
Event_queue_element
*
)
queue_top
(
&
queue
);
thd
->
set_
curren
t_time
();
/* Get current time */
thd
->
set_
star
t_time
();
/* Get current time */
next_activation_at
=
top
->
execute_at
;
next_activation_at
=
top
->
execute_at
;
if
(
next_activation_at
>
thd
->
query_start
())
if
(
next_activation_at
>
thd
->
query_start
())
...
...
sql/log_event.cc
View file @
c92bf28b
...
@@ -12507,13 +12507,7 @@ Rows_log_event::write_row(rpl_group_info *rgi,
...
@@ -12507,13 +12507,7 @@ Rows_log_event::write_row(rpl_group_info *rgi,
bitmap_set_bit
(
table
->
read_set
,
table
->
vers_start_field
()
->
field_index
);
bitmap_set_bit
(
table
->
read_set
,
table
->
vers_start_field
()
->
field_index
);
// Check whether a row came from unversioned table and fix vers fields.
// Check whether a row came from unversioned table and fix vers fields.
if
(
table
->
vers_start_field
()
->
get_timestamp
(
&
sec_part
)
==
0
&&
sec_part
==
0
)
if
(
table
->
vers_start_field
()
->
get_timestamp
(
&
sec_part
)
==
0
&&
sec_part
==
0
)
{
table
->
vers_update_fields
();
bitmap_set_bit
(
table
->
write_set
,
table
->
vers_start_field
()
->
field_index
);
bitmap_set_bit
(
table
->
write_set
,
table
->
vers_end_field
()
->
field_index
);
thd
->
set_current_time
();
table
->
vers_start_field
()
->
set_time
();
table
->
vers_end_field
()
->
set_max
();
}
}
}
/*
/*
...
@@ -13706,12 +13700,7 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
...
@@ -13706,12 +13700,7 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
m_table
->
mark_columns_per_binlog_row_image
();
m_table
->
mark_columns_per_binlog_row_image
();
if
(
m_vers_from_plain
&&
m_table
->
versioned
(
VERS_TIMESTAMP
))
if
(
m_vers_from_plain
&&
m_table
->
versioned
(
VERS_TIMESTAMP
))
{
m_table
->
vers_update_fields
();
bitmap_set_bit
(
m_table
->
write_set
,
m_table
->
vers_start_field
()
->
field_index
);
thd
->
set_current_time
();
m_table
->
vers_start_field
()
->
set_time
();
}
error
=
m_table
->
file
->
ha_update_row
(
m_table
->
record
[
1
],
m_table
->
record
[
0
]);
error
=
m_table
->
file
->
ha_update_row
(
m_table
->
record
[
1
],
m_table
->
record
[
0
]);
if
(
error
==
HA_ERR_RECORD_IS_THE_SAME
)
if
(
error
==
HA_ERR_RECORD_IS_THE_SAME
)
error
=
0
;
error
=
0
;
...
...
sql/sql_class.h
View file @
c92bf28b
...
@@ -3376,6 +3376,7 @@ class THD :public Statement,
...
@@ -3376,6 +3376,7 @@ class THD :public Statement,
{
query_start_sec_part_used
=
1
;
return
start_time_sec_part
;
}
{
query_start_sec_part_used
=
1
;
return
start_time_sec_part
;
}
MYSQL_TIME
query_start_TIME
();
MYSQL_TIME
query_start_TIME
();
private
:
void
start_time_inc
()
void
start_time_inc
()
{
{
++
start_time_sec_part
;
++
start_time_sec_part
;
...
@@ -3392,7 +3393,7 @@ class THD :public Statement,
...
@@ -3392,7 +3393,7 @@ class THD :public Statement,
start_time
>
secs
;
start_time
>
secs
;
}
}
inline
void
set_current_time
()
void
set_current_time
()
{
{
my_hrtime_t
hrtime
=
my_hrtime
();
my_hrtime_t
hrtime
=
my_hrtime
();
my_time_t
secs
=
hrtime_to_my_time
(
hrtime
);
my_time_t
secs
=
hrtime_to_my_time
(
hrtime
);
...
@@ -3408,6 +3409,8 @@ class THD :public Statement,
...
@@ -3408,6 +3409,8 @@ class THD :public Statement,
}
}
PSI_CALL_set_thread_start_time
(
start_time
);
PSI_CALL_set_thread_start_time
(
start_time
);
}
}
public
:
inline
void
set_start_time
()
inline
void
set_start_time
()
{
{
if
(
user_time
.
val
)
if
(
user_time
.
val
)
...
...
sql/sql_insert.cc
View file @
c92bf28b
...
@@ -2938,7 +2938,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
...
@@ -2938,7 +2938,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
pthread_detach_this_thread
();
pthread_detach_this_thread
();
/* Add thread to THD list so that's it's visible in 'show processlist' */
/* Add thread to THD list so that's it's visible in 'show processlist' */
thd
->
set_
curren
t_time
();
thd
->
set_
star
t_time
();
add_to_active_threads
(
thd
);
add_to_active_threads
(
thd
);
if
(
abort_loop
)
if
(
abort_loop
)
thd
->
set_killed
(
KILL_CONNECTION
);
thd
->
set_killed
(
KILL_CONNECTION
);
...
...
sql/table.cc
View file @
c92bf28b
...
@@ -8621,7 +8621,7 @@ bool TR_table::update(ulonglong start_id, ulonglong end_id)
...
@@ -8621,7 +8621,7 @@ bool TR_table::update(ulonglong start_id, ulonglong end_id)
return
true
;
return
true
;
timeval
start_time
=
{
thd
->
start_time
,
long
(
thd
->
start_time_sec_part
)};
timeval
start_time
=
{
thd
->
start_time
,
long
(
thd
->
start_time_sec_part
)};
thd
->
set_
curren
t_time
();
thd
->
set_
star
t_time
();
timeval
end_time
=
{
thd
->
start_time
,
long
(
thd
->
start_time_sec_part
)};
timeval
end_time
=
{
thd
->
start_time
,
long
(
thd
->
start_time_sec_part
)};
store
(
FLD_TRX_ID
,
start_id
);
store
(
FLD_TRX_ID
,
start_id
);
store
(
FLD_COMMIT_ID
,
end_id
);
store
(
FLD_COMMIT_ID
,
end_id
);
...
...
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