diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-09-19 11:53:59 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-09-19 11:53:59 +0300 |
commit | b337a0682943fa7e055380b7859762acf7fb588c (patch) | |
tree | ddacfb5746b63aaa45308cab1a769864f9da0252 | |
parent | dab6f56098f4bd24dcf1c8a9d9c65a81712f4381 (diff) | |
download | mariadb-git-b337a0682943fa7e055380b7859762acf7fb588c.tar.gz |
Revert d9bc5e03d788b958ce8c76e157239953db60adb2 from Oracle (in XtraDB)
-rw-r--r-- | storage/xtradb/api/api0api.cc | 17 | ||||
-rw-r--r-- | storage/xtradb/include/row0mysql.h | 5 | ||||
-rw-r--r-- | storage/xtradb/row/row0sel.cc | 16 |
3 files changed, 5 insertions, 33 deletions
diff --git a/storage/xtradb/api/api0api.cc b/storage/xtradb/api/api0api.cc index 711714861ab..95962abc867 100644 --- a/storage/xtradb/api/api0api.cc +++ b/storage/xtradb/api/api0api.cc @@ -1991,11 +1991,9 @@ ib_cursor_read_row( rec = btr_pcur_get_rec(pcur); - if (!rec_get_deleted_flag(rec, page_format)) { - if (prebuilt->innodb_api && - prebuilt->innodb_api_rec != NULL) { - rec =prebuilt->innodb_api_rec; - } + if (prebuilt->innodb_api_rec && + prebuilt->innodb_api_rec != rec) { + rec = prebuilt->innodb_api_rec; } if (!rec_get_deleted_flag(rec, page_format)) { @@ -2032,9 +2030,6 @@ ib_cursor_position( buf = static_cast<unsigned char*>(mem_alloc(UNIV_PAGE_SIZE)); - if (prebuilt->innodb_api) { - prebuilt->cursor_heap = cursor->heap; - } /* We want to position at one of the ends, row_search_for_mysql() uses the search_tuple fields to work out what to do. */ @@ -2090,9 +2085,6 @@ ib_cursor_next( row_prebuilt_t* prebuilt = cursor->prebuilt; byte buf[UNIV_PAGE_SIZE_MAX]; - if (prebuilt->innodb_api) { - prebuilt->cursor_heap = cursor->heap; - } /* We want to move to the next record */ dtuple_set_n_fields(prebuilt->search_tuple, 0); @@ -2145,9 +2137,6 @@ ib_cursor_moveto( buf = static_cast<unsigned char*>(mem_alloc(UNIV_PAGE_SIZE)); - if (prebuilt->innodb_api) { - prebuilt->cursor_heap = cursor->heap; - } err = static_cast<ib_err_t>(row_search_for_mysql( buf, ib_srch_mode, prebuilt, cursor->match_mode, 0)); diff --git a/storage/xtradb/include/row0mysql.h b/storage/xtradb/include/row0mysql.h index 7c2ef60e12c..d38722dfa1a 100644 --- a/storage/xtradb/include/row0mysql.h +++ b/storage/xtradb/include/row0mysql.h @@ -735,8 +735,6 @@ struct row_prebuilt_t { mem_heap_t* heap; /*!< memory heap from which these auxiliary structures are allocated when needed */ - mem_heap_t* cursor_heap; /*!< memory heap from which - innodb_api_buf is allocated per session*/ ins_node_t* ins_node; /*!< Innobase SQL insert node used to perform inserts to the table */ @@ -887,9 +885,6 @@ struct row_prebuilt_t { unsigned innodb_api:1; /*!< whether this is a InnoDB API query */ const rec_t* innodb_api_rec; /*!< InnoDB API search result */ - void* innodb_api_buf; /*!< Buffer holding copy of the physical - Innodb API search record */ - ulint innodb_api_rec_size; /*!< Size of the Innodb API record */ byte* srch_key_val1; /*!< buffer used in converting search key values from MySQL format to InnoDB format.*/ diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc index 5aeb8f61b46..ed904aaa6ce 100644 --- a/storage/xtradb/row/row0sel.cc +++ b/storage/xtradb/row/row0sel.cc @@ -2786,7 +2786,6 @@ row_sel_store_mysql_field_func( { const byte* data; ulint len; - ulint clust_field_no; ut_ad(prebuilt->default_rec); ut_ad(templ); @@ -5097,19 +5096,8 @@ idx_cond_failed: btr_pcur_store_position(pcur, &mtr); - if (prebuilt->innodb_api - && (btr_pcur_get_rec(pcur) != result_rec)) { - ulint rec_size = rec_offs_size(offsets); - if (!prebuilt->innodb_api_rec_size || - (prebuilt->innodb_api_rec_size < rec_size)) { - prebuilt->innodb_api_buf = - static_cast<byte*> - (mem_heap_alloc(prebuilt->cursor_heap,rec_size)); - prebuilt->innodb_api_rec_size = rec_size; - } - prebuilt->innodb_api_rec = - rec_copy( - prebuilt->innodb_api_buf, result_rec, offsets); + if (prebuilt->innodb_api) { + prebuilt->innodb_api_rec = result_rec; } } |