summaryrefslogtreecommitdiff
path: root/storage/xtradb
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-27 22:26:58 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-27 22:26:58 +0100
commitcb67dcb6184535349ca4ff3d7c64eba9c63a0688 (patch)
tree10d38ccf7fe60d5ea5c866d37292833b77dfcdae /storage/xtradb
parent44002a34e680c79c01df879b540458c2885e97e8 (diff)
parentfaec0e2f4aecfc902e354ae7af991779d6bfc4a7 (diff)
downloadmariadb-git-cb67dcb6184535349ca4ff3d7c64eba9c63a0688.tar.gz
mysql-5.5.37 selective merge
Diffstat (limited to 'storage/xtradb')
-rw-r--r--storage/xtradb/handler/handler0alter.cc2
-rw-r--r--storage/xtradb/row/row0upd.c37
2 files changed, 8 insertions, 31 deletions
diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc
index 308c90ccd3a..0079b9d2d97 100644
--- a/storage/xtradb/handler/handler0alter.cc
+++ b/storage/xtradb/handler/handler0alter.cc
@@ -111,13 +111,13 @@ innobase_col_to_mysql(
/* These column types should never be shipped to MySQL. */
ut_ad(0);
- case DATA_FIXBINARY:
case DATA_FLOAT:
case DATA_DOUBLE:
case DATA_DECIMAL:
/* Above are the valid column types for MySQL data. */
ut_ad(flen == len);
/* fall through */
+ case DATA_FIXBINARY:
case DATA_CHAR:
/* We may have flen > len when there is a shorter
prefix on a CHAR column. */
diff --git a/storage/xtradb/row/row0upd.c b/storage/xtradb/row/row0upd.c
index d1b6d098882..faf80b75eed 100644
--- a/storage/xtradb/row/row0upd.c
+++ b/storage/xtradb/row/row0upd.c
@@ -1896,7 +1896,13 @@ err_exit:
rec, offsets, entry, node->update);
if (change_ownership) {
- btr_pcur_store_position(pcur, mtr);
+ /* The blobs are disowned here, expecting the
+ insert down below to inherit them. But if the
+ insert fails, then this disown will be undone
+ when the operation is rolled back. */
+ btr_cur_disown_inherited_fields(
+ btr_cur_get_page_zip(btr_cur),
+ rec, index, offsets, node->update, mtr);
}
}
@@ -1922,35 +1928,6 @@ err_exit:
? UPD_NODE_INSERT_BLOB
: UPD_NODE_INSERT_CLUSTERED;
- if (err == DB_SUCCESS && change_ownership) {
- /* Mark the non-updated fields disowned by the old record. */
-
- /* NOTE: this transaction has an x-lock on the record
- and therefore other transactions cannot modify the
- record when we have no latch on the page. In addition,
- we assume that other query threads of the same
- transaction do not modify the record in the meantime.
- Therefore we can assert that the restoration of the
- cursor succeeds. */
-
- mtr_start(mtr);
-
- if (!btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, mtr)) {
- ut_error;
- }
-
- rec = btr_cur_get_rec(btr_cur);
- offsets = rec_get_offsets(rec, index, offsets,
- ULINT_UNDEFINED, &heap);
- ut_ad(page_rec_is_user_rec(rec));
-
- btr_cur_disown_inherited_fields(
- btr_cur_get_page_zip(btr_cur),
- rec, index, offsets, node->update, mtr);
-
- mtr_commit(mtr);
- }
-
mem_heap_free(heap);
return(err);