summaryrefslogtreecommitdiff
path: root/storage/innobase/trx
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2011-06-09 13:31:15 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2011-06-09 13:31:15 +0300
commit6d20340c724c9ede8f7f135e5d853180163d5961 (patch)
tree3983098bdc89c69d7d278d47685025ef0ba2f089 /storage/innobase/trx
parent55015ea0b0c1885b24baa3daa9fdabc880265108 (diff)
downloadmariadb-git-6d20340c724c9ede8f7f135e5d853180163d5961.tar.gz
BLOB instrumentation for Bug#12612184 Race condition in row_upd_clust_rec()
If UNIV_DEBUG or UNIV_BLOB_LIGHT_DEBUG is enabled, add !rec_offs_any_null_extern() assertions, ensuring that records do not contain null pointers to externally stored columns in inappropriate places. btr_cur_optimistic_update(): Assert !rec_offs_any_null_extern(). Incomplete records must never be updated or deleted. This assertion will cover also the pessimistic route. row_build(): Assert !rec_offs_any_null_extern(). Search tuples must never be built from incomplete index entries. row_rec_to_index_entry(): Assert !rec_offs_any_null_extern() unless ROW_COPY_DATA is requested. ROW_COPY_DATA is used for multi-versioning, and therefore it might be valid to copy the most recent (uncommitted) version while it contains a null pointer to off-page columns. row_vers_build_for_consistent_read(), row_vers_build_for_semi_consistent_read(): Assert !rec_offs_any_null_extern() on all versions except the most recent one. trx_undo_prev_version_build(): Assert !rec_offs_any_null_extern() on the previous version. rb:682 approved by Sunny Bains
Diffstat (limited to 'storage/innobase/trx')
-rw-r--r--storage/innobase/trx/trx0rec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/storage/innobase/trx/trx0rec.c b/storage/innobase/trx/trx0rec.c
index 38ad53fcfb0..730ac6a6f60 100644
--- a/storage/innobase/trx/trx0rec.c
+++ b/storage/innobase/trx/trx0rec.c
@@ -1397,6 +1397,10 @@ trx_undo_prev_version_build(
return(DB_ERROR);
}
+# if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
+ ut_a(!rec_offs_any_null_extern(rec, offsets));
+# endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
+
if (row_upd_changes_field_size_or_external(index, offsets, update)) {
ulint* ext_vect;
ulint n_ext_vect;