mariadb/mysql-test/suite
Alfranio Correia c9221a2a6f BUG#53259 Unsafe statement binlogged in statement format w/MyIsam temp tables
BUG#54872 MBR: replication failure caused by using tmp table inside transaction 
      
Changed criteria to classify a statement as unsafe in order to reduce the
number of spurious warnings. So a statement is classified as unsafe when
there is on-going transaction at any point of the execution if:

1. The mixed statement is about to update a transactional table and
a non-transactional table.

2. The mixed statement is about to update a temporary transactional
table and a non-transactional table.
      
3. The mixed statement is about to update a transactional table and
read from a non-transactional table.

4. The mixed statement is about to update a temporary transactional
table and read from a non-transactional table.

5. The mixed statement is about to update a non-transactional table
and read from a transactional table when the isolation level is
lower than repeatable read.

After updating a transactional table if:

6. The mixed statement is about to update a non-transactional table
and read from a temporary transactional table.
 
7. The mixed statement is about to update a non-transactional table
 and read from a temporary transactional table.

8. The mixed statement is about to update a non-transactionala table
   and read from a temporary non-transactional table.
     
9. The mixed statement is about to update a temporary non-transactional
table and update a non-transactional table.
     
10. The mixed statement is about to update a temporary non-transactional
table and read from a non-transactional table.
     
11. A statement is about to update a non-transactional table and the
option variables.binlog_direct_non_trans_update is OFF.

The reason for this is that locks acquired may not protected a concurrent
transaction of interfering in the current execution and by consequence in
the result. So the patch reduced the number of spurious unsafe warnings.

Besides we fixed a regression caused by BUG#51894, which makes temporary
tables to go into the trx-cache if there is an on-going transaction. In
MIXED mode, the patch for BUG#51894 ignores that the trx-cache may have
updates to temporary non-transactional tables that must be written to the
binary log while rolling back the transaction.
      
So we fix this problem by writing the content of the trx-cache to the
binary log while rolling back a transaction if a non-transactional
temporary table was updated and the binary logging format is MIXED.
2010-06-30 16:25:13 +01:00
..
binlog BUG#53259 Unsafe statement binlogged in statement format w/MyIsam temp tables 2010-06-30 16:25:13 +01:00
bugs Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
engines Manual merge 2010-05-26 22:34:25 +08:00
federated Bug #53261 MTR tests archive_plugin and blackhole_plugin fail when compiling with cmake 2010-06-14 11:23:49 +02:00
funcs_1 WL#5349 Change default storage engine to InnoDB 2010-06-17 22:51:35 +02:00
funcs_2 merge 5.0-> 5.1 2009-04-24 13:00:17 -04:00
ibmdb2i Bug#49329 example (and other) engines use wrong collation for open tables hash 2009-12-11 12:31:16 +05:30
innodb Post-push fixup for WL#5349 2010-06-20 22:43:34 +02:00
jp WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
large_tests bug#50296 2010-02-28 19:39:28 +02:00
manual Bug #49741 test files contain explicit references to bin/relay-log positions 2010-05-24 21:54:08 +08:00
ndb BUG#53259 Unsafe statement binlogged in statement format w/MyIsam temp tables 2010-06-30 16:25:13 +01:00
ndb_team Manual merge 2010-05-26 22:34:25 +08:00
parts WL#5349 Change default storage engine to InnoDB 2010-06-17 22:51:35 +02:00
perfschema Post-push fixups for WL#5349 2010-06-22 12:13:47 +02:00
perfschema_stress WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
rpl BUG#53259 Unsafe statement binlogged in statement format w/MyIsam temp tables 2010-06-30 16:25:13 +01:00
rpl_ndb Manual merge from mysql-trunk-bugfixing. 2010-06-07 12:47:04 +04:00
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
sys_vars Post-push fixup for WL#5349 2010-06-20 22:43:34 +02:00