IB: do not use long and ullong types [#306]
This commit is contained in:
parent
ba80eeb584
commit
4a662df945
@ -867,8 +867,8 @@ vtq_record_t& out /*!< out: field values */
|
|||||||
field = rec_get_nth_field_old(
|
field = rec_get_nth_field_old(
|
||||||
rec, (nfld = DICT_FLD__SYS_VTQ__BEGIN_TS), &len);
|
rec, (nfld = DICT_FLD__SYS_VTQ__BEGIN_TS), &len);
|
||||||
|
|
||||||
if (len != sizeof(ullong))
|
if (len != sizeof(uint64_t))
|
||||||
return dict_print_error(heap, nfld, len, sizeof(ullong));
|
return dict_print_error(heap, nfld, len, sizeof(uint64_t));
|
||||||
|
|
||||||
out.begin_ts.tv_sec = mach_read_from_4(field);
|
out.begin_ts.tv_sec = mach_read_from_4(field);
|
||||||
out.begin_ts.tv_usec = mach_read_from_4(field + 4);
|
out.begin_ts.tv_usec = mach_read_from_4(field + 4);
|
||||||
@ -876,8 +876,8 @@ vtq_record_t& out /*!< out: field values */
|
|||||||
field = rec_get_nth_field_old(
|
field = rec_get_nth_field_old(
|
||||||
rec, (nfld = DICT_FLD__SYS_VTQ__COMMIT_TS), &len);
|
rec, (nfld = DICT_FLD__SYS_VTQ__COMMIT_TS), &len);
|
||||||
|
|
||||||
if (len != sizeof(ullong))
|
if (len != sizeof(uint64_t))
|
||||||
return dict_print_error(heap, nfld, len, sizeof(ullong));
|
return dict_print_error(heap, nfld, len, sizeof(uint64_t));
|
||||||
|
|
||||||
out.commit_ts.tv_sec = mach_read_from_4(field);
|
out.commit_ts.tv_sec = mach_read_from_4(field);
|
||||||
out.commit_ts.tv_usec = mach_read_from_4(field + 4);
|
out.commit_ts.tv_usec = mach_read_from_4(field + 4);
|
||||||
|
@ -354,10 +354,10 @@ Auxiliary function to store ulint value in MYSQL_TYPE_LONGLONG field.
|
|||||||
If the value is UINT64_UNDEFINED then the field it set to NULL.
|
If the value is UINT64_UNDEFINED then the field it set to NULL.
|
||||||
@return 0 on success */
|
@return 0 on success */
|
||||||
int
|
int
|
||||||
field_store_ullong(
|
field_store_uint64_t(
|
||||||
/*==============*/
|
/*==============*/
|
||||||
Field* field, /*!< in/out: target field for storage */
|
Field* field, /*!< in/out: target field for storage */
|
||||||
ullong n) /*!< in: value to store */
|
uint64_t n) /*!< in: value to store */
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -9734,8 +9734,8 @@ i_s_dict_fill_vtq(
|
|||||||
|
|
||||||
iso_level = i_s_isolation_name(vtq.iso_level);
|
iso_level = i_s_isolation_name(vtq.iso_level);
|
||||||
|
|
||||||
OK(field_store_ullong(fields[SYS_VTQ_TRX_ID], vtq.trx_id));
|
OK(field_store_uint64_t(fields[SYS_VTQ_TRX_ID], vtq.trx_id));
|
||||||
OK(field_store_ullong(fields[SYS_VTQ_COMMIT_ID], vtq.commit_id));
|
OK(field_store_uint64_t(fields[SYS_VTQ_COMMIT_ID], vtq.commit_id));
|
||||||
OK(field_store_timeval(fields[SYS_VTQ_BEGIN_TS], vtq.begin_ts, thd));
|
OK(field_store_timeval(fields[SYS_VTQ_BEGIN_TS], vtq.begin_ts, thd));
|
||||||
OK(field_store_timeval(fields[SYS_VTQ_COMMIT_TS], vtq.commit_ts, thd));
|
OK(field_store_timeval(fields[SYS_VTQ_COMMIT_TS], vtq.commit_ts, thd));
|
||||||
OK(field_store_string(fields[SYS_VTQ_ISO_LEVEL], iso_level));
|
OK(field_store_string(fields[SYS_VTQ_ISO_LEVEL], iso_level));
|
||||||
|
@ -454,8 +454,6 @@ typedef uint32_t ib_uint32_t;
|
|||||||
#define UINT64PF "%" UINT64scan
|
#define UINT64PF "%" UINT64scan
|
||||||
#define IB_ID_FMT UINT64PF
|
#define IB_ID_FMT UINT64PF
|
||||||
|
|
||||||
typedef ib_uint64_t ullong;
|
|
||||||
|
|
||||||
/** Log sequence number (also used for redo log byte arithmetics) */
|
/** Log sequence number (also used for redo log byte arithmetics) */
|
||||||
typedef ib_uint64_t lsn_t;
|
typedef ib_uint64_t lsn_t;
|
||||||
|
|
||||||
|
@ -4056,7 +4056,7 @@ void vers_notify_vtq(trx_t* trx)
|
|||||||
dtuple_t* tuple = dtuple_create(heap, dict_table_get_n_cols(dict_sys->sys_vtq));
|
dtuple_t* tuple = dtuple_create(heap, dict_table_get_n_cols(dict_sys->sys_vtq));
|
||||||
|
|
||||||
timeval begin_ts, commit_ts;
|
timeval begin_ts, commit_ts;
|
||||||
begin_ts.tv_sec = static_cast<long>(trx->start_time);
|
begin_ts.tv_sec = static_cast<my_time_t>(trx->start_time);
|
||||||
begin_ts.tv_usec = trx->start_time_micro % 1000000;
|
begin_ts.tv_usec = trx->start_time_micro % 1000000;
|
||||||
|
|
||||||
mutex_enter(&trx_sys->mutex);
|
mutex_enter(&trx_sys->mutex);
|
||||||
|
@ -174,7 +174,7 @@ void rec_get_timeval(const rec_t* rec, ulint nfield, timeval& out)
|
|||||||
field = rec_get_nth_field_old(
|
field = rec_get_nth_field_old(
|
||||||
rec, nfield, &len);
|
rec, nfield, &len);
|
||||||
|
|
||||||
ut_ad(len == sizeof(ullong));
|
ut_ad(len == sizeof(uint64_t));
|
||||||
|
|
||||||
out.tv_sec = mach_read_from_4(field);
|
out.tv_sec = mach_read_from_4(field);
|
||||||
out.tv_usec = mach_read_from_4(field + 4);
|
out.tv_usec = mach_read_from_4(field + 4);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user