• Marko Mäkelä's avatar
    Correct some comments that were added in the fix of Bug #54358 · 04c859bc
    Marko Mäkelä authored
    (READ UNCOMMITTED access failure of off-page DYNAMIC or COMPRESSED columns).
    
    Records that lack incompletely written externally stored columns may
    be accessed by READ UNCOMMITTED transaction even without involving a
    crash during an INSERT or UPDATE operation. I verified this as follows.
    
    (1) added a delay after the mini-transaction for writing the clustered
    index 'stub' record was committed (patch attached)
    (2) started mysqld in gdb, setting breakpoints to the where the
    assertions about READ UNCOMMITTED were added in the bug fix
    (3) invoked ibtest3 --create-options=key_block_size=2
    to create BLOBs in a COMPRESSED table
    (4) invoked the following:
    yes 'set transaction isolation level read uncommitted;
    checksum table blobt3;select sleep(1);'|mysql -uroot test
    (5) noted that one of the breakpoints was triggered
    (return(NULL) in btr_rec_copy_externally_stored_field())
    
    === modified file 'storage/innodb_plugin/row/row0ins.c'
    --- storage/innodb_plugin/row/row0ins.c	2010-06-30 08:17:25 +0000
    +++ storage/innodb_plugin/row/row0ins.c	2010-06-30 08:17:25 +0000
    @@ -2120,6 +2120,7 @@ function_exit:
     		rec_t*	rec;
     		ulint*	offsets;
     		mtr_start(&mtr);
    +		os_thread_sleep(5000000);
     
     		btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE,
     					    BTR_MODIFY_TREE, &cursor, 0,
    
    === modified file 'storage/innodb_plugin/row/row0upd.c'
    --- storage/innodb_plugin/row/row0upd.c	2010-06-30 08:11:55 +0000
    +++ storage/innodb_plugin/row/row0upd.c	2010-06-30 08:11:55 +0000
    @@ -1763,6 +1763,7 @@ row_upd_clust_rec(
     		rec_offs_init(offsets_);
     
     		mtr_start(mtr);
    +		os_thread_sleep(5000000);
     
     		ut_a(btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr));
     		rec = btr_cur_get_rec(btr_cur);
    
    04c859bc
btr0cur.c 135 KB