Commit 669fd1d9 authored by Aleksey Midenkov's avatar Aleksey Midenkov

IB: ulint compilation fixes

parent 1d9d3513
...@@ -1305,6 +1305,15 @@ struct trx_t { ...@@ -1305,6 +1305,15 @@ struct trx_t {
return(assign_temp_rseg()); 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: private:
/** Assign a rollback segment for modifying temporary tables. /** Assign a rollback segment for modifying temporary tables.
@return the assigned rollback segment */ @return the assigned rollback segment */
......
...@@ -180,9 +180,7 @@ trx_purge_graph_build(sess_t* sess) ...@@ -180,9 +180,7 @@ trx_purge_graph_build(sess_t* sess)
ut_ad(trx->sess == sess); ut_ad(trx->sess == sess);
trx->id = 0; trx->id = 0;
ut_usectime((ulong *)&trx->start_time, trx->init_start_time();
(ulong *)&trx->start_time_micro);
trx->start_time_micro += trx->start_time * 1000000;
trx->state = TRX_STATE_ACTIVE; trx->state = TRX_STATE_ACTIVE;
trx->op_info = "purge trx"; trx->op_info = "purge trx";
......
...@@ -869,9 +869,7 @@ trx_resurrect_insert( ...@@ -869,9 +869,7 @@ trx_resurrect_insert(
if (trx->state == TRX_STATE_ACTIVE if (trx->state == TRX_STATE_ACTIVE
|| trx->state == TRX_STATE_PREPARED) { || trx->state == TRX_STATE_PREPARED) {
ut_usectime((ulong *)&trx->start_time, trx->init_start_time();
(ulong *)&trx->start_time_micro);
trx->start_time_micro += trx->start_time * 1000000;
} }
if (undo->dict_operation) { if (undo->dict_operation) {
...@@ -961,9 +959,7 @@ trx_resurrect_update( ...@@ -961,9 +959,7 @@ trx_resurrect_update(
start time here.*/ start time here.*/
if (trx->state == TRX_STATE_ACTIVE if (trx->state == TRX_STATE_ACTIVE
|| trx->state == TRX_STATE_PREPARED) { || trx->state == TRX_STATE_PREPARED) {
ut_usectime((ulong *)&trx->start_time, trx->init_start_time();
(ulong *)&trx->start_time_micro);
trx->start_time_micro += trx->start_time * 1000000;
} }
if (undo->dict_operation) { if (undo->dict_operation) {
...@@ -1339,9 +1335,7 @@ trx_start_low( ...@@ -1339,9 +1335,7 @@ trx_start_low(
trx->start_time = trx->start_time_micro / 1000000; trx->start_time = trx->start_time_micro / 1000000;
} else { } else {
ut_usectime((ulong *)&trx->start_time, trx->init_start_time();
(ulong *)&trx->start_time_micro);
trx->start_time_micro += trx->start_time * 1000000;
} }
ut_a(trx->error_state == DB_SUCCESS); ut_a(trx->error_state == DB_SUCCESS);
......
...@@ -228,7 +228,7 @@ operator< (const timeval &a, const timeval &b) ...@@ -228,7 +228,7 @@ operator< (const timeval &a, const timeval &b)
static static
trx_id_t trx_id_t
read_trx_id(const rec_t *rec) { 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); const rec_t *field = rec_get_nth_field_old(rec, 1, &len);
DBUG_ASSERT(len == 8); DBUG_ASSERT(len == 8);
return mach_read_from_8(field); return mach_read_from_8(field);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment