summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <aelkin/elkin@dsl-hkibras-fe38f900-157.dhcp.inet.fi>2007-08-21 15:16:55 +0300
committerunknown <aelkin/elkin@dsl-hkibras-fe38f900-157.dhcp.inet.fi>2007-08-21 15:16:55 +0300
commita0849011471dd15c2789436ed57350691e030101 (patch)
treecb201a6c029b05020c4790691ebe0f99dc86fd7b /sql/sql_delete.cc
parent8c5bb9da94ad58559506ed50bd4d7a2853d58d6f (diff)
downloadmariadb-git-a0849011471dd15c2789436ed57350691e030101.tar.gz
Bug #23333 stored function + non-transac table + transac table = breaks stmt-based binlog
Binlogging of the statement with a side effect like a modified non-trans table did not happen. The artifact involved all binloggable dml queries. Fixed with changing the binlogging conditions all over the code to exploit thd->transaction.stmt.modified_non_trans_table introduced by the patch for bug@27417. Multi-delete case has own specific addressed by another bug@29136. Multi-update case has been addressed by bug#27716 and patch and will need merging. mysql-test/r/mix_innodb_myisam_binlog.result: results changed mysql-test/r/sp_trans_log.result: results changed mysql-test/t/mix_innodb_myisam_binlog.test: specific to the bug tests added mysql-test/t/sp_trans_log.test: refining of the proof of that there is an event in binlog sql/sql_delete.cc: deploying the binlogging check with thd->transaction.stmt.modified_non_trans_table sql/sql_insert.cc: binlogging when thd->transaction.stmt.modified_non_trans_table is TRUE. Merge with Bug#29571. sql/sql_load.cc: binlogging when thd->transaction.stmt.modified_non_trans_table is true sql/sql_update.cc: binlogging when thd->transaction.stmt.modified_non_trans_table is true
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 56edfa6c5b2..7555219f5d8 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -319,7 +319,7 @@ cleanup:
thd->transaction.stmt.modified_non_trans_table= TRUE;
/* See similar binlogging code in sql_update.cc, for comments */
- if ((error < 0) || (deleted && !transactional_table))
+ if ((error < 0) || thd->transaction.stmt.modified_non_trans_table)
{
if (mysql_bin_log.is_open())
{
@@ -817,7 +817,8 @@ bool multi_delete::send_eof()
{
query_cache_invalidate3(thd, delete_tables, 1);
}
- if ((local_error == 0) || (deleted && normal_tables))
+ DBUG_ASSERT(!normal_tables || !deleted || thd->transaction.stmt.modified_non_trans_table);
+ if ((local_error == 0) || thd->transaction.stmt.modified_non_trans_table)
{
if (mysql_bin_log.is_open())
{
@@ -831,7 +832,6 @@ bool multi_delete::send_eof()
if (thd->transaction.stmt.modified_non_trans_table)
thd->transaction.all.modified_non_trans_table= TRUE;
}
- DBUG_ASSERT(!normal_tables || !deleted || thd->transaction.stmt.modified_non_trans_table);
/* Commit or rollback the current SQL statement */
if (transactional_tables)