summaryrefslogtreecommitdiff
path: root/storage/innobase/page/page0cur.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/page/page0cur.cc')
-rw-r--r--storage/innobase/page/page0cur.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc
index 607abb596c4..9df2d2c0d29 100644
--- a/storage/innobase/page/page0cur.cc
+++ b/storage/innobase/page/page0cur.cc
@@ -1404,20 +1404,20 @@ use_heap:
if (UNIV_UNLIKELY(!last_insert))
{
no_direction:
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_NO_DIRECTION;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_NO_DIRECTION);
memset(n, 0, 2);
}
else if (block->frame + last_insert == cur->rec &&
(*dir & ((1U << 3) - 1)) != PAGE_LEFT)
{
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_RIGHT;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_RIGHT);
inc_dir:
mach_write_to_2(n, mach_read_from_2(n) + 1);
}
else if (next_rec == block->frame + last_insert &&
(*dir & ((1U << 3) - 1)) != PAGE_RIGHT)
{
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_LEFT;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_LEFT);
goto inc_dir;
}
else
@@ -1866,7 +1866,7 @@ too_small:
static_assert(UNIV_ZIP_SIZE_SHIFT_MAX == 14, "compatibility");
if (next_rec)
{
- next_rec+= free_rec;
+ next_rec+= static_cast<int16_t>(free_rec);
ut_ad(int{PAGE_NEW_SUPREMUM_END + REC_N_NEW_EXTRA_BYTES} <= next_rec);
ut_ad(static_cast<uint16_t>(next_rec) < srv_page_size);
}
@@ -2480,20 +2480,20 @@ corrupted:
if (UNIV_UNLIKELY(!last_insert))
{
no_direction:
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_NO_DIRECTION;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_NO_DIRECTION);
memset(n_dir, 0, 2);
}
else if (block.frame + last_insert == prev_rec &&
(*dir & ((1U << 3) - 1)) != PAGE_LEFT)
{
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_RIGHT;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_RIGHT);
inc_dir:
mach_write_to_2(n_dir, mach_read_from_2(n_dir) + 1);
}
else if (next_rec == block.frame + last_insert &&
(*dir & ((1U << 3) - 1)) != PAGE_RIGHT)
{
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_LEFT;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_LEFT);
goto inc_dir;
}
else
@@ -2570,7 +2570,7 @@ corrupted:
uint16_t n= static_cast<uint16_t>(PAGE_NEW_INFIMUM + prev);
rec_t *prev_rec= block.frame + n;
- n+= mach_read_from_2(prev_rec - REC_NEXT);
+ n= static_cast<uint16_t>(n + mach_read_from_2(prev_rec - REC_NEXT));
if (!prev);
else if (UNIV_UNLIKELY(heap_bot + REC_N_NEW_EXTRA_BYTES > prev_rec ||
prev_rec > heap_top))
@@ -2589,7 +2589,7 @@ corrupted:
for (ulint ns= PAGE_DIR_SLOT_MAX_N_OWNED;
!(n_owned= rec_get_n_owned_new(owner_rec)); )
{
- n+= mach_read_from_2(owner_rec - REC_NEXT);
+ n= static_cast<uint16_t>(n + mach_read_from_2(owner_rec - REC_NEXT));
owner_rec= block.frame + n;
if (n == PAGE_NEW_SUPREMUM);
else if (UNIV_UNLIKELY(heap_bot + REC_N_NEW_EXTRA_BYTES > owner_rec ||
@@ -2708,20 +2708,20 @@ corrupted:
if (UNIV_UNLIKELY(!last_insert))
{
no_direction:
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_NO_DIRECTION;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_NO_DIRECTION);
memset(n_dir, 0, 2);
}
else if (block.frame + last_insert == prev_rec &&
(*dir & ((1U << 3) - 1)) != PAGE_LEFT)
{
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_RIGHT;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_RIGHT);
inc_dir:
mach_write_to_2(n_dir, mach_read_from_2(n_dir) + 1);
}
else if (next_rec == block.frame + last_insert &&
(*dir & ((1U << 3) - 1)) != PAGE_RIGHT)
{
- *dir= (*dir & ~((1U << 3) - 1)) | PAGE_LEFT;
+ *dir= static_cast<byte>((*dir & ~((1U << 3) - 1)) | PAGE_LEFT);
goto inc_dir;
}
else
@@ -2864,7 +2864,7 @@ corrupted:
rec_t *prev_rec= block.frame + n;
if (UNIV_UNLIKELY(prev_rec > slot))
goto corrupted;
- n+= mach_read_from_2(prev_rec - REC_NEXT);
+ n= static_cast<uint16_t>(n + mach_read_from_2(prev_rec - REC_NEXT));
rec_t *rec= block.frame + n;
if (UNIV_UNLIKELY(n < PAGE_NEW_SUPREMUM_END + REC_N_NEW_EXTRA_BYTES ||
slot < rec))
@@ -2873,7 +2873,7 @@ corrupted:
if (UNIV_UNLIKELY(n < PAGE_NEW_SUPREMUM_END + extra_size ||
slot < rec + data_size))
goto corrupted;
- n+= mach_read_from_2(rec - REC_NEXT);
+ n= static_cast<uint16_t>(n + mach_read_from_2(rec - REC_NEXT));
rec_t *next= block.frame + n;
if (n == PAGE_NEW_SUPREMUM);
else if (UNIV_UNLIKELY(n < PAGE_NEW_SUPREMUM_END + REC_N_NEW_EXTRA_BYTES ||
@@ -2885,7 +2885,7 @@ corrupted:
ulint slot_owned;
for (ulint i= n_recs; !(slot_owned= rec_get_n_owned_new(s)); )
{
- n+= mach_read_from_2(s - REC_NEXT);
+ n= static_cast<uint16_t>(n + mach_read_from_2(s - REC_NEXT));
s= block.frame + n;
if (n == PAGE_NEW_SUPREMUM);
else if (UNIV_UNLIKELY(n < PAGE_NEW_SUPREMUM_END + REC_N_NEW_EXTRA_BYTES ||