summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2014-03-11 16:53:24 +0200
committerMichael Widenius <monty@mariadb.org>2014-03-11 16:53:24 +0200
commit800a278fd09c353a02f02c9c32074d3807861967 (patch)
treece83df84936053a694474dc1632e7869073a503a /storage/maria
parent599eb0dc8632da402af65f600777cfaf3c3d513e (diff)
downloadmariadb-git-800a278fd09c353a02f02c9c32074d3807861967.tar.gz
Fixed a compiler failure and removed some warnings in windows
extra/replace.c: Removed compiler warning sql/unireg.cc: Removed compiler warning storage/maria/ma_blockrec.c: Removed compiler warning storage/maria/ma_dynrec.c: Fixed compiler failure storage/maria/ma_unique.c: Removed compiler warning storage/myisam/mi_check.c: Removed compiler warning storage/myisam/mi_checksum.c: Removed compiler warning
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ma_blockrec.c12
-rw-r--r--storage/maria/ma_dynrec.c3
-rw-r--r--storage/maria/ma_unique.c6
3 files changed, 11 insertions, 10 deletions
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index 8c17da42df5..6a7baa5b4f7 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -3248,8 +3248,9 @@ static my_bool write_block_record(MARIA_HA *info,
blob_length-= (blob_length % FULL_PAGE_SIZE(block_size));
if (blob_length)
{
- memcpy(&log_array_pos->str, record + tmp_column->offset + length,
- sizeof(uchar*));
+ memcpy((void*) &log_array_pos->str,
+ record + tmp_column->offset + length,
+ sizeof(uchar*));
log_array_pos->length= blob_length;
log_entry_length+= blob_length;
log_array_pos++;
@@ -5344,6 +5345,7 @@ int _ma_scan_restore_block_record(MARIA_HA *info,
info Maria handler
record Store found here
record_pos Value stored in info->cur_row.next_pos after last call
+ This is offset inside the current pagebuff
skip_deleted
NOTES
@@ -5381,7 +5383,7 @@ restart_record_read:
/* Ensure that scan.dir and record_pos are in sync */
DBUG_ASSERT(info->scan.dir == dir_entry_pos(info->scan.page_buff,
share->block_size,
- record_pos));
+ (uint) record_pos));
/* Search for a valid directory entry (not 0) */
while (!(offset= uint2korr(info->scan.dir)))
@@ -5977,12 +5979,12 @@ static size_t fill_update_undo_parts(MARIA_HA *info, const uchar *oldrec,
{
uint size_length= column->length - portable_sizeof_char_ptr;
old_column_length= _ma_calc_blob_length(size_length, old_column_pos);
- memcpy(&old_column_pos, oldrec + column->offset + size_length,
+ memcpy((void*) &old_column_pos, oldrec + column->offset + size_length,
sizeof(old_column_pos));
if (!new_column_is_empty)
{
new_column_length= _ma_calc_blob_length(size_length, new_column_pos);
- memcpy(&new_column_pos, newrec + column->offset + size_length,
+ memcpy((void*) &new_column_pos, newrec + column->offset + size_length,
sizeof(old_column_pos));
}
break;
diff --git a/storage/maria/ma_dynrec.c b/storage/maria/ma_dynrec.c
index b58ba9de1b8..c47da42b555 100644
--- a/storage/maria/ma_dynrec.c
+++ b/storage/maria/ma_dynrec.c
@@ -1594,9 +1594,8 @@ my_bool _ma_cmp_dynamic_record(register MARIA_HA *info,
MARIA_BLOCK_INFO block_info;
my_bool error= 1;
size_t buffer_length;
- LINT_INIT(buffer_length);
-
DBUG_ENTER("_ma_cmp_dynamic_record");
+ LINT_INIT(buffer_length);
if (info->opt_flag & WRITE_CACHE_USED)
{
diff --git a/storage/maria/ma_unique.c b/storage/maria/ma_unique.c
index ef7aec86834..fd823f7b52d 100644
--- a/storage/maria/ma_unique.c
+++ b/storage/maria/ma_unique.c
@@ -135,7 +135,7 @@ ha_checksum _ma_unique_hash(MARIA_UNIQUEDEF *def, const uchar *record)
else if (keyseg->flag & HA_BLOB_PART)
{
uint tmp_length= _ma_calc_blob_length(keyseg->bit_start,pos);
- memcpy(&pos,pos+keyseg->bit_start,sizeof(char*));
+ memcpy((void*) &pos,pos+keyseg->bit_start,sizeof(char*));
if (!length || length > tmp_length)
length=tmp_length; /* The whole blob */
}
@@ -231,8 +231,8 @@ my_bool _ma_unique_comp(MARIA_UNIQUEDEF *def, const uchar *a, const uchar *b,
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
- memcpy(&pos_a, pos_a+keyseg->bit_start, sizeof(char*));
- memcpy(&pos_b, pos_b+keyseg->bit_start, sizeof(char*));
+ memcpy((void*) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
+ memcpy((void*) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)