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