summaryrefslogtreecommitdiff
path: root/storage/xtradb/row/row0sel.cc
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2014-10-24 22:26:31 +0300
committerJan Lindström <jplindst@mariadb.org>2014-10-24 22:26:31 +0300
commit3486135bb5c9e21fd678821dee35484a81351cfb (patch)
treec09b49a45c06dde85e456f00223e5ee1a8bd45f9 /storage/xtradb/row/row0sel.cc
parentca0bdc4d5c196f5282d2f803023c032e151432d9 (diff)
downloadmariadb-git-3486135bb5c9e21fd678821dee35484a81351cfb.tar.gz
MDEV-6928: Add trx pointer to struct mtr_t
Merge Facebook commit 25295d003cb0c17aa8fb756523923c77250b3294 authored by Steaphan Greene from https://github.com/facebook/mysql-5.6 This adds a pointer to the trx to each mtr. This allows the trx to be accessed in parts of the code where it was otherwise not available. This is needed later.
Diffstat (limited to 'storage/xtradb/row/row0sel.cc')
-rw-r--r--storage/xtradb/row/row0sel.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc
index fd50e2240b5..75adc341d2e 100644
--- a/storage/xtradb/row/row0sel.cc
+++ b/storage/xtradb/row/row0sel.cc
@@ -133,7 +133,8 @@ row_sel_sec_rec_is_for_blob(
len = btr_copy_externally_stored_field_prefix(buf, prefix_len,
zip_size,
- clust_field, clust_len);
+ clust_field, clust_len,
+ NULL);
if (UNIV_UNLIKELY(len == 0)) {
/* The BLOB was being deleted as the server crashed.
@@ -452,7 +453,7 @@ row_sel_fetch_columns(
data = btr_rec_copy_externally_stored_field(
rec, offsets,
dict_table_zip_size(index->table),
- field_no, &len, heap);
+ field_no, &len, heap, NULL);
/* data == NULL means that the
externally stored field was not
@@ -1400,7 +1401,7 @@ table_loop:
/* Open a cursor to index, or restore an open cursor position */
- mtr_start(&mtr);
+ mtr_start_trx(&mtr, thr_get_trx(thr));
if (consistent_read && plan->unique_search && !plan->pcur_is_open
&& !plan->must_get_clust
@@ -1441,7 +1442,7 @@ table_loop:
plan_reset_cursor(plan);
mtr_commit(&mtr);
- mtr_start(&mtr);
+ mtr_start_trx(&mtr, thr_get_trx(thr));
}
if (search_latch_locked) {
@@ -2815,7 +2816,7 @@ row_sel_store_mysql_field_func(
data = btr_rec_copy_externally_stored_field(
rec, offsets,
dict_table_zip_size(prebuilt->table),
- field_no, &len, heap);
+ field_no, &len, heap, NULL);
if (UNIV_UNLIKELY(!data)) {
/* The externally stored field was not written
@@ -3882,7 +3883,7 @@ row_search_for_mysql(
}
}
- mtr_start(&mtr);
+ mtr_start_trx(&mtr, trx);
/*-------------------------------------------------------------*/
/* PHASE 2: Try fast adaptive hash index search if possible */
@@ -5020,7 +5021,7 @@ next_rec:
mtr_commit(&mtr);
mtr_has_extra_clust_latch = FALSE;
- mtr_start(&mtr);
+ mtr_start_trx(&mtr, trx);
if (sel_restore_position_for_mysql(&same_user_rec,
BTR_SEARCH_LEAF,
pcur, moves_up, &mtr)) {
@@ -5085,7 +5086,7 @@ lock_table_wait:
/* It was a lock wait, and it ended */
thr->lock_state = QUE_THR_LOCK_NOLOCK;
- mtr_start(&mtr);
+ mtr_start_trx(&mtr, trx);
/* Table lock waited, go try to obtain table lock
again */