25#ifndef CURSOR_BY_ERROR_LOG_H
26#define CURSOR_BY_ERROR_LOG_H
111 assert(other !=
nullptr);
212 if (current_event !=
nullptr) {
219 return current_event;
230 return current_event;
259 int rnd_pos(
const void *pos)
override;
Definition: pfs_engine_table.h:300
Definition: pfs_engine_table.h:268
An abstract PERFORMANCE_SCHEMA table.
Definition: pfs_engine_table.h:70
Generic index for error_log table.
Definition: cursor_by_error_log.h:242
virtual bool match(log_sink_pfs_event *row)=0
PFS_index_error_log(PFS_engine_key *key)
Definition: cursor_by_error_log.h:244
~PFS_index_error_log() override=default
Index in the error-log ring-buffer.
Definition: cursor_by_error_log.h:50
void set_after(const PFS_ringbuffer_index *other)
Set our index to the element after the given one (if that is valid; otherwise, we cannot determine a ...
Definition: cursor_by_error_log.h:110
ulonglong m_timestamp
Time-stamp we copied from the event we point to when setting this index.
Definition: cursor_by_error_log.h:73
void reset()
Reset index.
Definition: cursor_by_error_log.h:79
PFS_ringbuffer_index()
Constructor.
Definition: cursor_by_error_log.h:88
int m_index
Numeric row index.
Definition: cursor_by_error_log.h:55
void set_at(const PFS_ringbuffer_index *other)
Set this index to a given position.
Definition: cursor_by_error_log.h:96
log_sink_pfs_event * m_event
Pointer to an event in the ring-buffer.
Definition: cursor_by_error_log.h:62
log_sink_pfs_event * get_event()
Get event if it's still valid.
Definition: cursor_by_error_log.h:157
log_sink_pfs_event * scan_next()
Return current record (if valid), then set index to the next record.
Definition: cursor_by_error_log.h:207
Cursor CURSOR_BY_ERROR_LOG for error_log table.
Definition: cursor_by_error_log.h:252
pos_t m_pos
Current position.
Definition: cursor_by_error_log.h:274
int rnd_pos(const void *pos) override
Random pos.
Definition: cursor_by_error_log.cc:104
static ha_rows get_row_count()
Get row-count (by getting the number of events in the ring-buffer)
Definition: cursor_by_error_log.cc:42
virtual int make_row(log_sink_pfs_event *row)=0
~cursor_by_error_log() override=default
void reset_position() override
Reset cursor position.
Definition: cursor_by_error_log.cc:62
int rnd_next() override
Read next row (from ring-buffer into table).
Definition: cursor_by_error_log.cc:75
pos_t m_next_pos
Next position.
Definition: cursor_by_error_log.h:276
cursor_by_error_log(const PFS_engine_table_share *share)
Definition: cursor_by_error_log.cc:38
int index_next() override
Go to next entry in index and retrieve the matching error log event.
Definition: cursor_by_error_log.cc:130
PFS_index_error_log * m_opened_index
Definition: cursor_by_error_log.h:279
PFS_ringbuffer_index pos_t
Definition: cursor_by_error_log.h:234
log_sink_pfs_event * log_sink_pfs_event_first()
Get oldest event still in ring-buffer.
Definition: log_sink_perfschema.cc:160
log_sink_pfs_event * log_sink_pfs_event_valid(log_sink_pfs_event *e, ulonglong logged)
Use timestamp to check whether a given event-pointer still points to a valid event in the ring-buffer...
Definition: log_sink_perfschema.cc:235
log_sink_pfs_event * log_sink_pfs_event_next(log_sink_pfs_event *e)
Get event following the supplied one.
Definition: log_sink_perfschema.cc:184
my_off_t ha_rows
Definition: my_base.h:1140
unsigned long long int ulonglong
Definition: my_inttypes.h:56
Performance schema tables (declarations).
Performance schema instruments (declarations).
required string key
Definition: replication_asynchronous_connection_failover.proto:60
A PERFORMANCE_SCHEMA table share.
Definition: pfs_engine_table.h:358
Definition: log_sink_perfschema.h:59
ulonglong m_timestamp
Column ERROR_LOG_TIMESTAMP.
Definition: log_sink_perfschema.h:61
Helpers to implement a performance schema table.