summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-10-20 16:24:28 +0300
committerunknown <monty@mysql.com>2004-10-20 16:24:28 +0300
commit560d7bcdd0c80551b7844b3669be503113c91ddf (patch)
treef3f6e81dac72352598beb9c21f116d2ef7f9c3ef /innobase
parent7bdb93aa7e8b2c4d003f68635af8e1cbe757f6e6 (diff)
parentec8779e95a46b3dfff492196ad004cb2716df3c3 (diff)
downloadmariadb-git-560d7bcdd0c80551b7844b3669be503113c91ddf.tar.gz
Merge with 4.0
BitKeeper/etc/logging_ok: auto-union Docs/Support/texi2html: Auto merged innobase/trx/trx0rec.c: Auto merged libmysql/libmysql.c: Auto merged myisam/myisampack.c: Auto merged mysql-test/t/innodb-lock.test: Auto merged mysys/thr_lock.c: Auto merged sql/ha_innodb.cc: Auto merged sql/lock.cc: Auto merged sql/sql_acl.cc: Keep old code
Diffstat (limited to 'innobase')
-rw-r--r--innobase/trx/trx0rec.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/innobase/trx/trx0rec.c b/innobase/trx/trx0rec.c
index ba93c6de2bd..fe429d1cc62 100644
--- a/innobase/trx/trx0rec.c
+++ b/innobase/trx/trx0rec.c
@@ -1258,7 +1258,7 @@ trx_undo_prev_version_build(
ibool dummy_extern;
byte* buf;
ulint err;
- ulint i;
+
#ifdef UNIV_SYNC_DEBUG
ut_ad(rw_lock_own(&(purge_sys->latch), RW_LOCK_SHARED));
#endif /* UNIV_SYNC_DEBUG */
@@ -1363,7 +1363,18 @@ trx_undo_prev_version_build(
}
if (row_upd_changes_field_size_or_external(rec, index, update)) {
-
+ ulint* ext_vect;
+ ulint n_ext_vect;
+
+ /* We have to set the appropriate extern storage bits in the
+ old version of the record: the extern bits in rec for those
+ fields that update does NOT update, as well as the the bits for
+ those fields that update updates to become externally stored
+ fields. Store the info to ext_vect: */
+
+ ext_vect = mem_alloc(sizeof(ulint) * rec_get_n_fields(rec));
+ n_ext_vect = btr_push_update_extern_fields(ext_vect, rec,
+ update);
entry = row_rec_to_index_entry(ROW_COPY_DATA, index, rec,
heap);
row_upd_index_replace_new_col_vals(entry, index, update, heap);
@@ -1371,6 +1382,11 @@ trx_undo_prev_version_build(
buf = mem_heap_alloc(heap, rec_get_converted_size(entry));
*old_vers = rec_convert_dtuple_to_rec(buf, entry);
+
+ /* Now set the extern bits in the old version of the record */
+ rec_set_field_extern_bits(*old_vers, ext_vect, n_ext_vect,
+ NULL);
+ mem_free(ext_vect);
} else {
buf = mem_heap_alloc(heap, rec_get_size(rec));
@@ -1379,15 +1395,5 @@ trx_undo_prev_version_build(
row_upd_rec_in_place(*old_vers, update);
}
- for (i = 0; i < upd_get_n_fields(update); i++) {
-
- if (upd_get_nth_field(update, i)->extern_storage) {
-
- rec_set_nth_field_extern_bit(*old_vers,
- upd_get_nth_field(update, i)->field_no,
- TRUE, NULL);
- }
- }
-
return(DB_SUCCESS);
}