summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-01-04 19:32:29 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-01-04 19:35:53 +0200
commit218dbf68b876868034c8b2406e8d7ef67a2ac5ba (patch)
tree34cdcf24be999117b57a52499bc1fac1647930eb
parent0f253d3e644d3027face26371eb1bb59e8280728 (diff)
downloadmariadb-git-218dbf68b876868034c8b2406e8d7ef67a2ac5ba.tar.gz
MDEV-14058 InnoDB Assertion failure !leaf on rem0rec.cc line 566 on test innodb_gis.rtree_recovery
The function rtr_update_mbr_field_in_place() is generating MLOG_REC_UPDATE_IN_PLACE or MLOG_COMP_REC_UPDATE_IN_PLACE records on non-leaf pages, even though MLOG_WRITE_STRING would perfectly suffice for updating a fixed-length data field. btr_cur_parse_update_in_place(): If flags==7, the record may be from rtr_update_mbr_field_in_place(), and we must check if the page is a leaf page. Otherwise, assume that it is. btr_cur_update_in_place(): Assert that the page is a leaf page.
-rw-r--r--mysql-test/suite/innodb_gis/disabled.def1
-rw-r--r--mysql-test/suite/innodb_gis/r/rtree_recovery.result4
-rw-r--r--storage/innobase/btr/btr0cur.cc11
3 files changed, 11 insertions, 5 deletions
diff --git a/mysql-test/suite/innodb_gis/disabled.def b/mysql-test/suite/innodb_gis/disabled.def
index 4ffc0607a90..26918297653 100644
--- a/mysql-test/suite/innodb_gis/disabled.def
+++ b/mysql-test/suite/innodb_gis/disabled.def
@@ -14,7 +14,6 @@ gis_split_inf : MDEV-14057 InnoDB GIS tests fail
row_format : MDEV-14057 InnoDB GIS tests fail
rtree_estimate : MDEV-14057 InnoDB GIS tests fail
rtree_multi_pk : MDEV-14057 InnoDB GIS tests fail
-rtree_recovery : MDEV-14058 InnoDB Assertion failure !leaf on rem0rec.cc line 566 on test innodb_gis.rtree_recovery
tree_search : MDEV-14057 InnoDB GIS tests fail
rtree_concurrent_srch: MDEV-14059 InnoDB assertion failure offset >= ((38U + 36 + 2 * 10) + 5) at page0page.h line 318
point_big : MDEV-14057 InnoDB GIS tests fail
diff --git a/mysql-test/suite/innodb_gis/r/rtree_recovery.result b/mysql-test/suite/innodb_gis/r/rtree_recovery.result
index 3572e3e0bed..4fee60caf85 100644
--- a/mysql-test/suite/innodb_gis/r/rtree_recovery.result
+++ b/mysql-test/suite/innodb_gis/r/rtree_recovery.result
@@ -1,4 +1,3 @@
-# restart
create table t1 (c1 int, c2 geometry not null, spatial index (c2))engine=innodb;
create procedure insert_t1(IN total int)
begin
@@ -33,10 +32,9 @@ Table Op Msg_type Msg_text
test.t1 check status OK
select count(*) from t1;
count(*)
-18
+17
select c1, ST_astext(c2) from t1;
c1 ST_astext(c2)
-350 POINT(10350 10350)
351 POINT(10351 10351)
352 POINT(10352 10352)
353 POINT(10353 10353)
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 614e7f690b7..6acab881288 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -3485,7 +3485,15 @@ btr_cur_parse_update_in_place(
/* We do not need to reserve search latch, as the page is only
being recovered, and there cannot be a hash index to it. */
- offsets = rec_get_offsets(rec, index, NULL, true,
+ /* The function rtr_update_mbr_field_in_place() is generating
+ these records on node pointer pages; therefore we have to
+ check if this is a leaf page. */
+
+ offsets = rec_get_offsets(rec, index, NULL,
+ flags != (BTR_NO_UNDO_LOG_FLAG
+ | BTR_NO_LOCKING_FLAG
+ | BTR_KEEP_SYS_FLAG)
+ || page_is_leaf(page),
ULINT_UNDEFINED, &heap);
if (!(flags & BTR_KEEP_SYS_FLAG)) {
@@ -3620,6 +3628,7 @@ btr_cur_update_in_place(
roll_ptr_t roll_ptr = 0;
ulint was_delete_marked;
+ ut_ad(page_is_leaf(cursor->page_cur.block->frame));
rec = btr_cur_get_rec(cursor);
index = cursor->index;
ut_ad(rec_offs_validate(rec, index, offsets));