Opened 8 years ago

Closed 5 years ago

#151 closed enhancement (fixed)

look into mixed replication etc.

Reported by: geofft Owned by:
Priority: normal Milestone:
Component: sql Keywords:
Cc:

Description

MySQL supports two major replication formats: statement-based, where the query is logged and replayed, and row-based, where the changed data is logged and replayed. Statement-based is much older and presumed more stable, and the default in 5.x; row-based handles a couple of nondeterministic queries that statement-based replication can't. MySQL 5.1.8 also introduced mixed-format logging, which uses statement-based replication where it can and row-based where necessary. 5.1.12 made mixed replication the default, until it was reverted in 5.1.29 on the grounds that 5.1 should be compatible with 5.0. We should decide on our own whether we want to use mixed replication (I think there's no compelling need to switch to row-based replication for everything). Among other obvious benefits, more reliable replication means that backups are more likely to match what you see on the primary.

Relatedly, MySQL used to permit users to set a session variable, `binlog_format`, to switch logging types for the duration of that session. However, this ability was restricted to users with the SUPER privilege (which has always been required for setting that as a _global_ variable), because someone claimed that DBAs might write code that required row-based replication and didn't want a mere user to be able to switch to statement-based replication and foil the DBA's plans. While I question the validity of such a possibility, we certainly don't have DBAs, so it might be worth locally reverting that patch so that users and applications have the option of switching to row-based replication if they prefer it. This would be especially important if we go through autoinstalled apps to see what, if anything, wouldn't work properly statement-based replication.

Change History (1)

comment:1 Changed 5 years ago by achernya

  • Resolution set to fixed
  • Status changed from new to closed

As of today, sql.mit.edu runs in mixed-mode replication, the default for later releases of the 5.1 series.

Note: See TracTickets for help on using tickets.