MySQL  8.0.20
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 */
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
RangeReverse< Range > reverse(Range &x)
Iterate over a range in reverse.
Definition: utilities.h:135
Row iterators that scan a single table without reference to other tables or iterators.
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
Definition: table.h:1306
This file includes constants used by all storage engines.
unsigned int uint
Definition: uca-dump.cc:29
A composite row iterator is one that takes in one or more existing iterators and processes their rows...
Definition: sql_executor.h:270
std::unique_ptr< T, Destroy_only< T > > unique_ptr_destroy_only
std::unique_ptr, but only destroying.
Definition: my_alloc.h:408
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
class QEP_TAB * qep_tab
Definition: table.h:1612
my_off_t ha_rows
Definition: my_base.h:1132
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:765