~stewart/drizzle/update-innobase-1.0.11

Viewing all changes in revision 2209.

  • Committer: Stewart Smith
  • Author(s): Marko Mäkelä
  • Date: 2010-11-11 02:23:17 UTC
  • Revision ID: stewart@flamingspork.com-20101111022317-9zez0ie9syowvqdj
Merge Revision revid:marko.makela@oracle.com-20100630093149-wmc37t128gic933v from MySQL InnoDB

Original revid:marko.makela@oracle.com-20100630093149-wmc37t128gic933v

Original Authors: Marko Mäkelä <marko.makela@oracle.com>
Original commit message:
Correct some comments that were added in the fix of Bug #54358
(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);

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: