mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
[MDEV-6877] Update Update, Delete and Write row log event
The row events no longer require columns arguments.
This commit is contained in:
@@ -11117,9 +11117,9 @@ void Table_map_log_event::print(FILE *, PRINT_EVENT_INFO *print_event_info)
|
|||||||
#if !defined(MYSQL_CLIENT)
|
#if !defined(MYSQL_CLIENT)
|
||||||
Write_rows_log_event::Write_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
|
Write_rows_log_event::Write_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
|
||||||
ulong tid_arg,
|
ulong tid_arg,
|
||||||
MY_BITMAP const *cols,
|
|
||||||
bool is_transactional)
|
bool is_transactional)
|
||||||
: Rows_log_event(thd_arg, tbl_arg, tid_arg, cols, is_transactional, WRITE_ROWS_EVENT_V1)
|
: Rows_log_event(thd_arg, tbl_arg, tid_arg, tbl_arg->write_set,
|
||||||
|
is_transactional, WRITE_ROWS_EVENT_V1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -12131,9 +12131,9 @@ end:
|
|||||||
|
|
||||||
#ifndef MYSQL_CLIENT
|
#ifndef MYSQL_CLIENT
|
||||||
Delete_rows_log_event::Delete_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
|
Delete_rows_log_event::Delete_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
|
||||||
ulong tid, MY_BITMAP const *cols,
|
ulong tid, bool is_transactional)
|
||||||
bool is_transactional)
|
: Rows_log_event(thd_arg, tbl_arg, tid, tbl_arg->read_set, is_transactional,
|
||||||
: Rows_log_event(thd_arg, tbl_arg, tid, cols, is_transactional, DELETE_ROWS_EVENT_V1)
|
DELETE_ROWS_EVENT_V1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif /* #if !defined(MYSQL_CLIENT) */
|
#endif /* #if !defined(MYSQL_CLIENT) */
|
||||||
@@ -12261,21 +12261,11 @@ uint8 Delete_rows_log_event::get_trg_event_map()
|
|||||||
#if !defined(MYSQL_CLIENT)
|
#if !defined(MYSQL_CLIENT)
|
||||||
Update_rows_log_event::Update_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
|
Update_rows_log_event::Update_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
|
||||||
ulong tid,
|
ulong tid,
|
||||||
MY_BITMAP const *cols_bi,
|
|
||||||
MY_BITMAP const *cols_ai,
|
|
||||||
bool is_transactional)
|
bool is_transactional)
|
||||||
: Rows_log_event(thd_arg, tbl_arg, tid, cols_bi, is_transactional, UPDATE_ROWS_EVENT_V1)
|
: Rows_log_event(thd_arg, tbl_arg, tid, tbl_arg->read_set, is_transactional,
|
||||||
|
UPDATE_ROWS_EVENT_V1)
|
||||||
{
|
{
|
||||||
init(cols_ai);
|
init(tbl_arg->write_set);
|
||||||
}
|
|
||||||
|
|
||||||
Update_rows_log_event::Update_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
|
|
||||||
ulong tid,
|
|
||||||
MY_BITMAP const *cols,
|
|
||||||
bool is_transactional)
|
|
||||||
: Rows_log_event(thd_arg, tbl_arg, tid, cols, is_transactional, UPDATE_ROWS_EVENT_V1)
|
|
||||||
{
|
|
||||||
init(cols);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update_rows_log_event::init(MY_BITMAP const *cols)
|
void Update_rows_log_event::init(MY_BITMAP const *cols)
|
||||||
|
@@ -4519,7 +4519,7 @@ public:
|
|||||||
|
|
||||||
#if defined(MYSQL_SERVER)
|
#if defined(MYSQL_SERVER)
|
||||||
Write_rows_log_event(THD*, TABLE*, ulong table_id,
|
Write_rows_log_event(THD*, TABLE*, ulong table_id,
|
||||||
MY_BITMAP const *cols, bool is_transactional);
|
bool is_transactional);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_REPLICATION
|
#ifdef HAVE_REPLICATION
|
||||||
Write_rows_log_event(const char *buf, uint event_len,
|
Write_rows_log_event(const char *buf, uint event_len,
|
||||||
@@ -4581,12 +4581,6 @@ public:
|
|||||||
|
|
||||||
#ifdef MYSQL_SERVER
|
#ifdef MYSQL_SERVER
|
||||||
Update_rows_log_event(THD*, TABLE*, ulong table_id,
|
Update_rows_log_event(THD*, TABLE*, ulong table_id,
|
||||||
MY_BITMAP const *cols_bi,
|
|
||||||
MY_BITMAP const *cols_ai,
|
|
||||||
bool is_transactional);
|
|
||||||
|
|
||||||
Update_rows_log_event(THD*, TABLE*, ulong table_id,
|
|
||||||
MY_BITMAP const *cols,
|
|
||||||
bool is_transactional);
|
bool is_transactional);
|
||||||
|
|
||||||
void init(MY_BITMAP const *cols);
|
void init(MY_BITMAP const *cols);
|
||||||
@@ -4665,8 +4659,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef MYSQL_SERVER
|
#ifdef MYSQL_SERVER
|
||||||
Delete_rows_log_event(THD*, TABLE*, ulong,
|
Delete_rows_log_event(THD*, TABLE*, ulong, bool is_transactional);
|
||||||
MY_BITMAP const *cols, bool is_transactional);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_REPLICATION
|
#ifdef HAVE_REPLICATION
|
||||||
Delete_rows_log_event(const char *buf, uint event_len,
|
Delete_rows_log_event(const char *buf, uint event_len,
|
||||||
|
@@ -5967,7 +5967,7 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
|
|||||||
{
|
{
|
||||||
/* Create a new RowsEventT... */
|
/* Create a new RowsEventT... */
|
||||||
Rows_log_event* const
|
Rows_log_event* const
|
||||||
ev= new RowsEventT(this, table, table->s->table_map_id,
|
ev= new RowsEventT(this, table, table->s->table_map_id,
|
||||||
is_transactional);
|
is_transactional);
|
||||||
if (unlikely(!ev))
|
if (unlikely(!ev))
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
@@ -6136,7 +6136,7 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
|
|||||||
is_trans= 1;
|
is_trans= 1;
|
||||||
|
|
||||||
Rows_log_event* const ev=
|
Rows_log_event* const ev=
|
||||||
binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt,
|
binlog_prepare_pending_rows_event(table, variables.server_id,
|
||||||
len, is_trans,
|
len, is_trans,
|
||||||
static_cast<Write_rows_log_event*>(0));
|
static_cast<Write_rows_log_event*>(0));
|
||||||
|
|
||||||
@@ -6185,9 +6185,9 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
Rows_log_event* const ev=
|
Rows_log_event* const ev=
|
||||||
binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt,
|
binlog_prepare_pending_rows_event(table, variables.server_id,
|
||||||
before_size + after_size, is_trans,
|
before_size + after_size, is_trans,
|
||||||
static_cast<Update_rows_log_event*>(0));
|
static_cast<Update_rows_log_event*>(0));
|
||||||
|
|
||||||
if (unlikely(ev == 0))
|
if (unlikely(ev == 0))
|
||||||
return HA_ERR_OUT_OF_MEM;
|
return HA_ERR_OUT_OF_MEM;
|
||||||
@@ -6221,9 +6221,9 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
|
|||||||
is_trans= 1;
|
is_trans= 1;
|
||||||
|
|
||||||
Rows_log_event* const ev=
|
Rows_log_event* const ev=
|
||||||
binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt,
|
binlog_prepare_pending_rows_event(table, variables.server_id,
|
||||||
len, is_trans,
|
len, is_trans,
|
||||||
static_cast<Delete_rows_log_event*>(0));
|
static_cast<Delete_rows_log_event*>(0));
|
||||||
|
|
||||||
if (unlikely(ev == 0))
|
if (unlikely(ev == 0))
|
||||||
return HA_ERR_OUT_OF_MEM;
|
return HA_ERR_OUT_OF_MEM;
|
||||||
|
Reference in New Issue
Block a user