mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/b22583-mysql-5.1-new-rpl
This commit is contained in:
338
sql/log_event.h
338
sql/log_event.h
@ -516,6 +516,7 @@ class THD;
|
||||
class Format_description_log_event;
|
||||
|
||||
struct st_relay_log_info;
|
||||
typedef st_relay_log_info RELAY_LOG_INFO;
|
||||
|
||||
#ifdef MYSQL_CLIENT
|
||||
/*
|
||||
@ -604,6 +605,33 @@ typedef struct st_print_event_info
|
||||
class Log_event
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Enumeration of what kinds of skipping (and non-skipping) that can
|
||||
occur when the slave executes an event.
|
||||
|
||||
@see shall_skip
|
||||
@see do_shall_skip
|
||||
*/
|
||||
enum enum_skip_reason {
|
||||
/**
|
||||
Don't skip event.
|
||||
*/
|
||||
EVENT_SKIP_NOT,
|
||||
|
||||
/**
|
||||
Skip event by ignoring it.
|
||||
|
||||
This means that the slave skip counter will not be changed.
|
||||
*/
|
||||
EVENT_SKIP_IGNORE,
|
||||
|
||||
/**
|
||||
Skip event and decrease skip counter.
|
||||
*/
|
||||
EVENT_SKIP_COUNT
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
The following type definition is to be used whenever data is placed
|
||||
and manipulated in a common buffer. Use this typedef for buffers
|
||||
@ -685,16 +713,14 @@ public:
|
||||
static void init_show_field_list(List<Item>* field_list);
|
||||
#ifdef HAVE_REPLICATION
|
||||
int net_send(Protocol *protocol, const char* log_name, my_off_t pos);
|
||||
|
||||
/*
|
||||
pack_info() is used by SHOW BINLOG EVENTS; as print() it prepares and sends
|
||||
a string to display to the user, so it resembles print().
|
||||
*/
|
||||
|
||||
virtual void pack_info(Protocol *protocol);
|
||||
/*
|
||||
The SQL slave thread calls exec_event() to execute the event; this is where
|
||||
the slave's data is modified.
|
||||
*/
|
||||
virtual int exec_event(struct st_relay_log_info* rli);
|
||||
|
||||
#endif /* HAVE_REPLICATION */
|
||||
virtual const char* get_db()
|
||||
{
|
||||
@ -767,6 +793,127 @@ public:
|
||||
*description_event);
|
||||
/* returns the human readable name of the event's type */
|
||||
const char* get_type_str();
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
public:
|
||||
|
||||
/**
|
||||
Apply the event to the database.
|
||||
|
||||
This function represents the public interface for applying an
|
||||
event.
|
||||
|
||||
@see do_apply_event
|
||||
*/
|
||||
int apply_event(RELAY_LOG_INFO const *rli) {
|
||||
return do_apply_event(rli);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Update the relay log position.
|
||||
|
||||
This function represents the public interface for "stepping over"
|
||||
the event and will update the relay log information.
|
||||
|
||||
@see do_update_pos
|
||||
*/
|
||||
int update_pos(RELAY_LOG_INFO *rli)
|
||||
{
|
||||
return do_update_pos(rli);
|
||||
}
|
||||
|
||||
/**
|
||||
Decide if the event shall be skipped, and the reason for skipping
|
||||
it.
|
||||
|
||||
@see do_shall_skip
|
||||
*/
|
||||
enum_skip_reason shall_skip(RELAY_LOG_INFO *rli)
|
||||
{
|
||||
return do_shall_skip(rli);
|
||||
}
|
||||
|
||||
protected:
|
||||
/**
|
||||
Primitive to apply an event to the database.
|
||||
|
||||
This is where the change to the database is made.
|
||||
|
||||
@note The primitive is protected instead of private, since there
|
||||
is a hierarchy of actions to be performed in some cases.
|
||||
|
||||
@see Format_description_log_event::do_apply_event()
|
||||
|
||||
@param rli Pointer to relay log info structure
|
||||
|
||||
@retval 0 Event applied successfully
|
||||
@retval errno Error code if event application failed
|
||||
*/
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli)
|
||||
{
|
||||
return 0; /* Default implementation does nothing */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Advance relay log coordinates.
|
||||
|
||||
This function is called to advance the relay log coordinates to
|
||||
just after the event. It is essential that both the relay log
|
||||
coordinate and the group log position is updated correctly, since
|
||||
this function is used also for skipping events.
|
||||
|
||||
Normally, each implementation of do_update_pos() shall:
|
||||
|
||||
- Update the event position to refer to the position just after
|
||||
the event.
|
||||
|
||||
- Update the group log position to refer to the position just
|
||||
after the event <em>if the event is last in a group</em>
|
||||
|
||||
@param rli Pointer to relay log info structure
|
||||
|
||||
@retval 0 Coordinates changed successfully
|
||||
@retval errno Error code if advancing failed (usually just
|
||||
1). Observe that handler errors are returned by the
|
||||
do_apply_event() function, and not by this one.
|
||||
*/
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
|
||||
|
||||
/**
|
||||
Decide if this event shall be skipped or not and the reason for
|
||||
skipping it.
|
||||
|
||||
The default implementation decide that the event shall be skipped
|
||||
if either:
|
||||
|
||||
- the server id of the event is the same as the server id of the
|
||||
server and <code>rli->replicate_same_server_id</code> is true,
|
||||
or
|
||||
|
||||
- if <code>rli->slave_skip_counter</code> is greater than zero.
|
||||
|
||||
@see do_apply_event
|
||||
@see do_update_pos
|
||||
|
||||
@retval Log_event::EVENT_SKIP_NOT
|
||||
The event shall not be skipped and should be applied.
|
||||
|
||||
@retval Log_event::EVENT_SKIP_IGNORE
|
||||
The event shall be skipped by just ignoring it, i.e., the slave
|
||||
skip counter shall not be changed. This happends if, for example,
|
||||
the originating server id of the event is the same as the server
|
||||
id of the slave.
|
||||
|
||||
@retval Log_event::EVENT_SKIP_COUNT
|
||||
The event shall be skipped because the slave skip counter was
|
||||
non-zero. The caller shall decrease the counter by one.
|
||||
*/
|
||||
virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli);
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@ -807,10 +954,10 @@ public:
|
||||
uint16 error_code;
|
||||
ulong thread_id;
|
||||
/*
|
||||
For events created by Query_log_event::exec_event (and
|
||||
Load_log_event::exec_event()) we need the *original* thread id, to be able
|
||||
to log the event with the original (=master's) thread id (fix for
|
||||
BUG#1686).
|
||||
For events created by Query_log_event::do_apply_event (and
|
||||
Load_log_event::do_apply_event()) we need the *original* thread
|
||||
id, to be able to log the event with the original (=master's)
|
||||
thread id (fix for BUG#1686).
|
||||
*/
|
||||
ulong slave_proxy_id;
|
||||
|
||||
@ -873,9 +1020,6 @@ public:
|
||||
const char* get_db() { return db; }
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
int exec_event(struct st_relay_log_info* rli, const char *query_arg,
|
||||
uint32 q_len_arg);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print_query_header(IO_CACHE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -904,6 +1048,16 @@ public:
|
||||
*/
|
||||
virtual ulong get_post_header_size_for_derived() { return 0; }
|
||||
/* Writes derived event-specific part of post header. */
|
||||
|
||||
public: /* !!! Public in this patch to allow old usage */
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
|
||||
int do_apply_event(RELAY_LOG_INFO const *rli,
|
||||
const char *query_arg,
|
||||
uint32 q_len_arg);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
};
|
||||
|
||||
|
||||
@ -952,9 +1106,8 @@ public:
|
||||
uint16 master_port;
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
Slave_log_event(THD* thd_arg, struct st_relay_log_info* rli);
|
||||
Slave_log_event(THD* thd_arg, RELAY_LOG_INFO* rli);
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
#endif
|
||||
@ -967,6 +1120,11 @@ public:
|
||||
#ifndef MYSQL_CLIENT
|
||||
bool write(IO_CACHE* file);
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const* rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* HAVE_REPLICATION */
|
||||
@ -1036,12 +1194,6 @@ public:
|
||||
const char* get_db() { return db; }
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli)
|
||||
{
|
||||
return exec_event(thd->slave_net,rli,0);
|
||||
}
|
||||
int exec_event(NET* net, struct st_relay_log_info* rli,
|
||||
bool use_rli_only_for_errors);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1073,6 +1225,17 @@ public:
|
||||
+ LOAD_HEADER_LEN
|
||||
+ sql_ex.data_size() + field_block_len + num_fields);
|
||||
}
|
||||
|
||||
public: /* !!! Public in this patch to allow old usage */
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const* rli)
|
||||
{
|
||||
return do_apply_event(thd->slave_net,rli,0);
|
||||
}
|
||||
|
||||
int do_apply_event(NET *net, RELAY_LOG_INFO const *rli,
|
||||
bool use_rli_only_for_errors);
|
||||
#endif
|
||||
};
|
||||
|
||||
extern char server_version[SERVER_VERSION_LENGTH];
|
||||
@ -1130,7 +1293,6 @@ public:
|
||||
Start_log_event_v3();
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
Start_log_event_v3() {}
|
||||
@ -1150,6 +1312,22 @@ public:
|
||||
return START_V3_HEADER_LEN; //no variable-sized part
|
||||
}
|
||||
virtual bool is_artificial_event() { return artificial_event; }
|
||||
|
||||
protected:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO*)
|
||||
{
|
||||
/*
|
||||
Events from ourself should be skipped, but they should not
|
||||
decrease the slave skip counter.
|
||||
*/
|
||||
if (this->server_id == ::server_id)
|
||||
return Log_event::EVENT_SKIP_IGNORE;
|
||||
else
|
||||
return Log_event::EVENT_SKIP_NOT;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1175,13 +1353,6 @@ public:
|
||||
uchar server_version_split[3];
|
||||
|
||||
Format_description_log_event(uint8 binlog_ver, const char* server_ver=0);
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
#ifdef HAVE_REPLICATION
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#endif
|
||||
|
||||
Format_description_log_event(const char* buf, uint event_len,
|
||||
const Format_description_log_event* description_event);
|
||||
~Format_description_log_event() { my_free((gptr)post_header_len, MYF(0)); }
|
||||
@ -1204,7 +1375,15 @@ public:
|
||||
*/
|
||||
return FORMAT_DESCRIPTION_HEADER_LEN;
|
||||
}
|
||||
|
||||
void calc_server_version_split();
|
||||
|
||||
protected:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1228,7 +1407,6 @@ public:
|
||||
{}
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1243,6 +1421,13 @@ public:
|
||||
bool write(IO_CACHE* file);
|
||||
#endif
|
||||
bool is_valid() const { return 1; }
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1269,7 +1454,6 @@ class Rand_log_event: public Log_event
|
||||
{}
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1283,6 +1467,13 @@ class Rand_log_event: public Log_event
|
||||
bool write(IO_CACHE* file);
|
||||
#endif
|
||||
bool is_valid() const { return 1; }
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
@ -1306,7 +1497,6 @@ class Xid_log_event: public Log_event
|
||||
Xid_log_event(THD* thd_arg, my_xid x): Log_event(thd_arg,0,0), xid(x) {}
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1320,6 +1510,11 @@ class Xid_log_event: public Log_event
|
||||
bool write(IO_CACHE* file);
|
||||
#endif
|
||||
bool is_valid() const { return 1; }
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
@ -1349,7 +1544,6 @@ public:
|
||||
val_len(val_len_arg), type(type_arg), charset_number(charset_number_arg)
|
||||
{ is_null= !val; }
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
#endif
|
||||
@ -1361,6 +1555,13 @@ public:
|
||||
bool write(IO_CACHE* file);
|
||||
#endif
|
||||
bool is_valid() const { return 1; }
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1375,7 +1576,6 @@ public:
|
||||
#ifndef MYSQL_CLIENT
|
||||
Stop_log_event() :Log_event()
|
||||
{}
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
#endif
|
||||
@ -1386,6 +1586,22 @@ public:
|
||||
~Stop_log_event() {}
|
||||
Log_event_type get_type_code() { return STOP_EVENT;}
|
||||
bool is_valid() const { return 1; }
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli)
|
||||
{
|
||||
/*
|
||||
Events from ourself should be skipped, but they should not
|
||||
decrease the slave skip counter.
|
||||
*/
|
||||
if (this->server_id == ::server_id)
|
||||
return Log_event::EVENT_SKIP_IGNORE;
|
||||
else
|
||||
return Log_event::EVENT_SKIP_NOT;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
@ -1412,7 +1628,6 @@ public:
|
||||
ulonglong pos_arg, uint flags);
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1431,6 +1646,12 @@ public:
|
||||
#ifndef MYSQL_CLIENT
|
||||
bool write(IO_CACHE* file);
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
virtual enum_skip_reason do_shall_skip(RELAY_LOG_INFO *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1465,7 +1686,6 @@ public:
|
||||
bool using_trans);
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1499,6 +1719,11 @@ public:
|
||||
*/
|
||||
bool write_base(IO_CACHE* file);
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1531,7 +1756,6 @@ public:
|
||||
Append_block_log_event(THD* thd, const char* db_arg, char* block_arg,
|
||||
uint block_len_arg, bool using_trans);
|
||||
#ifdef HAVE_REPLICATION
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
void pack_info(Protocol* protocol);
|
||||
virtual int get_create_or_append() const;
|
||||
#endif /* HAVE_REPLICATION */
|
||||
@ -1549,6 +1773,11 @@ public:
|
||||
bool write(IO_CACHE* file);
|
||||
const char* get_db() { return db; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1568,7 +1797,6 @@ public:
|
||||
Delete_file_log_event(THD* thd, const char* db_arg, bool using_trans);
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1585,6 +1813,11 @@ public:
|
||||
bool write(IO_CACHE* file);
|
||||
const char* get_db() { return db; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1604,7 +1837,6 @@ public:
|
||||
Execute_load_log_event(THD* thd, const char* db_arg, bool using_trans);
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1620,6 +1852,11 @@ public:
|
||||
bool write(IO_CACHE* file);
|
||||
const char* get_db() { return db; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -1689,7 +1926,6 @@ public:
|
||||
bool using_trans, bool suppress_use);
|
||||
#ifdef HAVE_REPLICATION
|
||||
void pack_info(Protocol* protocol);
|
||||
int exec_event(struct st_relay_log_info* rli);
|
||||
#endif /* HAVE_REPLICATION */
|
||||
#else
|
||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||
@ -1708,7 +1944,12 @@ public:
|
||||
#ifndef MYSQL_CLIENT
|
||||
bool write_post_header_for_derived(IO_CACHE* file);
|
||||
#endif
|
||||
};
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#ifdef MYSQL_CLIENT
|
||||
@ -1806,7 +2047,6 @@ public:
|
||||
#endif
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int exec_event(struct st_relay_log_info *rli);
|
||||
virtual void pack_info(Protocol *protocol);
|
||||
#endif
|
||||
|
||||
@ -1816,6 +2056,11 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
virtual int do_update_pos(RELAY_LOG_INFO *rli);
|
||||
#endif
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
TABLE *m_table;
|
||||
#endif
|
||||
@ -1899,7 +2144,6 @@ public:
|
||||
flag_set get_flags(flag_set flags) const { return m_flags & flags; }
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int exec_event(struct st_relay_log_info *rli);
|
||||
virtual void pack_info(Protocol *protocol);
|
||||
#endif
|
||||
|
||||
@ -1983,6 +2227,8 @@ protected:
|
||||
private:
|
||||
|
||||
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
|
||||
virtual int do_apply_event(RELAY_LOG_INFO const *rli);
|
||||
|
||||
/*
|
||||
Primitive to prepare for a sequence of row executions.
|
||||
|
||||
@ -2030,7 +2276,7 @@ private:
|
||||
RETURN VALUE
|
||||
Error code, if something went wrong, 0 otherwise.
|
||||
*/
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO*, TABLE*,
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO const*, TABLE*,
|
||||
char const *row_start, char const **row_end) = 0;
|
||||
|
||||
/*
|
||||
@ -2101,7 +2347,7 @@ private:
|
||||
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO*, TABLE*,
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO const*, TABLE*,
|
||||
char const *row_start, char const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
#endif
|
||||
@ -2166,7 +2412,7 @@ private:
|
||||
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO*, TABLE*,
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO const*, TABLE*,
|
||||
char const *row_start, char const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
#endif /* !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION) */
|
||||
@ -2237,7 +2483,7 @@ private:
|
||||
|
||||
virtual int do_before_row_operations(TABLE *table);
|
||||
virtual int do_after_row_operations(TABLE *table, int error);
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO*, TABLE*,
|
||||
virtual int do_prepare_row(THD*, RELAY_LOG_INFO const*, TABLE*,
|
||||
char const *row_start, char const **row_end);
|
||||
virtual int do_exec_row(TABLE *table);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user