Assertion `state() == s_aborting || state() == s_must_replay' failed on pxc node while replicating CTAS

Description

PXC node hits the assertion failure, mysqld gets signal 6 while replicating CREATE TABLE AS SELECT from source ps (8.0 latest and above versions). It's because of the change in the way CTAS is logged in the binary log in 8.0 server when compared to 5.7 server.

Steps to reproduce:

  1. Setup a source PS server (say 8.0.39).

  2. Configure PXC cluster with 3 nodes.

  3. Configure replication channel on one of the PXC nodes to replicate from the source PS server and ensure that replication channel is up and nothing IO and SQL threads are running fine.
    mysql>change replication source to source_host='localhost', source_port=<port_num>, source_user='root';
    mysql>start replica;
    mysql>show replica status\G

  4. Execute the Below Transactions on the source PS node:
    mysql>create database db1;
    mysql>use db1;
    mysql>create table t(a int primary key);
    mysql>insert into t values(21);
    mysql>create table t2 as select * from t;

Environment

None

Activity

Show:

Details

Assignee

Reporter

Needs QA

Affects versions

Priority

Smart Checklist

Created October 30, 2024 at 8:01 AM
Updated October 30, 2024 at 8:01 AM