diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2012-08-16 17:45:39 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2012-08-16 17:45:39 +0300 |
commit | e288e649c5157765f192bde3790e5a863807a112 (patch) | |
tree | 08fc410b0c93f92f45213c8e8f079c1347d91ecf | |
parent | 6d7f6baa22c8e98fc0651c118e715cb27727a6e9 (diff) | |
download | mariadb-git-e288e649c5157765f192bde3790e5a863807a112.tar.gz |
Bug#12595091 POSSIBLY INVALID ASSERTION IN BTR_CUR_PESSIMISTIC_UPDATE()
Facebook got a case where the page compresses really well so that
btr_cur_optimistic_update() returns DB_UNDERFLOW, but when a record
gets updated, the compression rate radically changes so that
btr_cur_insert_if_possible() can not insert in place despite
reorganizing/recompressing the page, leading to the assertion failing.
rb:1220 approved by Sunny Bains
-rw-r--r-- | storage/innodb_plugin/ChangeLog | 6 | ||||
-rw-r--r-- | storage/innodb_plugin/btr/btr0cur.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index cbdefc84e19..576a67a0106 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,5 +1,11 @@ 2012-08-16 The InnoDB Team + * btr/btr0cur.c: + Fix Bug#12595091 POSSIBLY INVALID ASSERTION IN + BTR_CUR_PESSIMISTIC_UPDATE() + +2012-08-16 The InnoDB Team + * btr/btr0btr.c, btr/btr0cur.c: Fix Bug#12845774 OPTIMISTIC INSERT/UPDATE USES WRONG HEURISTICS FOR COMPRESSED PAGE SIZE diff --git a/storage/innodb_plugin/btr/btr0cur.c b/storage/innodb_plugin/btr/btr0cur.c index 91cbba54308..8fb4366d894 100644 --- a/storage/innodb_plugin/btr/btr0cur.c +++ b/storage/innodb_plugin/btr/btr0cur.c @@ -2326,7 +2326,12 @@ make_external: err = DB_SUCCESS; goto return_after_reservations; } else { - ut_a(optim_err != DB_UNDERFLOW); + /* If the page is compressed and it initially + compresses very well, and there is a subsequent insert + of a badly-compressing record, it is possible for + btr_cur_optimistic_update() to return DB_UNDERFLOW and + btr_cur_insert_if_possible() to return FALSE. */ + ut_a(page_zip || optim_err != DB_UNDERFLOW); /* Out of space: reset the free bits. */ if (!dict_index_is_clust(index) |