Commit 7759991a authored by Marko Mäkelä's avatar Marko Mäkelä

fixup 58b56f14: Remove dead code

row_prebuilt_t::m_no_prefetch: Remove (it was always false).
row_prebuilt_t::m_read_virtual_key: Remove (it was always false).

Only ha_innopart ever set these fields.
parent 978e48c9
/***************************************************************************** /*****************************************************************************
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, 2019, MariaDB Corporation. Copyright (c) 2017, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -784,12 +784,6 @@ struct row_prebuilt_t { ...@@ -784,12 +784,6 @@ struct row_prebuilt_t {
search key values from MySQL format search key values from MySQL format
to InnoDB format.*/ to InnoDB format.*/
uint srch_key_val_len; /*!< Size of search key */ uint srch_key_val_len; /*!< Size of search key */
/** Disable prefetch. */
bool m_no_prefetch;
/** Return materialized key for secondary index scan */
bool m_read_virtual_key;
/** The MySQL table object */ /** The MySQL table object */
TABLE* m_mysql_table; TABLE* m_mysql_table;
}; };
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2020, MariaDB Corporation. Copyright (c) 2015, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -958,9 +958,6 @@ row_create_prebuilt( ...@@ -958,9 +958,6 @@ row_create_prebuilt(
prebuilt->fts_doc_id_in_read_set = 0; prebuilt->fts_doc_id_in_read_set = 0;
prebuilt->blob_heap = NULL; prebuilt->blob_heap = NULL;
prebuilt->m_no_prefetch = false;
prebuilt->m_read_virtual_key = false;
DBUG_RETURN(prebuilt); DBUG_RETURN(prebuilt);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc. Copyright (c) 2008, Google Inc.
Copyright (c) 2015, 2020, MariaDB Corporation. Copyright (c) 2015, 2021, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described Google, Inc. Those modifications are gratefully acknowledged and are described
...@@ -3168,8 +3168,7 @@ static bool row_sel_store_mysql_rec( ...@@ -3168,8 +3168,7 @@ static bool row_sel_store_mysql_rec(
search or virtual key read is not requested. */ search or virtual key read is not requested. */
if (!rec_clust if (!rec_clust
|| !prebuilt->index->has_virtual() || !prebuilt->index->has_virtual()
|| (!prebuilt->read_just_key || !prebuilt->read_just_key) {
&& !prebuilt->m_read_virtual_key)) {
/* Initialize the NULL bit. */ /* Initialize the NULL bit. */
mysql_rec[templ->mysql_null_byte_offset] mysql_rec[templ->mysql_null_byte_offset]
|= (byte) templ->mysql_null_bit_mask; |= (byte) templ->mysql_null_bit_mask;
...@@ -3185,23 +3184,8 @@ static bool row_sel_store_mysql_rec( ...@@ -3185,23 +3184,8 @@ static bool row_sel_store_mysql_rec(
const dfield_t* dfield = dtuple_get_nth_v_field( const dfield_t* dfield = dtuple_get_nth_v_field(
vrow, col->v_pos); vrow, col->v_pos);
/* If this is a partitioned table, it might request
InnoDB to fill out virtual column data for serach
index key values while other non key columns are also
getting selected. The non-key virtual columns may
not be materialized and we should skip them. */
if (dfield_get_type(dfield)->mtype == DATA_MISSING) { if (dfield_get_type(dfield)->mtype == DATA_MISSING) {
#ifdef UNIV_DEBUG ut_ad("no ha_innopart in MariaDB" == 0);
ulint prefix;
#endif /* UNIV_DEBUG */
ut_ad(prebuilt->m_read_virtual_key);
/* If it is part of index key the data should
have been materialized. */
ut_ad(dict_index_get_nth_col_or_prefix_pos(
prebuilt->index, col->v_pos, false,
true, &prefix) == ULINT_UNDEFINED);
continue; continue;
} }
...@@ -4377,8 +4361,7 @@ row_search_mvcc( ...@@ -4377,8 +4361,7 @@ row_search_mvcc(
index key, if this is covered index scan or virtual key read is index key, if this is covered index scan or virtual key read is
requested. */ requested. */
bool need_vrow = dict_index_has_virtual(prebuilt->index) bool need_vrow = dict_index_has_virtual(prebuilt->index)
&& (prebuilt->read_just_key && prebuilt->read_just_key;
|| prebuilt->m_read_virtual_key);
/* Reset the new record lock info if srv_locks_unsafe_for_binlog /* Reset the new record lock info if srv_locks_unsafe_for_binlog
is set or session is using a READ COMMITED isolation level. Then is set or session is using a READ COMMITED isolation level. Then
...@@ -5524,7 +5507,6 @@ row_search_mvcc( ...@@ -5524,7 +5507,6 @@ row_search_mvcc(
if ((match_mode == ROW_SEL_EXACT if ((match_mode == ROW_SEL_EXACT
|| prebuilt->n_rows_fetched >= MYSQL_FETCH_CACHE_THRESHOLD) || prebuilt->n_rows_fetched >= MYSQL_FETCH_CACHE_THRESHOLD)
&& prebuilt->select_lock_type == LOCK_NONE && prebuilt->select_lock_type == LOCK_NONE
&& !prebuilt->m_no_prefetch
&& !prebuilt->templ_contains_blob && !prebuilt->templ_contains_blob
&& !prebuilt->clust_index_was_generated && !prebuilt->clust_index_was_generated
&& !prebuilt->used_in_HANDLER && !prebuilt->used_in_HANDLER
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment