summaryrefslogtreecommitdiff
path: root/innobase/page
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-08-08 15:24:47 +0300
committerunknown <monty@hundin.mysql.fi>2002-08-08 15:24:47 +0300
commit267b80834ad524c0d72976bc71e5b5bc9815ea1a (patch)
treee7f4a2013ed3d66e640f6574e62cb7e534a5d77f /innobase/page
parentca1875f54033c5ea067ec3ec07b00375de6975d7 (diff)
parent40d3c3901b0427eba76119730f46784f946990b3 (diff)
downloadmariadb-git-267b80834ad524c0d72976bc71e5b5bc9815ea1a.tar.gz
merge with 3.23.52
BitKeeper/etc/logging_ok: auto-union configure.in: Auto merged Docs/manual.texi: Auto merged include/my_pthread.h: Auto merged include/mysql_com.h: Auto merged include/mysql_version.h.in: Auto merged innobase/btr/btr0cur.c: Auto merged innobase/btr/btr0sea.c: Auto merged innobase/buf/buf0buf.c: Auto merged innobase/buf/buf0lru.c: Auto merged innobase/configure.in: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/fil/fil0fil.c: Auto merged innobase/fsp/fsp0fsp.c: Auto merged innobase/include/buf0buf.ic: Auto merged innobase/include/dyn0dyn.ic: Auto merged innobase/include/ha0ha.ic: Auto merged innobase/include/sync0rw.ic: Auto merged innobase/include/univ.i: Auto merged innobase/lock/lock0lock.c: Auto merged innobase/log/log0log.c: Auto merged innobase/mem/mem0dbg.c: Auto merged innobase/os/os0file.c: Auto merged innobase/os/os0thread.c: Auto merged innobase/page/page0cur.c: Auto merged innobase/srv/srv0srv.c: Auto merged innobase/sync/sync0arr.c: Auto merged innobase/sync/sync0rw.c: Auto merged innobase/sync/sync0sync.c: Auto merged innobase/trx/trx0trx.c: Auto merged myisam/mi_create.c: Auto merged sql/ha_innodb.h: Auto merged sql/lex.h: Auto merged sql/log.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_insert.cc: Auto merged strings/Makefile.am: Auto merged support-files/mysql.server.sh: Auto merged include/my_base.h: merge with 3.23.52 (use local file) include/sslopt-usage.h: merge with 3.23.52 (use local file) myisam/mi_search.c: merge with 3.23.52 (use local file) myisam/mi_write.c: merge with 3.23.52 (use local file) mysql-test/r/group_by.result: merge with 3.23.52 (Need to be fixed before push) mysys/my_pthread.c: merge with 3.23.52 (use local file) sql/gen_lex_hash.cc: merge with 3.23.52 (use local file) sql/ha_innodb.cc: Total hand-merge with 3.23.52 sql/sql_yacc.yy: merge with 3.23.52 (use local file) support-files/mysql.spec.sh: merge with 3.23.52 (use local file)
Diffstat (limited to 'innobase/page')
-rw-r--r--innobase/page/page0cur.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/innobase/page/page0cur.c b/innobase/page/page0cur.c
index 0eaf96f7e51..2909573b14b 100644
--- a/innobase/page/page0cur.c
+++ b/innobase/page/page0cur.c
@@ -13,6 +13,7 @@ Created 10/4/1994 Heikki Tuuri
#include "rem0cmp.h"
#include "mtr0log.h"
+#include "log0recv.h"
ulint page_cur_short_succ = 0;
@@ -481,6 +482,9 @@ page_cur_insert_rec_write_log(
/* Write the mismatch index */
log_ptr += mach_write_compressed(log_ptr, i);
+
+ ut_a(i < UNIV_PAGE_SIZE);
+ ut_a(extra_size < UNIV_PAGE_SIZE);
}
/* Write to the log the inserted index record end segment which
@@ -533,6 +537,13 @@ page_cur_parse_insert_rec(
}
offset = mach_read_from_2(ptr);
+
+ if (offset >= UNIV_PAGE_SIZE) {
+
+ recv_sys->found_corrupt_log = TRUE;
+
+ return(NULL);
+ }
ptr += 2;
}
@@ -546,6 +557,12 @@ page_cur_parse_insert_rec(
extra_info_yes = end_seg_len & 0x1;
end_seg_len = end_seg_len / 2;
+
+ if (end_seg_len >= UNIV_PAGE_SIZE) {
+ recv_sys->found_corrupt_log = TRUE;
+
+ return(NULL);
+ }
if (extra_info_yes) {
/* Read the info bits */
@@ -565,12 +582,16 @@ page_cur_parse_insert_rec(
return(NULL);
}
+ ut_a(origin_offset < UNIV_PAGE_SIZE);
+
ptr = mach_parse_compressed(ptr, end_ptr, &mismatch_index);
if (ptr == NULL) {
return(NULL);
}
+
+ ut_a(mismatch_index < UNIV_PAGE_SIZE);
}
if (end_ptr < ptr + end_seg_len) {
@@ -607,7 +628,6 @@ page_cur_parse_insert_rec(
/* Build the inserted record to buf */
ut_a(mismatch_index < UNIV_PAGE_SIZE);
- ut_a(end_seg_len < UNIV_PAGE_SIZE);
ut_memcpy(buf, rec_get_start(cursor_rec), mismatch_index);
ut_memcpy(buf + mismatch_index, ptr, end_seg_len);
@@ -1010,6 +1030,8 @@ page_cur_parse_delete_rec(
offset = mach_read_from_2(ptr);
ptr += 2;
+ ut_a(offset <= UNIV_PAGE_SIZE);
+
if (page) {
page_cur_position(page + offset, &cursor);