summaryrefslogtreecommitdiff
path: root/storage/innobase/page/page0cur.c
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-04-11 20:44:52 -0700
committerIgor Babaev <igor@askmonty.org>2012-04-11 20:44:52 -0700
commit9e74665a2d91e299d1b9c5c2695855426aad78eb (patch)
tree9c865c2e18fcb814ef80e96965debf53a0923e6a /storage/innobase/page/page0cur.c
parent1c0a89afcc1581187e8ee84abbd445da2bfa45d9 (diff)
parent85a025f30c5196c22c5b1d7960912fe9b3f0d6c0 (diff)
downloadmariadb-git-9e74665a2d91e299d1b9c5c2695855426aad78eb.tar.gz
Merge 5.5 -> 5.5-mwl248.
Diffstat (limited to 'storage/innobase/page/page0cur.c')
-rw-r--r--storage/innobase/page/page0cur.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/storage/innobase/page/page0cur.c b/storage/innobase/page/page0cur.c
index 936762b986a..d49b121afab 100644
--- a/storage/innobase/page/page0cur.c
+++ b/storage/innobase/page/page0cur.c
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -11,8 +11,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
-this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
+this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
*****************************************************************************/
@@ -900,7 +900,7 @@ page_cur_parse_insert_rec(
ut_print_buf(stderr, ptr2, 300);
putc('\n', stderr);
- buf_page_print(page, 0);
+ buf_page_print(page, 0, 0);
ut_error;
}
@@ -1180,14 +1180,15 @@ page_cur_insert_rec_zip_reorg(
/* Before trying to reorganize the page,
store the number of preceding records on the page. */
pos = page_rec_get_n_recs_before(rec);
+ ut_ad(pos > 0);
if (page_zip_reorganize(block, index, mtr)) {
/* The page was reorganized: Find rec by seeking to pos,
and update *current_rec. */
- rec = page + PAGE_NEW_INFIMUM;
-
- while (--pos) {
- rec = page + rec_get_next_offs(rec, TRUE);
+ if (pos > 1) {
+ rec = page_rec_get_nth(page, pos - 1);
+ } else {
+ rec = page + PAGE_NEW_INFIMUM;
}
*current_rec = rec;
@@ -1283,6 +1284,12 @@ page_cur_insert_rec_zip(
insert_rec = page_cur_insert_rec_zip_reorg(
current_rec, block, index, insert_rec,
page, page_zip, mtr);
+#ifdef UNIV_DEBUG
+ if (insert_rec) {
+ rec_offs_make_valid(
+ insert_rec, index, offsets);
+ }
+#endif /* UNIV_DEBUG */
}
return(insert_rec);