diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2017-10-27 11:54:27 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2017-11-13 19:11:03 +0300 |
commit | 669fd1d96283f4cd7bf770513966c6a588f7416b (patch) | |
tree | b794c1df1e9f354cfda07a8fe19a7f7bb2abd85e | |
parent | 1d9d3513462b4faec68a7fe28638632dbcab8178 (diff) | |
download | mariadb-git-669fd1d96283f4cd7bf770513966c6a588f7416b.tar.gz |
IB: ulint compilation fixes
-rw-r--r-- | storage/innobase/include/trx0trx.h | 9 | ||||
-rw-r--r-- | storage/innobase/trx/trx0purge.cc | 4 | ||||
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 12 | ||||
-rw-r--r-- | storage/innobase/vers/vers0vtq.cc | 2 |
4 files changed, 14 insertions, 13 deletions
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index f287fea3ec6..3b6a2d9fe37 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1305,6 +1305,15 @@ struct trx_t { return(assign_temp_rseg()); } + void init_start_time() + { + ulint secs; + ulint usecs; + ut_usectime(&secs, &usecs); + start_time = secs; + start_time_micro = usecs + (ib_uint64_t) secs * 1000000; + } + private: /** Assign a rollback segment for modifying temporary tables. @return the assigned rollback segment */ diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index 1c1f85068a4..64757c3f956 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -180,9 +180,7 @@ trx_purge_graph_build(sess_t* sess) ut_ad(trx->sess == sess); trx->id = 0; - ut_usectime((ulong *)&trx->start_time, - (ulong *)&trx->start_time_micro); - trx->start_time_micro += trx->start_time * 1000000; + trx->init_start_time(); trx->state = TRX_STATE_ACTIVE; trx->op_info = "purge trx"; diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index c15d324a0ef..d42971d0c40 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -869,9 +869,7 @@ trx_resurrect_insert( if (trx->state == TRX_STATE_ACTIVE || trx->state == TRX_STATE_PREPARED) { - ut_usectime((ulong *)&trx->start_time, - (ulong *)&trx->start_time_micro); - trx->start_time_micro += trx->start_time * 1000000; + trx->init_start_time(); } if (undo->dict_operation) { @@ -961,9 +959,7 @@ trx_resurrect_update( start time here.*/ if (trx->state == TRX_STATE_ACTIVE || trx->state == TRX_STATE_PREPARED) { - ut_usectime((ulong *)&trx->start_time, - (ulong *)&trx->start_time_micro); - trx->start_time_micro += trx->start_time * 1000000; + trx->init_start_time(); } if (undo->dict_operation) { @@ -1339,9 +1335,7 @@ trx_start_low( trx->start_time = trx->start_time_micro / 1000000; } else { - ut_usectime((ulong *)&trx->start_time, - (ulong *)&trx->start_time_micro); - trx->start_time_micro += trx->start_time * 1000000; + trx->init_start_time(); } ut_a(trx->error_state == DB_SUCCESS); diff --git a/storage/innobase/vers/vers0vtq.cc b/storage/innobase/vers/vers0vtq.cc index 0e500234008..62bcce4c656 100644 --- a/storage/innobase/vers/vers0vtq.cc +++ b/storage/innobase/vers/vers0vtq.cc @@ -228,7 +228,7 @@ operator< (const timeval &a, const timeval &b) static trx_id_t read_trx_id(const rec_t *rec) { - ulong len = 0; + ulint len = 0; const rec_t *field = rec_get_nth_field_old(rec, 1, &len); DBUG_ASSERT(len == 8); return mach_read_from_8(field); |