MySQL 8.0.30
Source Code Documentation
pfs_batch_mode.h
Go to the documentation of this file.
1#ifndef PFS_BATCH_MODE_INCLUDED
2#define PFS_BATCH_MODE_INCLUDED
3
4/* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License, version 2.0,
8 as published by the Free Software Foundation.
9
10 This program is also distributed with certain software (including
11 but not limited to OpenSSL) that is licensed under separate terms,
12 as designated in a particular file or component or in included license
13 documentation. The authors of MySQL hereby grant you an additional
14 permission to link the program and your derivative works with the
15 separately licensed software that they have included with MySQL.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License, version 2.0, for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
25
27
28/// A RAII class to handle turning on batch mode in front of scanning a row
29/// iterator, and then turn it back off afterwards (on destruction).
30///
31/// Use this when scanning an iterator, e.g. using a for loop. See the comments
32/// on RowIterator::StartPSIBatchMode for more details.
34 public:
35 explicit PFSBatchMode(RowIterator *iterator) : m_iterator(iterator) {
37 }
38
40
41 private:
43};
44#endif /* PFS_BATCH_MODE_INCLUDED */
A RAII class to handle turning on batch mode in front of scanning a row iterator, and then turn it ba...
Definition: pfs_batch_mode.h:33
RowIterator * m_iterator
Definition: pfs_batch_mode.h:42
PFSBatchMode(RowIterator *iterator)
Definition: pfs_batch_mode.h:35
~PFSBatchMode()
Definition: pfs_batch_mode.h:39
A context for reading through a single table using a chosen access method: index read,...
Definition: row_iterator.h:81
virtual void StartPSIBatchMode()
Start performance schema batch mode, if supported (otherwise ignored).
Definition: row_iterator.h:205
virtual void EndPSIBatchModeIfStarted()
Ends performance schema batch mode, if started.
Definition: row_iterator.h:216