Hello Jan,

Please find the detailed explanation here

https://jira.mariadb.org/browse/MDEV-21153?focusedCommentId=176249&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-176249

Thank you

S.Sujatha

On 04/01/21 3:47 pm, Jan Lindström wrote:
Hi Sujatha,

On Mon, Jan 4, 2021 at 11:45 AM sujatha <sujatha.sivakumar@mariadb.com> wrote:

+    for (TABLE_LIST *tables= rgi->tables_to_lock; tables;
+         tables= tables->next_global)
+    {
+      if (slave_run_triggers_for_rbr)
       {
         tables->trg_event_map= new_trg_event_map;
         lex->query_tables_last= &tables->next_global;
       }
+      else if (!WSREP_ON)
+      {
+        tables->slave_fk_event_map= new_trg_event_map;
+        lex->query_tables_last= &tables->next_global;
+      }

Why is prelocking not done when WSREP_ON ? (or WSREP(thd) ) In my opinion it should be reasoned here with comment, many of our customers actually use Galera as master-slave setup. Did you test your testcase with Galera setup and did you check Galera test results on bb ?
 
Regards,
  Jan