diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-08-09 17:14:40 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-08-09 17:14:40 +0300 |
commit | 31e794bcac06c2fff399f4eef279325505c39614 (patch) | |
tree | 7e825b68314318ac2830f850df0f67b29c49c431 | |
parent | 535910ae5f20e36405631030e9c0eb22fe40a7c4 (diff) | |
parent | cb9648a6b5041ca928e8da2d2571ba9df6d80e8a (diff) | |
download | mariadb-git-31e794bcac06c2fff399f4eef279325505c39614.tar.gz |
Merge 10.0 into 10.1
-rw-r--r-- | storage/innobase/api/api0api.cc | 21 | ||||
-rw-r--r-- | storage/innobase/include/row0mysql.h | 7 | ||||
-rw-r--r-- | storage/innobase/row/row0sel.cc | 15 |
3 files changed, 7 insertions, 36 deletions
diff --git a/storage/innobase/api/api0api.cc b/storage/innobase/api/api0api.cc index 64dafa0f224..bc83e98374f 100644 --- a/storage/innobase/api/api0api.cc +++ b/storage/innobase/api/api0api.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2008, 2017, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2008, 2015, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1988,14 +1988,11 @@ ib_cursor_read_row( page_format = static_cast<ib_bool_t>( dict_table_is_comp(tuple->index->table)); - 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,10 +2029,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. */ dtuple_set_n_fields(prebuilt->search_tuple, 0); @@ -2090,9 +2083,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 +2135,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/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index b7c89c426f0..71e3b9bb19e 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -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/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index f691009d6e3..189c7a7a1d2 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -5096,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; } } |