[MDEV-20091] DROP TEMPORARY table is logged despite no CREATE was logged Created: 2019-07-18  Updated: 2020-08-25  Resolved: 2019-07-25

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.1, 10.2, 10.3, 10.4
Fix Version/s: 10.2.26, 10.1.41, 10.3.17, 10.4.7

Type: Bug Priority: Critical
Reporter: Andrei Elkin Assignee: Sujatha Sivakumar (Inactive)
Resolution: Fixed Votes: 0
Labels: temporary-table-replication

Issue Links:
Relates
relates to MDEV-17863 DROP TEMPORARY TABLE creates a transa... Closed

 Description   

commit c4bb7cd6dcd83a8c1dc15794d51cfacd10980855
Date: Thu Mar 20 00:59:13 2014 +0200

Fix for MDEV-5589: "Discrepancy in binlog on half-failed CREATE OR REPLACE"

'added code for not logging DROP TEMPORARY TABLE for tables where the CREATE TABLE was not logged. '

However the DROP query gets logged into binary log despite the fact of no CREATE was logged.

--connect (one,...)
set @@binlog_format=row;
drop temporary table if exists tt;
show binlog events; # =>
 
| master-bin.000001 | 371 | Query             |         1 |         485 | use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `tt` |

The connection close also create the DROP event in binlog.



 Comments   
Comment by Sujatha Sivakumar (Inactive) [ 2019-07-25 ]

Fix has been pushed to 10.1.41 version.

The patch is different in 10.2+ versions.
10.2 patch: https://github.com/MariaDB/server/commit/30572113f1e0d93c22301d26b265e4abbc5cdbd1

10.3 patch: https://github.com/MariaDB/server/commit/b218a17cd1bcae4f6fbe66f4f1bce5527cf55b07

10.4 patch: https://github.com/MariaDB/server/commit/a6bef8ea0737ee2286afdc30c60e3bb9004489de

Generated at Thu Feb 08 08:56:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.