summaryrefslogtreecommitdiff
path: root/sql/sql_repl.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-05-16 08:48:52 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-02 18:53:36 +0200
commit80e61ae21e2373ee73407f91f596b11c2c46e7d9 (patch)
tree6478f01d7bc067fb7c526056b1544b3567753993 /sql/sql_repl.h
parent91dab5ddb6accbb256e7089aea8ba38e66a1b0cf (diff)
downloadmariadb-git-80e61ae21e2373ee73407f91f596b11c2c46e7d9.tar.gz
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)
Diffstat (limited to 'sql/sql_repl.h')
-rw-r--r--sql/sql_repl.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/sql_repl.h b/sql/sql_repl.h
index 7f7751b8f44..a9fdce9e5e2 100644
--- a/sql/sql_repl.h
+++ b/sql/sql_repl.h
@@ -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 */