diff options
author | Monty <monty@mariadb.org> | 2017-06-09 16:30:58 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-08-24 01:04:35 +0200 |
commit | b77bb43f60fdb3e407b06dfa5ea9559b9347d44d (patch) | |
tree | 4c4ea6ddffcabb0e5ae41ffd8128147e3c39b567 /sql/log_event.cc | |
parent | 44676ed5b115c84a8e2023f51ffd38e6240461db (diff) | |
download | mariadb-git-b77bb43f60fdb3e407b06dfa5ea9559b9347d44d.tar.gz |
Use microsecond_interval_timer() instead of my_time() in replicaiton
- Use microsecond_interval_timer() to calculate time for applying row events.
(Faster execution)
- Removed return value for set_row_stmt_start_timestamp()
as it was never used.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index f4518b6ab95..5029145c3fd 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -12963,13 +12963,13 @@ void issue_long_find_row_warning(Log_event_type type, if ((global_system_variables.log_warnings > 1 && !rgi->is_long_find_row_note_printed())) { - time_t now= my_time(0); - time_t stmt_ts= rgi->get_row_stmt_start_timestamp(); + ulonglong now= microsecond_interval_timer(); + ulonglong stmt_ts= rgi->get_row_stmt_start_timestamp(); DBUG_EXECUTE_IF("inject_long_find_row_note", - stmt_ts-=(LONG_FIND_ROW_THRESHOLD*2);); + stmt_ts-=(LONG_FIND_ROW_THRESHOLD*2*HRTIME_RESOLUTION);); - long delta= (long) (now - stmt_ts); + longlong delta= (now - stmt_ts)/HRTIME_RESOLUTION; if (delta > LONG_FIND_ROW_THRESHOLD) { @@ -13375,7 +13375,6 @@ int Delete_rows_log_event::do_after_row_operations(const Slave_reporting_capability *const, int error) { - /*error= ToDo:find out what this should really be, this triggers close_scan in nbd, returning error?*/ m_table->file->ha_index_or_rnd_end(); my_free(m_key); m_key= NULL; |