Commit graph

6 commits

Author SHA1 Message Date
Alfranio Correia
9ba731c299 BUG#51894 Replication failure with SBR on DROP TEMPORARY TABLE inside a
transaction
BUG#52616 Temp table prevents switch binlog format from STATEMENT to ROW

Before the WL#2687 and BUG#46364, every non-transactional change that happened
after a transactional change was written to trx-cache and flushed upon
committing the transaction. WL#2687 and BUG#46364 changed this behavior and
non-transactional changes are now written to the binary log upon committing
the statement.

A binary log event is identified as transactional or non-transactional through
a flag in the Log_event which is set taking into account the underlie storage
engine on what it is stems from. In the current bug, this flag was not being
set properly when the DROP TEMPORARY TABLE was executed.

However, while fixing this bug we figured out that changes to temporary tables
should be always written to the trx-cache if there is an on-going transaction.
Otherwise, binlog events in the reversed order would be produced.

Regarding concurrency, keeping changes to temporary tables in the trx-cache is
also safe as temporary tables are only visible to the owner connection.

In this patch, we classify the following statements as unsafe:
   1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp

   2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam

   3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam

On the other hand, the following statements are classified as safe:

   1 - INSERT INTO t_innodb SELECT * FROM t_myisam_temp

   2 - INSERT INTO t_myisam_temp SELECT * FROM t_innodb

The patch also guarantees that transactions that have a DROP TEMPORARY are
always written to the binary log regardless of the mode and the outcome:
commit or rollback. In particular, the DROP TEMPORARY is extended with the
IF EXISTS clause when the current statement logging format is set to row.

Finally, the patch allows to switch from STATEMENT to MIXED/ROW when there
are temporary tables but the contrary is not possible.
2010-04-20 10:10:43 +01:00
Andrei Elkin
c03549bf05 WL#342 heartbeat
backporting from 6.0 code base to 5.1.
2009-09-29 14:16:23 +03:00
cbell/Chuck@mysql_cab_desk.
537c23e833 WL#3228 (NDB) : RBR using different table defs on slave/master
This patch adds the ability to store extra field metadata in the table
map event. This data can include pack_length() or field_lenght() for
fields such as CHAR or VARCHAR enabling developers to add code that
can check for compatibilty between master and slave columns. More 
importantly, the extra field metadata can be used to store data from the
master correctly should a VARCHAR field on the master be <= 255 bytes 
while the same field on the slave is > 255 bytes. 

The patch also includes the needed changes to unpack to ensure that data
which is smaller on the master can be unpacked correctly on the slave.

WL#3915 : (NDB) master's cols > slave

Slave starts accepting and handling rows of master's tables which have more columns.
The most important part of implementation is how to caclulate the amount of bytes to
skip for unknown by slave column.
2007-07-29 18:10:42 -04:00
mats@kindahl-laptop.dnsalias.net
ef36039db6 BUG#29809 (Slave SQL errors in warnings file):
Adding code to filter out slave SQL errors since these are checked by
the tests themselves.
2007-07-26 16:44:57 +02:00
msvensson@pilot.(none)
2238ef2b62 Merge pilot.(none):/data/msvensson/mysql/wl3933/my51-wl3933-new2
into  pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
2007-06-27 14:29:10 +02:00
msvensson@pilot.(none)
8661497e9b WL#3933 Split main test suite to rpl, rpl_ndb and ndb
- Update mysql-test-run.pl to collect tests from several suites
 - Group test into suites
 - Add suite.opt file
2007-06-27 14:28:02 +02:00
Renamed from mysql-test/r/rpl_truncate_7ndb.result (Browse further)