summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2017-11-01 08:08:36 +0300
committerAleksey Midenkov <midenok@gmail.com>2017-11-13 19:11:04 +0300
commit4a662df94506ee43a9c3408a5c47cf6519d5f5bf (patch)
tree563171567e176d6d30b9571e9ed389d83fcd82ef
parentba80eeb5848cd663ed9969ed04962657e3d6c13e (diff)
downloadmariadb-git-4a662df94506ee43a9c3408a5c47cf6519d5f5bf.tar.gz
IB: do not use long and ullong types [#306]
-rw-r--r--storage/innobase/dict/dict0load.cc8
-rw-r--r--storage/innobase/handler/i_s.cc8
-rw-r--r--storage/innobase/include/univ.i2
-rw-r--r--storage/innobase/row/row0ins.cc2
-rw-r--r--storage/innobase/vers/vers0vtq.cc2
5 files changed, 10 insertions, 12 deletions
diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc
index eeffb6bb498..59d9c4eb686 100644
--- a/storage/innobase/dict/dict0load.cc
+++ b/storage/innobase/dict/dict0load.cc
@@ -867,8 +867,8 @@ vtq_record_t& out /*!< out: field values */
field = rec_get_nth_field_old(
rec, (nfld = DICT_FLD__SYS_VTQ__BEGIN_TS), &len);
- if (len != sizeof(ullong))
- return dict_print_error(heap, nfld, len, sizeof(ullong));
+ if (len != sizeof(uint64_t))
+ return dict_print_error(heap, nfld, len, sizeof(uint64_t));
out.begin_ts.tv_sec = mach_read_from_4(field);
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(
rec, (nfld = DICT_FLD__SYS_VTQ__COMMIT_TS), &len);
- if (len != sizeof(ullong))
- return dict_print_error(heap, nfld, len, sizeof(ullong));
+ if (len != sizeof(uint64_t))
+ return dict_print_error(heap, nfld, len, sizeof(uint64_t));
out.commit_ts.tv_sec = mach_read_from_4(field);
out.commit_ts.tv_usec = mach_read_from_4(field + 4);
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index 837d4e8c01e..52b9ddb9b36 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -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.
@return 0 on success */
int
-field_store_ullong(
+field_store_uint64_t(
/*==============*/
Field* field, /*!< in/out: target field for storage */
- ullong n) /*!< in: value to store */
+ uint64_t n) /*!< in: value to store */
{
int ret;
@@ -9734,8 +9734,8 @@ i_s_dict_fill_vtq(
iso_level = i_s_isolation_name(vtq.iso_level);
- OK(field_store_ullong(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_TRX_ID], vtq.trx_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_COMMIT_TS], vtq.commit_ts, thd));
OK(field_store_string(fields[SYS_VTQ_ISO_LEVEL], iso_level));
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
index 79cb3c2dc9f..80c0b5476b0 100644
--- a/storage/innobase/include/univ.i
+++ b/storage/innobase/include/univ.i
@@ -454,8 +454,6 @@ typedef uint32_t ib_uint32_t;
#define UINT64PF "%" UINT64scan
#define IB_ID_FMT UINT64PF
-typedef ib_uint64_t ullong;
-
/** Log sequence number (also used for redo log byte arithmetics) */
typedef ib_uint64_t lsn_t;
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 6268c8cb4bc..3ac7eba3d37 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -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));
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;
mutex_enter(&trx_sys->mutex);
diff --git a/storage/innobase/vers/vers0vtq.cc b/storage/innobase/vers/vers0vtq.cc
index 62bcce4c656..343fd0e5516 100644
--- a/storage/innobase/vers/vers0vtq.cc
+++ b/storage/innobase/vers/vers0vtq.cc
@@ -174,7 +174,7 @@ void rec_get_timeval(const rec_t* rec, ulint nfield, timeval& out)
field = rec_get_nth_field_old(
rec, nfield, &len);
- ut_ad(len == sizeof(ullong));
+ ut_ad(len == sizeof(uint64_t));
out.tv_sec = mach_read_from_4(field);
out.tv_usec = mach_read_from_4(field + 4);