diff options
author | unknown <marko@hundin.mysql.fi> | 2005-03-01 13:54:48 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-03-01 13:54:48 +0200 |
commit | 45c942a51105af9f96b486450050ac637c3518d9 (patch) | |
tree | e9beb9a3927aeb8ca7ad47994c4a5841947c0589 /innobase/rem | |
parent | 10c65140f23055edf12b54eb43726cbcd89be9a7 (diff) | |
download | mariadb-git-45c942a51105af9f96b486450050ac637c3518d9.tar.gz |
InnoDB: Zero fill newly created pages and deleted records to
remove old junk and to improve compression ratio.
InnoDB: Make implicit type conversions explicit. (Bug #8826)
innobase/btr/btr0cur.c:
Add "offsets" parameter to page_cur_delete_rec() calls
btr_cur_optimistic_delete(): Simplify the logic with a flag variable
btr_cur_pessimistic_delete(): Compute "offsets" earlier
innobase/include/page0cur.h:
page_cur_delete_rec(): Add parameter "offsets"
innobase/include/page0page.h:
page_mem_free(): Replace parameter "index" with "offsets"
innobase/include/page0page.ic:
page_mem_free(): Replace parameter "index" with "offsets".
Clear the data bytes of the freed record.
(The "extra" bytes will be needed by free space management.)
innobase/include/rem0rec.h:
Remove unnecessary function rec_get_size()
innobase/log/log0recv.c:
Remove function rec_apply_log_recs_for_backup()
unless #ifdef UNIV_HOTBACKUP.
innobase/page/page0cur.c:
Add parameter "offsets" to page_cur_delete_rec().
innobase/page/page0page.c:
page_create(): Zero fill the data area.
page_delete_rec_list_start(): Add parameter "offsets"
to page_cur_delete_rec().
innobase/rem/rem0rec.c:
Remove unnecessary function rec_get_size().
Fix compiler warnings about implicit type conversions. (Bug #8826)
innobase/srv/srv0srv.c:
Fix compiler warnings about implicit type conversions. (Bug #8826)
innobase/sync/sync0sync.c:
Fix compiler warnings about implicit type conversions. (Bug #8826)
Diffstat (limited to 'innobase/rem')
-rw-r--r-- | innobase/rem/rem0rec.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/innobase/rem/rem0rec.c b/innobase/rem/rem0rec.c index 30f98f457ea..904f91b8945 100644 --- a/innobase/rem/rem0rec.c +++ b/innobase/rem/rem0rec.c @@ -620,7 +620,7 @@ rec_set_nth_field_extern_bit_new( mlog_write_ulint(lens + 1, len, MLOG_1BYTE, mtr); } else { - lens[1] = len; + lens[1] = (byte) len; } return; } @@ -658,29 +658,6 @@ rec_set_field_extern_bits( } } -/************************************************************** -Returns the total size of a physical record. */ - -ulint -rec_get_size( -/*=========*/ - /* out: size */ - rec_t* rec, /* in: physical record */ - dict_index_t* index) /* in: record descriptor */ -{ - mem_heap_t* heap = NULL; - ulint offsets_[100 + REC_OFFS_HEADER_SIZE] - = { 100, }; - ulint* offsets = rec_get_offsets(rec, index, offsets_, - ULINT_UNDEFINED, &heap); - ulint size = rec_offs_size(offsets); - - if (heap) { - mem_heap_free(heap); - } - return(size); -} - /*************************************************************** Sets an old-style record field to SQL null. The physical size of the field is not changed. */ @@ -935,13 +912,13 @@ init: || dtype_get_mtype(type) == DATA_BLOB); if (len < 128 || (dtype_get_len(type) < 256 && dtype_get_mtype(type) != DATA_BLOB)) { - *lens-- = len; + *lens-- = (byte) len; } else { /* the extern bits will be set later */ ut_ad(len < 16384); - *lens-- = len >> 8 | 0x80; - *lens-- = len; + *lens-- = (byte) (len >> 8) | 0x80; + *lens-- = (byte) len; } } copy: |