Bug #41969 | With 5.1.30 & Mixed replication, mysql doesn't seem to delete temp files | ||
---|---|---|---|
Submitted: | 8 Jan 2009 15:20 | Modified: | 12 Jan 2009 10:33 |
Reporter: | jocelyn fournier (Silver Quality Contributor) | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 5.1.30 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | qc |
[8 Jan 2009 15:20]
jocelyn fournier
[8 Jan 2009 17:10]
jocelyn fournier
Hi, A simple way to reproduce the bug : On the master, execute the following : use test; CREATE TEMPORARY TABLE t1 SELECT 1; INSERT INTO t1 SELECT 1 LIMIT 1; DROP TEMPORARY TABLE t1; With this sequence, the temp file will not be deleted on the slaves. Note if you try to execute those queries on the slave, you will have a warning for the insert : mysql> INSERT INTO t1 SELECT 1 LIMIT 1; Query OK, 1 row affected, 1 warning (0.00 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> SHOW WARNINGS; +---------+------+---------------------------------------------------+ | Level | Code | Message | +---------+------+---------------------------------------------------+ | Warning | 1592 | Statement is not safe to log in statement format. | +---------+------+---------------------------------------------------+ 1 row in set (0.00 sec) If you remove the LIMIT 1, the warning disappears, as well as the temp file bug issue. Regards, Jocelyn Fournier
[8 Jan 2009 17:16]
jocelyn fournier
Something is wrong in my first message : the master is configured in MIXED replication mode.
[8 Jan 2009 17:22]
jocelyn fournier
I confirmed the problem is not reproducable in STATEMENT binlog mode, only in MIXED binlog mode.
[8 Jan 2009 17:53]
jocelyn fournier
It seems to be the same issue than http://bugs.mysql.com/bug.php?id=40013
[8 Jan 2009 19:02]
MySQL Verification Team
I agree with you looks duplicate of http://bugs.mysql.com/bug.php?id=40013. So you agree to mark this bug as duplicate of that one?. Thanks in advance.
[8 Jan 2009 21:50]
jocelyn fournier
Actually what's not clear for me is why INSERT INTO t1 SELECT 1 LIMIT 1; is considered as not safe to log in statement format and hence why MySQL is switching in ROW binlog format ?
[9 Jan 2009 10:14]
jocelyn fournier
Note that even if an ORDER BY is added in this kind of INSERT ... SELECT query, and hence is deterministic, it still considered as not statement safe.
[12 Jan 2009 10:32]
Susanne Ebrecht
Jocelyn, LIMIT is non deterministic. Anyway, that has nothing to do with the original report. I will set this as duplicate of bug #40013 now. Please, feel free to reopen this bug report, when you disagree that this is a duplicate.