Commit a5ddcaab authored by Marko Mäkelä's avatar Marko Mäkelä

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
parent 0a51eb41
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:
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment