summaryrefslogtreecommitdiff
path: root/storage/xtradb/page
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2016-08-03 13:40:53 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2016-08-03 13:46:01 +0300
commit35c9c856347fe340f3d564f33e76bb6f9ea05e76 (patch)
treed20d2cbc720b45ba64cbed8b180644e477ed3c0b /storage/xtradb/page
parent6b71a6d2d935d997f43a658d45d1e518620cf0ad (diff)
downloadmariadb-git-35c9c856347fe340f3d564f33e76bb6f9ea05e76.tar.gz
MDEV-10217: innodb.innodb_bug59641 fails sporadically in buildbot: InnoDB: Failing assertion: current_rec != insert_rec in file page0cur.c line 1052
Added record printout when current_rec == insert_rec with lengths for debug builds.
Diffstat (limited to 'storage/xtradb/page')
-rw-r--r--storage/xtradb/page/page0cur.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/storage/xtradb/page/page0cur.c b/storage/xtradb/page/page0cur.c
index a722f5b188d..4b6a1551ada 100644
--- a/storage/xtradb/page/page0cur.c
+++ b/storage/xtradb/page/page0cur.c
@@ -1048,6 +1048,26 @@ use_heap:
insert_rec = rec_copy(insert_buf, rec, offsets);
rec_offs_make_valid(insert_rec, index, offsets);
+ /* This is because assertion below is debug assertion */
+#ifdef UNIV_DEBUG
+ if (UNIV_UNLIKELY(current_rec == insert_rec)) {
+ ulint extra_len, data_len;
+ extra_len = rec_offs_extra_size(offsets);
+ data_len = rec_offs_data_size(offsets);
+
+ fprintf(stderr, "InnoDB: Error: current_rec == insert_rec "
+ " extra_len %lu data_len %lu insert_buf %p rec %p\n",
+ extra_len, data_len, insert_buf, rec);
+ fprintf(stderr, "InnoDB; Physical record: \n");
+ rec_print(stderr, rec, index);
+ fprintf(stderr, "InnoDB: Inserted record: \n");
+ rec_print(stderr, insert_rec, index);
+ fprintf(stderr, "InnoDB: Current record: \n");
+ rec_print(stderr, current_rec, index);
+ ut_a(current_rec != insert_rec);
+ }
+#endif /* UNIV_DEBUG */
+
/* 4. Insert the record in the linked list of records */
ut_ad(current_rec != insert_rec);