diff options
author | unknown <heikki@hundin.mysql.fi> | 2005-06-22 20:07:31 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2005-06-22 20:07:31 +0300 |
commit | 95f98dedacec3740d8b9217e14b452d16e3ee16c (patch) | |
tree | 6acdbfd0b1f2fea76664f252f80a3ef87471af56 /innobase | |
parent | 4e8f01d40605ba43c13babc9a176caeae16f9697 (diff) | |
parent | ce8b40dde274eff8a7224635940d97f74ec0d1df (diff) | |
download | mariadb-git-95f98dedacec3740d8b9217e14b452d16e3ee16c.tar.gz |
Merge heikki@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/heikki/mysql-5.0
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/btr/btr0cur.c | 4 | ||||
-rw-r--r-- | innobase/buf/buf0buf.c | 4 | ||||
-rw-r--r-- | innobase/include/rem0rec.h | 2 | ||||
-rw-r--r-- | innobase/include/rem0rec.ic | 2 | ||||
-rw-r--r-- | innobase/os/os0file.c | 5 | ||||
-rw-r--r-- | innobase/page/page0page.c | 4 | ||||
-rw-r--r-- | innobase/row/row0ins.c | 12 | ||||
-rw-r--r-- | innobase/trx/trx0rec.c | 8 |
8 files changed, 12 insertions, 29 deletions
diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c index 98d90ecf18a..4ae27f007d6 100644 --- a/innobase/btr/btr0cur.c +++ b/innobase/btr/btr0cur.c @@ -2847,9 +2847,7 @@ btr_estimate_number_of_different_key_vals( n_diff = mem_alloc((n_cols + 1) * sizeof(ib_longlong)); - for (j = 0; j <= n_cols; j++) { - n_diff[j] = 0; - } + memset(n_diff, 0, (n_cols + 1) * sizeof(ib_longlong)); /* We sample some pages in the index to get an estimate */ diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c index 78189617aab..fe4498e6f10 100644 --- a/innobase/buf/buf0buf.c +++ b/innobase/buf/buf0buf.c @@ -2101,10 +2101,6 @@ buf_print(void) n_found = 0; - for (i = 0 ; i < size; i++) { - counts[i] = 0; - } - for (i = 0; i < size; i++) { frame = buf_pool_get_nth_block(buf_pool, i)->frame; diff --git a/innobase/include/rem0rec.h b/innobase/include/rem0rec.h index c068f4cb73c..1d15b8d1c77 100644 --- a/innobase/include/rem0rec.h +++ b/innobase/include/rem0rec.h @@ -282,7 +282,7 @@ rec_get_nth_field_size( ulint n); /* in: index of the field */ /**************************************************************** The following function is used to get a pointer to the nth -data field in an old-style record. */ +data field in a record. */ UNIV_INLINE byte* rec_get_nth_field( diff --git a/innobase/include/rem0rec.ic b/innobase/include/rem0rec.ic index d60fb3b9eda..e2dceb6bae5 100644 --- a/innobase/include/rem0rec.ic +++ b/innobase/include/rem0rec.ic @@ -886,7 +886,7 @@ rec_offs_make_valid( /**************************************************************** The following function is used to get a pointer to the nth -data field in an old-style record. */ +data field in a record. */ UNIV_INLINE byte* rec_get_nth_field( diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 8102f24f25a..c68f5738798 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -1672,7 +1672,6 @@ os_file_set_size( ibool ret; byte* buf; byte* buf2; - ulint i; ut_a(size == (size & 0xFFFFFFFF)); @@ -1685,9 +1684,7 @@ os_file_set_size( buf = ut_align(buf2, UNIV_PAGE_SIZE); /* Write buffer full of zeros */ - for (i = 0; i < UNIV_PAGE_SIZE * 512; i++) { - buf[i] = '\0'; - } + memset(buf, 0, UNIV_PAGE_SIZE * 512); offset = 0; low = (ib_longlong)size + (((ib_longlong)size_high) << 32); diff --git a/innobase/page/page0page.c b/innobase/page/page0page.c index 9c957ac8554..1fe7f1d9356 100644 --- a/innobase/page/page0page.c +++ b/innobase/page/page0page.c @@ -1755,9 +1755,7 @@ page_validate( records in the page record heap do not overlap */ buf = mem_heap_alloc(heap, UNIV_PAGE_SIZE); - for (i = 0; i < UNIV_PAGE_SIZE; i++) { - buf[i] = 0; - } + memset(buf, 0, UNIV_PAGE_SIZE); /* Check first that the record heap and the directory do not overlap. */ diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index 776094d0de5..bce775c25d6 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -533,9 +533,11 @@ row_ins_cascade_calc_update_vec( ufield->new_val.data = mem_heap_alloc(heap, min_size); - pad_start = ufield->new_val.data + pad_start = + ((char*) ufield->new_val.data) + ufield->new_val.len; - pad_end = ufield->new_val.data + pad_end = + ((char*) ufield->new_val.data) + min_size; ufield->new_val.len = min_size; ut_memcpy(ufield->new_val.data, @@ -1578,7 +1580,6 @@ row_ins_scan_sec_index_for_duplicate( ulint err = DB_SUCCESS; ibool moved; mtr_t mtr; - trx_t* trx; mem_heap_t* heap = NULL; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; @@ -1618,11 +1619,6 @@ row_ins_scan_sec_index_for_duplicate( goto next_rec; } - /* Try to place a lock on the index record */ - - trx = thr_get_trx(thr); - ut_ad(trx); - offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); 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); } |