diff options
author | heikki@hundin.mysql.fi <> | 2002-08-02 23:16:19 +0300 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2002-08-02 23:16:19 +0300 |
commit | 7b4869d9a414e00321d2ea7cb024ae3e4d167aad (patch) | |
tree | 79d62af7e6f5f927672de74cbb469640fe4ff3bd /innobase/include | |
parent | 4f56ed82ec00370a394fe826587bf81bcd0421f9 (diff) | |
download | mariadb-git-7b4869d9a414e00321d2ea7cb024ae3e4d167aad.tar.gz |
Many files:
Merge InnoDB-3.23.52c
ha_innobase.cc:
Test the ref length sanity also in the production version
Diffstat (limited to 'innobase/include')
-rw-r--r-- | innobase/include/btr0btr.h | 8 | ||||
-rw-r--r-- | innobase/include/buf0buf.ic | 37 | ||||
-rw-r--r-- | innobase/include/dyn0dyn.h | 8 | ||||
-rw-r--r-- | innobase/include/log0log.ic | 2 | ||||
-rw-r--r-- | innobase/include/log0recv.h | 3 |
5 files changed, 32 insertions, 26 deletions
diff --git a/innobase/include/btr0btr.h b/innobase/include/btr0btr.h index 1b48eaeb4b2..f66ad3639d4 100644 --- a/innobase/include/btr0btr.h +++ b/innobase/include/btr0btr.h @@ -313,14 +313,6 @@ btr_discard_page( btr_cur_t* cursor, /* in: cursor on the page to discard: not on the root page */ mtr_t* mtr); /* in: mtr */ -/************************************************************************ -Declares the latching order level for the page latch in the debug version. */ - -void -btr_declare_page_latch( -/*===================*/ - page_t* page, /* in: page */ - ibool leaf); /* in: TRUE if a leaf */ /******************************************************************** Parses the redo log record for setting an index record as the predefined minimum record. */ diff --git a/innobase/include/buf0buf.ic b/innobase/include/buf0buf.ic index 50248a7b2da..51e2541e04d 100644 --- a/innobase/include/buf0buf.ic +++ b/innobase/include/buf0buf.ic @@ -211,8 +211,15 @@ buf_block_align( block = buf_pool_get_nth_block(buf_pool, ((ulint)(ptr - frame_zero)) >> UNIV_PAGE_SIZE_SHIFT); - ut_a(block >= buf_pool->blocks); - ut_a(block < buf_pool->blocks + buf_pool->max_size); + if (block < buf_pool->blocks + || block >= buf_pool->blocks + buf_pool->max_size) { + + fprintf(stderr, +"InnoDB: Error: trying to access a stray pointer %lx\n" +"InnoDB: buf pool start is at %lx, number of pages %lu\n", (ulint)ptr, + (ulint)frame_zero, buf_pool->max_size); + ut_a(0); + } return(block); } @@ -238,8 +245,15 @@ buf_block_align_low( block = buf_pool_get_nth_block(buf_pool, ((ulint)(ptr - frame_zero)) >> UNIV_PAGE_SIZE_SHIFT); - ut_a(block >= buf_pool->blocks); - ut_a(block < buf_pool->blocks + buf_pool->max_size); + if (block < buf_pool->blocks + || block >= buf_pool->blocks + buf_pool->max_size) { + + fprintf(stderr, +"InnoDB: Error: trying to access a stray pointer %lx\n" +"InnoDB: buf pool start is at %lx, number of pages %lu\n", (ulint)ptr, + (ulint)frame_zero, buf_pool->max_size); + ut_a(0); + } return(block); } @@ -259,10 +273,17 @@ buf_frame_align( frame = ut_align_down(ptr, UNIV_PAGE_SIZE); - ut_a((ulint)frame - >= (ulint)(buf_pool_get_nth_block(buf_pool, 0)->frame)); - ut_a((ulint)frame <= (ulint)(buf_pool_get_nth_block(buf_pool, - buf_pool->max_size - 1)->frame)); + if (((ulint)frame + < (ulint)(buf_pool->frame_zero)) + || ((ulint)frame > (ulint)(buf_pool_get_nth_block(buf_pool, + buf_pool->max_size - 1)->frame))) { + fprintf(stderr, +"InnoDB: Error: trying to access a stray pointer %lx\n" +"InnoDB: buf pool start is at %lx, number of pages %lu\n", (ulint)ptr, + (ulint)(buf_pool->frame_zero), buf_pool->max_size); + ut_a(0); + } + return(frame); } diff --git a/innobase/include/dyn0dyn.h b/innobase/include/dyn0dyn.h index 49a1a4c6129..cca302994c1 100644 --- a/innobase/include/dyn0dyn.h +++ b/innobase/include/dyn0dyn.h @@ -125,14 +125,6 @@ dyn_block_get_data( /*===============*/ /* out: pointer to data */ dyn_block_t* block); /* in: dyn array block */ -/************************************************************************ -Gets the next block in a dyn array. */ - -dyn_block_t* -dyn_block_get_next( -/*===============*/ - /* out: pointer to next, NULL if end of list */ - dyn_block_t* block); /* in: dyn array block */ /************************************************************ Pushes n bytes to a dyn array. */ UNIV_INLINE diff --git a/innobase/include/log0log.ic b/innobase/include/log0log.ic index 9167246fe45..8de239df0bd 100644 --- a/innobase/include/log0log.ic +++ b/innobase/include/log0log.ic @@ -207,7 +207,7 @@ log_block_calc_checksum( for (i = 0; i < OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE; i++) { sum = sum & 0x7FFFFFFF; - sum += ((ulint)(*(block + i))) << sh; + sum += (((ulint)(*(block + i))) << sh) + (ulint)(*(block + i)); sh++; if (sh > 24) { sh = 0; diff --git a/innobase/include/log0recv.h b/innobase/include/log0recv.h index 65f80deee93..baa2ba50c7d 100644 --- a/innobase/include/log0recv.h +++ b/innobase/include/log0recv.h @@ -316,7 +316,8 @@ struct recv_sys_struct{ ibool found_corrupt_log; /* this is set to TRUE if we during log scan find a corrupt log block, or a corrupt - log record */ + log record, or there is a log parsing + buffer overflow */ log_group_t* archive_group; /* in archive recovery: the log group whose archive is read */ |