1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-34705: Binlog-in-engine: Integration with server-layer code

Mostly various fixes to avoid initializing or creating any data or files for
the legacy binlog.

A possible later refinement could be to sub-class the binlog class
differently for legacy and in-engine binlogs, writing separate virtual
functions for behaviour that differ, extracting common functionality into
sub-methods. This could remove some if (opt_binlog_engine_hton)
conditionals.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2025-04-10 14:54:37 +02:00
parent 0327708ed6
commit d496e5278d
19 changed files with 595 additions and 165 deletions

View File

@@ -1568,7 +1568,9 @@ struct handlerton
Obtain the current position in the binlog.
Used to support legacy SHOW MASTER STATUS.
*/
void (*binlog_status)(char out_filename[FN_REFLEN], ulonglong *out_pos);
void (*binlog_status)(uint64_t * out_fileno, uint64_t *out_pos);
/* Get a binlog name from a file_no. */
void (*get_filename)(char name[FN_REFLEN], uint64_t file_no);
/* Obtain list of binlog files (SHOW BINARY LOGS). */
binlog_file_entry * (*get_binlog_file_list)(MEM_ROOT *mem_root);
/*
@@ -5932,8 +5934,6 @@ public:
support legacy SHOW BINLOG EVENTS.
*/
virtual int init_legacy_pos(const char *filename, ulonglong offset) = 0;
/* Get a binlog name from a file_no. */
virtual void get_filename(char name[FN_REFLEN], uint64_t file_no) = 0;
int read_log_event(String *packet, uint32_t ev_offset, size_t max_allowed);
};