summaryrefslogtreecommitdiff
path: root/mysys/ma_dyncol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/ma_dyncol.c')
-rw-r--r--mysys/ma_dyncol.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mysys/ma_dyncol.c b/mysys/ma_dyncol.c
index db7d199bcd2..4d281b98d1c 100644
--- a/mysys/ma_dyncol.c
+++ b/mysys/ma_dyncol.c
@@ -566,7 +566,7 @@ static my_bool type_and_offset_read_named(DYNAMIC_COLUMN_TYPE *type,
return 1;
}
*type= (val & 0xf) + 1;
- *offset= val >> 4;
+ *offset= (size_t) (val >> 4);
return (*offset >= lim);
}
@@ -2803,7 +2803,7 @@ dynamic_column_update_copy(DYNAMIC_COLUMN *str, PLAN *plan,
else if (offs < first_offset)
goto err;
- offs+= plan[i].ddelta;
+ offs+= (size_t) plan[i].ddelta;
{
DYNAMIC_COLUMN_VALUE val;
val.type= tp; // only the type used in the header
@@ -2969,7 +2969,7 @@ dynamic_column_update_move_left(DYNAMIC_COLUMN *str, PLAN *plan,
return ER_DYNCOL_FORMAT;
}
- offs+= plan[i].ddelta;
+ offs+= (size_t) plan[i].ddelta;
int2store(write, nm);
/* write rest of data at write + COLUMN_NUMBER_SIZE */
type_and_offset_store_num(write, new_offset_size, tp, offs);
@@ -3023,9 +3023,9 @@ dynamic_column_update_move_left(DYNAMIC_COLUMN *str, PLAN *plan,
memmove((header_base + new_header_size +
plan[i].mv_offset + plan[i].ddelta),
header_base + header_size + plan[i].mv_offset,
- plan[i].mv_length);
+ (size_t) plan[i].mv_length);
}
- str->length+= plan[i].mv_length;
+ str->length+= (size_t) plan[i].mv_length;
/* new data adding */
if (i < add_column_count)
@@ -3514,8 +3514,8 @@ dynamic_column_update_many_fmt(DYNAMIC_COLUMN *str,
Check if it is only "increasing" or only "decreasing" plan for (header
and data separately).
*/
- new_header.data_size= header.data_size + data_delta;
- new_header.nmpool_size= new_header.nmpool_size + name_delta;
+ new_header.data_size= (size_t) (header.data_size + data_delta);
+ new_header.nmpool_size= (size_t) (new_header.nmpool_size + name_delta);
DBUG_ASSERT(new_header.format != dyncol_fmt_num ||
new_header.nmpool_size == 0);
if ((new_header.offset_size=