summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Malyavin <nikitamalyavin@gmail.com>2022-10-13 18:08:48 +0300
committerNikita Malyavin <nikitamalyavin@gmail.com>2023-04-18 00:29:51 +0300
commitc8de82d90b8ffadbbf2046d5c23eb104fdfc36c6 (patch)
treea7e3d2f80e8ec984c6c13a84df7ef70dd4d5a68f
parent3e613918a0e81630ff30a8120a2ca0df8eab18e9 (diff)
downloadmariadb-git-c8de82d90b8ffadbbf2046d5c23eb104fdfc36c6.tar.gz
few rgi assertions. this can proof that rgi is always present
-rw-r--r--sql/log_event_server.cc3
-rw-r--r--sql/rpl_record.cc3
2 files changed, 4 insertions, 2 deletions
diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc
index c7ec6476b27..4d50a09c256 100644
--- a/sql/log_event_server.cc
+++ b/sql/log_event_server.cc
@@ -4696,6 +4696,7 @@ inline void restore_empty_query_table_list(LEX *lex)
int Rows_log_event::do_apply_event(rpl_group_info *rgi)
{
+ DBUG_ASSERT(rgi);
Relay_log_info const *rli= rgi->rli;
TABLE* table;
DBUG_ENTER("Rows_log_event::do_apply_event(Relay_log_info*)");
@@ -5015,7 +5016,7 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
set_flags(COMPLETE_ROWS_F);
Rpl_table_data rpl_data{};
- if (rgi) rgi->get_table_data(table, &rpl_data);
+ rgi->get_table_data(table, &rpl_data);
/*
Set tables write and read sets.
diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc
index 9d72e25b7df..da05fc31078 100644
--- a/sql/rpl_record.cc
+++ b/sql/rpl_record.cc
@@ -165,7 +165,7 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
unpack a row from from the backup image, but can be used for other
purposes as well.
- @param rli Relay log info, which can be NULL
+ @param rgi Relay group info
@param table Table to unpack into
@param colcnt Number of columns to read from record
@param row_data
@@ -231,6 +231,7 @@ int unpack_row(rpl_group_info *rgi, TABLE *table, uint const colcnt,
table_found, tabledef, conv_table));
DBUG_ASSERT(table_found);
+ DBUG_ASSERT(rgi);
/*
If rgi is NULL it means that there is no source table and that the
row shall just be unpacked without doing any checks. This feature