Bug #20522 RBR: CREATE TEMPORARY TABLE SELECT writes to binlog though unneeded
Submitted: 18 Jun 2006 16:48 Modified: 20 Jul 2006 17:53
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:5.1-bk OS:Linux (Linux)
Assigned to: Guilhem Bichot CPU Architecture:Any

[18 Jun 2006 16:48] Guilhem Bichot
Description:
When mysqld is running in row-based binlogging mode,
create temporary table ttt select 1;
writes to binlog:
CREATE TEMPORARY TABLE `ttt` (
`1` bigint(1) NOT NULL DEFAULT '0'
)
This is not needed (temp tables are not replicated in RBR, e.g. if they was no SELECT it would not be binlogged).

How to repeat:
see description
[20 Jun 2006 8:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/7907
[11 Jul 2006 8:25] Guilhem Bichot
Pushed into replication team tree 5.1, will be in 5.1.12.
Probably nothing to document as it's just one superfluous statement in the binlog (removed by this patch) which could not hurt.
ChangeSet
  guilhem@mysql.com|ChangeSet|20060620084036|31162    2006/06/20 10:40:36+02:00 guilhem@mysql.com +4 -0
  Fix for BUG#20522 "RBR: CREATE TEMPORARY TABLE SELECT writes to binlog
  though unneeded". It's indeed unneeded, as slave is only interested in
  permanent tables, and permanent tables don't depend on temporary tables
  when in row-based binlogging mode. And other CREATE TEMPORARY TABLE
  (referring no table or with LIKE) already don't write the CREATE to
  binlog in row-based mode.
[20 Jul 2006 17:53] Paul DuBois
No changelog entry needed.