summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-12-06 01:16:28 +0200
committerunknown <monty@hundin.mysql.fi>2001-12-06 01:16:28 +0200
commitb5cfb7ac01dd00715060470805859a51d6f2caf5 (patch)
tree72b6ce45de206772ff694d62b41d9fc5a16edbe8 /innobase
parentff8c7348648b2a2e1ce14d8332c065a38a43ca0c (diff)
parent6f8f45e9592aa7f2ca48168d51e1624cce158797 (diff)
downloadmariadb-git-b5cfb7ac01dd00715060470805859a51d6f2caf5.tar.gz
merge with 3.23.47
Docs/manual.texi: Auto merged Build-tools/Do-compile: Auto merged innobase/include/buf0buf.ic: Auto merged myisam/mi_locking.c: Auto merged mysql-test/t/join_outer.test: Auto merged mysys/my_init.c: Auto merged scripts/mysql_config.sh: Auto merged mysql-test/t/myisam.test: Auto merged sql/ha_innobase.h: Auto merged sql/handler.h: Auto merged configure.in: merge mysql-test/r/innodb.result: merge mysql-test/r/join_outer.result: merge mysql-test/r/myisam.result: merge mysql-test/t/innodb.test: merge mysys/mf_iocache2.c: Skip changes in 3.23 sql/sql_select.cc: merge
Diffstat (limited to 'innobase')
-rw-r--r--innobase/include/buf0buf.ic10
-rw-r--r--innobase/include/mtr0log.ic7
-rw-r--r--innobase/log/log0recv.c4
3 files changed, 18 insertions, 3 deletions
diff --git a/innobase/include/buf0buf.ic b/innobase/include/buf0buf.ic
index 49f6dc59503..52bee0eb282 100644
--- a/innobase/include/buf0buf.ic
+++ b/innobase/include/buf0buf.ic
@@ -211,6 +211,9 @@ buf_block_align(
block = buf_pool_get_nth_block(buf_pool, (ptr - frame_zero)
>> UNIV_PAGE_SIZE_SHIFT);
+ ut_a(block >= buf_pool->blocks);
+ ut_a(block < buf_pool->blocks + buf_pool->max_size);
+
return(block);
}
@@ -235,6 +238,9 @@ buf_block_align_low(
block = buf_pool_get_nth_block(buf_pool, (ptr - frame_zero)
>> UNIV_PAGE_SIZE_SHIFT);
+ ut_a(block >= buf_pool->blocks);
+ ut_a(block < buf_pool->blocks + buf_pool->max_size);
+
return(block);
}
@@ -253,9 +259,9 @@ buf_frame_align(
frame = ut_align_down(ptr, UNIV_PAGE_SIZE);
- ut_ad((ulint)frame
+ ut_a((ulint)frame
>= (ulint)(buf_pool_get_nth_block(buf_pool, 0)->frame));
- ut_ad((ulint)frame <= (ulint)(buf_pool_get_nth_block(buf_pool,
+ ut_a((ulint)frame <= (ulint)(buf_pool_get_nth_block(buf_pool,
buf_pool->max_size - 1)->frame));
return(frame);
}
diff --git a/innobase/include/mtr0log.ic b/innobase/include/mtr0log.ic
index c2150660794..0598f1a9536 100644
--- a/innobase/include/mtr0log.ic
+++ b/innobase/include/mtr0log.ic
@@ -163,6 +163,13 @@ mlog_write_initial_log_record_fast(
space = buf_block_get_space(block);
offset = buf_block_get_page_no(block);
+ if (space != 0 || offset > 0x8FFFFFFF) {
+ fprintf(stderr,
+ "InnoDB: error: buffer page pointer %lx has nonsensical space id %lu\n"
+ "InnoDB: or page no %lu\n", (ulint)ptr, space, offset);
+ ut_a(0);
+ }
+
mach_write_to_1(log_ptr, type);
log_ptr++;
log_ptr += mach_write_compressed(log_ptr, space);
diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c
index 999429cbfcd..1734cfadfff 100644
--- a/innobase/log/log0recv.c
+++ b/innobase/log/log0recv.c
@@ -1316,7 +1316,9 @@ recv_parse_log_rec(
new_ptr = mlog_parse_initial_log_record(ptr, end_ptr, type, space,
page_no);
- if (!new_ptr) {
+ /* Check that space id and page_no are sensible */
+
+ if (!new_ptr || *space != 0 || *page_no > 0x8FFFFFFF) {
return(0);
}