[PS8QA] Assertion `!drop_ctx->has_tmp_trans_tables()' failed in rm_table_eval_gtid_and_table_groups_state(THD*, Drop_tables_ctx*)

Description

Testcase

GDB info

Environment

None

Smart Checklist

Activity

Show:

Kamil Holubicki October 22, 2019 at 7:30 AM

Fix ready. To be merged after 8.0.18 release.

Kamil Holubicki October 17, 2019 at 9:38 AM

Short:

Assertion is wrong. It should check if there are any temporary tables that should be logged to binlog, not if there are any temporary tables.

Long:

This is handling of corner case when:

  1. gtid_next is set to GTID value

  2. DROP statement with temporary and non-temporary tables is executed

  3. row-based logging is enabled

Theoretically such transaction should not be logged by master. It would be split into 2 separate transactions.

However there are still at least 2 cases when it can happen:

  1. Simulate replicated transaction by invoking DROP with 2 such tables directly on slave

  2. Create t1, t2 as non-temporary tables on master, then replicate to slave. Next drop t1, t2 from slave and create t1, t2 on slave only using stored procedure. This scenario is strange, however rpl_gtid_split_statements.test performs such scenario.

If slave uses SBL, case 1 above will issue the error (2 tables would be logged to binlog, but as separate transactions using the same GTID, which is not allowed).

If slave uses SBL, case 2 will still work, as temporary tables created by stored procedures are not logged even if SBL is used.

If slave uses RBL, case 1 will cause only non-temporary table to be logged, temporary table will be just dropped without logging.

8.0 fix: https://github.com/percona/percona-server/pull/3466

George Lorch August 8, 2019 at 6:45 PM

Verified still exists in 8.0.16

Peter Schwaller December 19, 2018 at 1:25 PM

8.0 triage - Fix if Time.

roel.vandepaar December 19, 2018 at 2:45 AM

Thank you for the core analysis. 

Done

Details

Assignee

Reporter

Time tracking

4d 44m logged

Fix versions

Affects versions

Priority

Smart Checklist

Created December 18, 2018 at 5:58 PM
Updated March 6, 2024 at 12:33 PM
Resolved November 8, 2019 at 9:16 AM