MySQL  8.0.19
Source Code Documentation
records.h
Go to the documentation of this file.
1 #ifndef SQL_RECORDS_H
2 #define SQL_RECORDS_H
3 /* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License, version 2.0,
7  as published by the Free Software Foundation.
8 
9  This program is also distributed with certain software (including
10  but not limited to OpenSSL) that is licensed under separate terms,
11  as designated in a particular file or component or in included license
12  documentation. The authors of MySQL hereby grant you an additional
13  permission to link the program and your derivative works with the
14  separately licensed software that they have included with MySQL.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License, version 2.0, for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
24 
25 #include <sys/types.h>
26 #include <memory>
27 #include <string>
28 
29 #include "my_alloc.h"
30 #include "my_base.h"
33 #include "sql/ref_row_iterators.h"
34 #include "sql/row_iterator.h"
35 #include "sql/sorting_iterator.h"
36 
37 class QEP_TAB;
38 class THD;
39 struct TABLE;
40 
42  THD *thd, TABLE *table, QEP_TAB *qep_tab, bool disable_rr_cache,
43  bool ignore_not_found_rows, ha_rows *examined_rows, bool *using_table_scan);
44 
45 /**
46  Calls create_table_iterator(), then calls Init() on the resulting iterator.
47  Returns nullptr on failure.
48  */
50  THD *thd, TABLE *table, QEP_TAB *qep_tab, bool disable_rr_cache,
51  bool ignore_not_found_rows);
52 
54  THD *thd, TABLE *table, uint idx, bool reverse, QEP_TAB *qep_tab);
55 
56 #endif /* SQL_RECORDS_H */
create_table_iterator
unique_ptr_destroy_only< RowIterator > create_table_iterator(THD *thd, TABLE *table, QEP_TAB *qep_tab, bool disable_rr_cache, bool ignore_not_found_rows, ha_rows *examined_rows, bool *using_table_scan)
setup_read_record is used to scan by using a number of different methods.
Definition: records.cc:211
THD
Definition: sql_class.h:764
composite_iterators.h
basic_row_iterators.h
my_base.h
row_iterator.h
TABLE
Definition: table.h:1305
QEP_TAB
Definition: sql_executor.h:417
mysql_harness::utility::reverse
RangeReverse< Range > reverse(Range &x)
Iterate over a range in reverse.
Definition: utilities.h:135
unique_ptr_destroy_only
std::unique_ptr< T, Destroy_only< T > > unique_ptr_destroy_only
std::unique_ptr, but only destroying.
Definition: my_alloc.h:408
my_alloc.h
TABLE::qep_tab
class QEP_TAB * qep_tab
Definition: table.h:1598
create_table_iterator_idx
unique_ptr_destroy_only< RowIterator > create_table_iterator_idx(THD *thd, TABLE *table, uint idx, bool reverse, QEP_TAB *qep_tab)
Initialize a row iterator to perform full index scan in desired direction using the RowIterator inter...
Definition: records.cc:75
sorting_iterator.h
uint
unsigned int uint
Definition: uca-dump.cc:29
ref_row_iterators.h
ha_rows
my_off_t ha_rows
Definition: my_base.h:1132
init_table_iterator
unique_ptr_destroy_only< RowIterator > init_table_iterator(THD *thd, TABLE *table, QEP_TAB *qep_tab, bool disable_rr_cache, bool ignore_not_found_rows)
Calls create_table_iterator(), then calls Init() on the resulting iterator.
Definition: records.cc:269