MySQL 8.4.2
Source Code Documentation
|
Read rows from the temporary file. More...
#include <ddl0impl-file-reader.h>
Public Types | |
using | Offsets = std::vector< ulint, ut::allocator< ulint > > |
Public Member Functions | |
File_reader (const Unique_os_file_descriptor &file, dict_index_t *index, size_t buffer_size, os_offset_t size) noexcept | |
Constructor. More... | |
~File_reader () noexcept | |
Destructor. More... | |
dberr_t | prepare () noexcept |
Prepare the file for reading. More... | |
dberr_t | get_tuple (Builder *builder, mem_heap_t *heap, dtuple_t *&dtuple) noexcept |
The current row as a tuple. More... | |
dberr_t | read (os_offset_t offset) noexcept |
Seek to the offset and read the page in. More... | |
void | set_offset (os_offset_t offset) noexcept |
Set the range or rows to traverse. More... | |
bool | eof () const noexcept |
uint64_t | get_n_rows_read () const noexcept |
Public Attributes | |
dict_index_t * | m_index {} |
Index that the records belong to. More... | |
const mrec_t * | m_mrec {} |
Pointer to current row. More... | |
Offsets | m_offsets {} |
Columns offsets. More... | |
const Unique_os_file_descriptor & | m_file |
File handle to read from. More... | |
Private Types | |
using | Bounds = std::pair< const byte *, const byte * > |
Private Member Functions | |
dberr_t | seek (os_offset_t offset) noexcept |
Seek to the start of the range and load load the page. More... | |
dberr_t | read_next () noexcept |
Advance page number to the next and read in. More... | |
dberr_t | next () noexcept |
Advance the "cursor". More... | |
Private Member Functions inherited from ut::Non_copyable | |
Non_copyable (const Non_copyable &)=delete | |
Non_copyable & | operator= (const Non_copyable &)=delete |
Non_copyable ()=default | |
~Non_copyable ()=default | |
Private Attributes | |
os_offset_t | m_size {} |
Size of the file in bytes. More... | |
os_offset_t | m_offset {} |
Offset to read. More... | |
const byte * | m_ptr {} |
Pointer current offset within file buffer. More... | |
Bounds | m_bounds {} |
File buffer bounds. More... | |
byte * | m_aux_buf {} |
Auxiliary buffer for records that span across pages. More... | |
size_t | m_buffer_size {} |
IO buffer size in bytes. More... | |
ut::unique_ptr_aligned< byte[]> | m_aligned_buffer {} |
Aligned IO buffer. More... | |
IO_buffer | m_io_buffer {} |
File buffer for reading. More... | |
uint64_t | m_n_rows_read {} |
Number of rows read from the file. More... | |
friend | File_cursor |
Read rows from the temporary file.
|
private |
using ddl::File_reader::Offsets = std::vector<ulint, ut::allocator<ulint> > |
|
inlinenoexcept |
Constructor.
[in] | file | Opened file. |
[in,out] | index | Index that the rows belong to. |
[in] | buffer_size | Size of file buffer for reading. |
[in] | size | File size in bytes. |
|
inlinenoexcept |
Destructor.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
The current row as a tuple.
Note: the tuple only does a shallow copy.
[in,out] | builder | Index builder instance. |
[in,out] | heap | Heap to use for allocation. |
[out] | dtuple | Row converted to a tuple. |
|
privatenoexcept |
Advance the "cursor".
|
noexcept |
Prepare the file for reading.
|
noexcept |
Seek to the offset and read the page in.
[in] | offset | Offset to read in. |
|
privatenoexcept |
Advance page number to the next and read in.
|
privatenoexcept |
Seek to the start of the range and load load the page.
[in] | offset | Offset to read in. |
|
inlinenoexcept |
Set the range or rows to traverse.
[in] | offset | New offset to read from. |
|
private |
|
private |
Aligned IO buffer.
|
private |
Auxiliary buffer for records that span across pages.
|
private |
File buffer bounds.
|
private |
IO buffer size in bytes.
const Unique_os_file_descriptor& ddl::File_reader::m_file |
File handle to read from.
dict_index_t* ddl::File_reader::m_index {} |
Index that the records belong to.
|
private |
File buffer for reading.
const mrec_t* ddl::File_reader::m_mrec {} |
Pointer to current row.
|
private |
Number of rows read from the file.
|
private |
Offset to read.
Offsets ddl::File_reader::m_offsets {} |
Columns offsets.
|
private |
Pointer current offset within file buffer.
|
private |
Size of the file in bytes.