diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-24 21:43:19 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-24 21:59:26 +0300 |
commit | 0c7c61019d89aae46632016f83562b72406dc49b (patch) | |
tree | 64941633969de1a01daa4b05351067ad299ccafa /storage/innobase/dict | |
parent | c663a9414b3fda92faeb5f7fefc866c55cf06dbd (diff) | |
download | mariadb-git-0c7c61019d89aae46632016f83562b72406dc49b.tar.gz |
Remove the wrappers ut_time(), ut_difftime(), ib_time_t
Diffstat (limited to 'storage/innobase/dict')
-rw-r--r-- | storage/innobase/dict/dict0mem.cc | 2 | ||||
-rw-r--r-- | storage/innobase/dict/dict0stats.cc | 12 | ||||
-rw-r--r-- | storage/innobase/dict/dict0stats_bg.cc | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc index 3d32cf2479c..c5f845d14b1 100644 --- a/storage/innobase/dict/dict0mem.cc +++ b/storage/innobase/dict/dict0mem.cc @@ -750,7 +750,7 @@ void dict_mem_init(void) { /* Initialize a randomly distributed temporary file number */ - ib_uint32_t now = static_cast<ib_uint32_t>(ut_time()); + ib_uint32_t now = static_cast<ib_uint32_t>(time(NULL)); const byte* buf = reinterpret_cast<const byte*>(&now); ut_ad(ut_crc32 != NULL); diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index 3cbd88c0f0a..59c661514f5 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -45,7 +45,7 @@ Created Jan 06, 2010 Vasil Dimov #include "trx0trx.h" /* trx_create() */ #include "trx0roll.h" /* trx_rollback_to_savepoint() */ #include "ut0rnd.h" /* ut_rnd_interval() */ -#include "ut0ut.h" /* ut_format_name(), ut_time() */ +#include "ut0ut.h" /* ut_format_name() */ #include <algorithm> #include <map> @@ -1000,7 +1000,7 @@ dict_stats_update_transient( table->stat_sum_of_other_index_sizes = sum_of_index_sizes - index->stat_index_size; - table->stats_last_recalc = ut_time(); + table->stats_last_recalc = time(NULL); table->stat_modified_counter = 0; @@ -2325,7 +2325,7 @@ dict_stats_update_persistent( += index->stat_index_size; } - table->stats_last_recalc = ut_time(); + table->stats_last_recalc = time(NULL); table->stat_modified_counter = 0; @@ -2535,7 +2535,7 @@ dict_stats_save( /* MySQL's timestamp is 4 byte, so we use pars_info_add_int4_literal() which takes a lint arg, so "now" is lint */ - now = (lint) ut_time(); + now = (lint) time(NULL); pinfo = pars_info_create(); @@ -3980,7 +3980,7 @@ dict_stats_save_defrag_summary( dict_index_t* index) /*!< in: index */ { dberr_t ret; - lint now = (lint) ut_time(); + lint now = (lint) time(NULL); if (dict_index_is_univ(index)) { return DB_SUCCESS; } @@ -4017,7 +4017,7 @@ dict_stats_save_defrag_stats( return DB_SUCCESS; } - lint now = (lint) ut_time(); + lint now = (lint) time(NULL); mtr_t mtr; ulint n_leaf_pages; ulint n_leaf_reserved; diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index dad768a7c3b..b4923364cac 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -437,14 +437,14 @@ dict_stats_process_entry_from_recalc_pool() mutex_exit(&dict_sys->mutex); - /* ut_time() could be expensive, the current function + /* time() could be expensive, the current function is called once every time a table has been changed more than 10% and on a system with lots of small tables, this could become hot. If we find out that this is a problem, then the check below could eventually be replaced with something else, though a time interval is the natural approach. */ - if (ut_difftime(ut_time(), table->stats_last_recalc) + if (difftime(time(NULL), table->stats_last_recalc) < MIN_RECALC_INTERVAL) { /* Stats were (re)calculated not long ago. To avoid |