23#ifndef BINLOG_OFILE_H_INCLUDED
24#define BINLOG_OFILE_H_INCLUDED
50 [[nodiscard]]
bool open(
54 const char *binlog_name,
myf flags,
bool existing =
false);
67 [[nodiscard]]
static std::unique_ptr<MYSQL_BIN_LOG::Binlog_ofile>
85 [[nodiscard]]
virtual bool write(
const unsigned char *
buffer,
99 [[nodiscard]]
virtual bool update(
const unsigned char *
buffer,
112 [[nodiscard]]
virtual bool flush();
113 [[nodiscard]]
virtual bool sync();
116 [[nodiscard]]
virtual bool is_empty();
117 [[nodiscard]]
virtual bool is_open();
143 [[nodiscard]]
virtual std::unique_ptr<Truncatable_ostream>
The abstract class for basic output streams which provides write operation.
Definition: basic_ostream.h:36
Logical binlog file which wraps and hides the detail of lower layer storage implementation.
Definition: binlog_ofile.h:35
virtual void close()
Definition: binlog_ofile.cc:125
virtual bool is_empty()
Definition: binlog_ofile.cc:160
virtual void set_encrypted()
Set that the log file is encrypted.
Definition: binlog_ofile.cc:180
bool open(PSI_file_key log_file_key, const char *binlog_name, myf flags, bool existing=false)
Opens the binlog file.
Definition: binlog_ofile.cc:36
virtual bool is_encrypted()
Check if the log file is encrypted.
Definition: binlog_ofile.cc:178
std::unique_ptr< Truncatable_ostream > m_pipeline_head
Definition: binlog_ofile.h:162
virtual bool is_open()
Definition: binlog_ofile.cc:161
virtual bool sync()
Definition: binlog_ofile.cc:157
virtual bool update(const unsigned char *buffer, my_off_t length, my_off_t offset)
Updates some bytes in the binlog file.
Definition: binlog_ofile.cc:141
virtual bool flush()
Definition: binlog_ofile.cc:156
virtual bool flush_and_sync()
Definition: binlog_ofile.cc:158
my_off_t m_position
Definition: binlog_ofile.h:160
int m_encrypted_header_size
Definition: binlog_ofile.h:161
virtual int get_encrypted_header_size()
Returns the encrypted header size of the binary log file.
Definition: binlog_ofile.cc:165
virtual my_off_t position()
Definition: binlog_ofile.cc:159
virtual bool truncate(my_off_t offset)
Truncates some data at the end of the binlog file.
Definition: binlog_ofile.cc:148
bool m_encrypted
Definition: binlog_ofile.h:163
~Binlog_ofile() override
Definition: binlog_ofile.cc:30
virtual bool write(const unsigned char *buffer, my_off_t length) override
Writes data into storage and maintains binlog position.
Definition: binlog_ofile.cc:131
virtual std::unique_ptr< Truncatable_ostream > get_pipeline_head()
Get the pipeline head.
Definition: binlog_ofile.cc:174
virtual my_off_t get_real_file_size()
Returns the real file size.
Definition: binlog_ofile.cc:169
static std::unique_ptr< MYSQL_BIN_LOG::Binlog_ofile > open_existing(PSI_file_key log_file_key, const char *binlog_name, myf flags)
Opens an existing binlog file.
Definition: binlog_ofile.cc:75
unsigned int PSI_file_key
Instrumented file key.
Definition: psi_file_bits.h:48
static int flags[50]
Definition: hp_test1.cc:40
Some integer typedefs for easier portability.
int myf
Definition: my_inttypes.h:94
ulonglong my_off_t
Definition: my_inttypes.h:72
#define HAVE_PSI_INTERFACE
Definition: my_psi_config.h:39
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
Performance schema instrumentation interface.