diff options
author | unknown <marko@hundin.mysql.fi> | 2005-06-22 12:36:24 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-06-22 12:36:24 +0300 |
commit | 369da8f53903634549b818a706f61e40dd31b7d4 (patch) | |
tree | 905c3919d739c5a93185d374ae6d7f2fca3052d9 /innobase/trx | |
parent | 283d42e52a4e06c7487b44247b592d6ffa537cd7 (diff) | |
download | mariadb-git-369da8f53903634549b818a706f61e40dd31b7d4.tar.gz |
InnoDB: Replace for loops with memset() where possible.
innobase/btr/btr0cur.c:
Replace for loop with memset()
innobase/buf/buf0buf.c:
buf_print(): Remove for loop for initializing counts[].
Similar to index_ids[], the elements of this array will
be initialized when they are allocated, i.e., counts[n_found++] = 1.
innobase/os/os0file.c:
Replace for loop with memset()
innobase/page/page0page.c:
Replace for loop with memset()
innobase/trx/trx0rec.c:
Replace for loop with memset()
Diffstat (limited to 'innobase/trx')
-rw-r--r-- | innobase/trx/trx0rec.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/innobase/trx/trx0rec.c b/innobase/trx/trx0rec.c index 3f3cfd3b000..3b7171e6038 100644 --- a/innobase/trx/trx0rec.c +++ b/innobase/trx/trx0rec.c @@ -941,13 +941,11 @@ trx_undo_erase_page_end( mtr_t* mtr) /* in: mtr */ { ulint first_free; - ulint i; - + first_free = mach_read_from_2(undo_page + TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_FREE); - for (i = first_free; i < UNIV_PAGE_SIZE - FIL_PAGE_DATA_END; i++) { - undo_page[i] = 0xFF; - } + memset(undo_page + first_free, 0xff, + (UNIV_PAGE_SIZE - FIL_PAGE_DATA_END) - first_free); mlog_write_initial_log_record(undo_page, MLOG_UNDO_ERASE_END, mtr); } |