Bug #61208 Possibly invalid assertion in btr_cur_pessimistic_update() inside btr0cur.c
Submitted: 17 May 2011 21:41 Modified: 18 Oct 2012 23:09
Reporter: Nizameddin Ordulu Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S3 (Non-critical)
Version:5.1.52 OS:Any
Assigned to: Marko Mäkelä CPU Architecture:Any
Tags: compression, innodb, UPDATE

[17 May 2011 21:41] Nizameddin Ordulu
Description:
This is another obscure bug that happens very rarely. 

Inside file btr0cur.c around line 2294 there is the following assertion:

 ut_a(optim_err != DB_UNDERFLOW);

I think what this assumes is that if btr_cur_optimistic_update() around line 2133 returns DB_UNDERFLOW (meaning that updating the page will make it small) then btr_cur_insert_if_possible() arround line 2270 must absolutely succeed. This is not the case in one of the servers I am testing right now. I have a case where the page compresses really well so 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, thus the assertion fails. The fix is just to remove the assertion.

How to repeat:
read code.

Suggested fix:
remove assertion ut_a(optim_err != DB_UNDERFLOW)
[23 May 2011 12:08] Marko Mäkelä
Another possibility would be to append || page_zip to the assertion. We might also change it to a debug assertion (ut_ad()).
[9 Jun 2011 7:46] Nizameddin Ordulu
Marko, can you please look at bug 61456 too? I'm trying to make quicklz compression work with mysql and it's very important for me. Thanks for your help.
[18 Oct 2012 23:08] John Russell
I associated this bug with the changelog entry for bug#14554000 and several other compression-related bugs with similar effects, rather than creating a new changelog item.