MySQL 9.0.0
Source Code Documentation
|
For writing out the merged rows. More...
Public Member Functions | |
Output_file (ddl::Context &ctx, const Unique_os_file_descriptor &file, IO_buffer io_buffer) noexcept | |
Constructor. More... | |
~Output_file ()=default | |
Destructor. More... | |
void | init (const dict_index_t *index) noexcept |
Initialize the duplicate check infrastructure. More... | |
dberr_t | write (const mrec_t *mrec, const ulint *offsets, Dup *dup) noexcept |
Write the row to the buffer. More... | |
dberr_t | flush () noexcept |
Write end of block marker and flush buffer to disk. More... | |
os_offset_t | get_size () const |
uint64_t | get_n_rows () const noexcept |
Static Public Attributes | |
static constexpr uint64_t | TRX_INTERRUPTED_CHECK = 64 |
The transaction interrupted check is expensive, we check after this many page writes. More... | |
Private Types | |
using | Offsets = std::vector< ulint, ut::allocator< ulint > > |
Limit is [start, end]. More... | |
Private Member Functions | |
size_t | copied () const noexcept |
void | duplicate_check (const mrec_t *mrec, const ulint *offsets, Dup *dup) noexcept |
Do a duplicate check against the incoming record. 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 | |
ddl::Context & | m_ctx |
DDL context. More... | |
const Unique_os_file_descriptor & | m_file |
File to write to. More... | |
IO_buffer | m_buffer |
Buffer to write to (output buffer). More... | |
byte * | m_ptr {} |
Start writing new bytes at this offset. More... | |
os_offset_t | m_offset {} |
Total number of bytes written. More... | |
Offsets | m_offsets {} |
Offsets of the last inserted row. More... | |
mrec_t * | m_last_mrec {} |
Pointer to last record in the output buffer. More... | |
uint64_t | m_n_rows {} |
Number of rows read/written. More... | |
uint64_t | m_interrupt_check {} |
Counter for checking trx_is_interrupted. More... | |
For writing out the merged rows.
|
private |
Limit is [start, end].
|
inlinenoexcept |
Constructor.
[in,out] | ctx | DDL context. |
[in] | file | File to write to. |
[in] | io_buffer | Buffer to store records and write to file. |
|
default |
Destructor.
|
inlineprivatenoexcept |
|
privatenoexcept |
Do a duplicate check against the incoming record.
[in] | mrec | Row to write. |
[in] | offsets | Column offsets in row. |
[in,out] | dup | For duplicate checks. |
|
noexcept |
Write end of block marker and flush buffer to disk.
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Initialize the duplicate check infrastructure.
[in] | index | DDL index. |
|
noexcept |
Write the row to the buffer.
If the buffer fills up write the buffer to the output file.
[in] | mrec | Row to write. |
[in] | offsets | Column offsets in row. |
[in,out] | dup | For duplicate checks. |
|
private |
Buffer to write to (output buffer).
|
private |
DDL context.
|
private |
File to write to.
|
private |
Counter for checking trx_is_interrupted.
|
private |
Pointer to last record in the output buffer.
|
private |
Number of rows read/written.
|
private |
Total number of bytes written.
|
private |
Offsets of the last inserted row.
|
private |
Start writing new bytes at this offset.
|
staticconstexpr |
The transaction interrupted check is expensive, we check after this many page writes.