List:Commits« Previous MessageNext Message »
From:marko.makela Date:November 2 2010 7:29am
Subject:bzr commit into mysql-5.1-innodb branch (marko.makela:3648) Bug#57799
View as plain text  
#At file:///home/marko/innobase/dev/mysql2a/5.1-innodb/ based on revid:marko.makela@stripped87pfiufe4axu

 3648 Marko Mäkelä	2010-11-02
      Bug#57799 READ UNCOMMITTED access failure of off-page DYNAMIC or COMPRESSED
      columns again
      
      This is follow-up to Bug #54358. Not all occurrences of the bug were fixed.
      We need to check all calls to btr_copy_externally_stored_field_prefix_low()
      and do the right thing when the pointer to the off-page column is null
      (full of zero bytes).
      
      It turns out that only the call to btr_copy_externally_stored_field_prefix()
      in row_sel_sec_rec_is_for_blob() needs to be changed.
      
      For fetching complete off-page columns rather than prefixes, the function
      btr_rec_copy_externally_stored_field() already checks if the pointer
      is null (all-zero).  Two of its callers (row_merge_copy_blobs() and
      row_sel_fetch_columns()) are never executed as READ COMMITTED and can
      rightfully assert that the fetch succeeded.  The third caller,
      row_sel_store_mysql_rec(), already does the right thing.
      
      The calls in row_upd_ext_fetch() and trx_undo_page_fetch_ext() must
      expect that the off-page column exists. Update and rollback are
      locking operations, never READ UNCOMMITTED.

    modified:
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/row/row0sel.c
=== modified file 'storage/innodb_plugin/ChangeLog'
--- a/storage/innodb_plugin/ChangeLog	revid:marko.makela@oracle.com-20101102072805-gvnw87pfiufe4axu
+++ b/storage/innodb_plugin/ChangeLog	revid:marko.makela@stripped102072848-uufe0c5xztb51p0m
@@ -1,3 +1,9 @@
+2010-11-02	The InnoDB Team
+
+	* row/row0sel.c:
+	Fix Bug#57799 READ UNCOMMITTED access failure of off-page
+	DYNAMIC or COMPRESSED columns again
+
 2010-10-24	The InnoDB Team
 
 	* row/row0mysql.c

=== modified file 'storage/innodb_plugin/row/row0sel.c'
--- a/storage/innodb_plugin/row/row0sel.c	revid:marko.makela@strippedaxu
+++ b/storage/innodb_plugin/row/row0sel.c	revid:marko.makela@stripped
@@ -106,6 +106,18 @@ row_sel_sec_rec_is_for_blob(
 	ulint	len;
 	byte	buf[DICT_MAX_INDEX_COL_LEN];
 
+	ut_a(clust_len >= BTR_EXTERN_FIELD_REF_SIZE);
+
+	if (UNIV_UNLIKELY
+	    (!memcmp(clust_field + clust_len - BTR_EXTERN_FIELD_REF_SIZE,
+		     field_ref_zero, BTR_EXTERN_FIELD_REF_SIZE))) {
+		/* The externally stored field was not written yet.
+		This record should only be seen by
+		recv_recovery_rollback_active() or any
+		TRX_ISO_READ_UNCOMMITTED transactions. */
+		return(FALSE);
+	}
+
 	len = btr_copy_externally_stored_field_prefix(buf, sizeof buf,
 						      zip_size,
 						      clust_field, clust_len);

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20101102072848-uufe0c5xztb51p0m.bundle
Thread
bzr commit into mysql-5.1-innodb branch (marko.makela:3648) Bug#57799marko.makela2 Nov