← Back to team overview

maria-developers team mailing list archive

Re: 5ff9525ff86: MDEV-22722 Assertion "inited==NONE" failed in handler::ha_index_init on the slave during UPDATE

 

Hi, Sachin!

On Jun 10, Sachin wrote:
> revision-id: 5ff9525ff86 (mariadb-10.5.2-290-g5ff9525ff86)
> parent(s): ff881056b8d
> author: Sachin <sachin.setiya@xxxxxxxxxxx>
> committer: Sachin <sachin.setiya@xxxxxxxxxxx>
> timestamp: 2020-06-07 16:45:01 +0530
> message:
> 
> diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc
> index 5910ece12f0..ffda352c866 100644
> --- a/sql/log_event_server.cc
> +++ b/sql/log_event_server.cc
> @@ -5570,6 +5570,12 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
>    {
>      master_had_triggers= table->master_had_triggers;
>      bool transactional_table= table->file->has_transactions_and_rollback();
> +    if (get_general_type_code() == WRITE_ROWS_EVENT)
> +      table->file->prepare_for_insert(0);
> +    else if (get_general_type_code() == UPDATE_ROWS_EVENT ||
> +             get_general_type_code() == DELETE_ROWS_EVENT)
> +      table->file->prepare_for_insert(1);
> +

You can simplify it as

  table->file->prepare_for_insert(get_general_type_code() != WRITE_ROWS_EVENT);

otherwise ok to push

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx