1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

cleanup: LOAD DATA replication support in IO_CACHE

remove some 14-year old code that added support for
LOAD DATA replication to IO_CACHE:
* three callbacks, of which only two were actually used and that
  were only needed for LOAD DATA replication but were
  tested in every IO_CACHE instance
* an additional opaque void * argument in IO_CACHE, also only
  used for LOAD DATA replication, but present everywhere
* the code to close IO_CACHE prematurely in LOAD DATA to have
  these callbacks called in the correct order and a long
  comment explaining what will happen if IO_CACHE is not
  closed prematurely
* a variable to track whether IO_CACHE was closed prematurely
  (to avoid double-closing it)
This commit is contained in:
Sergei Golubchik
2015-05-16 08:48:52 +02:00
parent 91dab5ddb6
commit 80e61ae21e
5 changed files with 37 additions and 98 deletions

View File

@ -56,14 +56,15 @@ extern int init_master_info(Master_info* mi);
void kill_zombie_dump_threads(uint32 slave_server_id);
int check_binlog_magic(IO_CACHE* log, const char** errmsg);
typedef struct st_load_file_info
struct LOAD_FILE_IO_CACHE : public IO_CACHE
{
THD* thd;
my_off_t last_pos_in_file;
bool wrote_create_file, log_delayed;
} LOAD_FILE_INFO;
int (*real_read_function)(struct st_io_cache *,uchar *,size_t);
};
int log_loaded_block(IO_CACHE* file);
int log_loaded_block(IO_CACHE* file, uchar *Buffer, size_t Count);
int init_replication_sys_vars();
void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, ushort flags);
@ -80,6 +81,10 @@ int rpl_load_gtid_state(slave_connection_state *state, bool use_binlog);
bool rpl_gtid_pos_check(THD *thd, char *str, size_t len);
bool rpl_gtid_pos_update(THD *thd, char *str, size_t len);
#else
struct LOAD_FILE_IO_CACHE : public IO_CACHE { };
#endif /* HAVE_REPLICATION */
#endif /* SQL_REPL_INCLUDED */