summaryrefslogtreecommitdiff
path: root/sql/log.h
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2009-11-03 19:02:56 +0000
committerAlfranio Correia <alfranio.correia@sun.com>2009-11-03 19:02:56 +0000
commit19c380aaff1f1f3c0d21ac0c18904c21d7bdce76 (patch)
tree0e262b0d25432c224e2d4c8e1a1d608f78444771 /sql/log.h
parent97565b8d1ab24b6f861300c75a4f4f3c7d711be6 (diff)
downloadmariadb-git-19c380aaff1f1f3c0d21ac0c18904c21d7bdce76.tar.gz
WL#2687 WL#5072 BUG#40278 BUG#47175
Non-transactional updates that take place inside a transaction present problems for logging because they are visible to other clients before the transaction is committed, and they are not rolled back even if the transaction is rolled back. It is not always possible to log correctly in statement format when both transactional and non-transactional tables are used in the same transaction. In the current patch, we ensure that such scenario is completely safe under the ROW and MIXED modes.
Diffstat (limited to 'sql/log.h')
-rw-r--r--sql/log.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/log.h b/sql/log.h
index a31be6dcce6..40695ed2d2d 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -20,6 +20,9 @@ class Relay_log_info;
class Format_description_log_event;
+bool trans_has_updated_trans_table(THD* thd);
+bool stmt_has_updated_trans_table(THD *thd);
+
/*
Transaction Coordinator log - a base abstract class
for two different implementations
@@ -329,8 +332,9 @@ public:
ulonglong table_map_version() const { return m_table_map_version; }
void update_table_map_version() { ++m_table_map_version; }
- int flush_and_set_pending_rows_event(THD *thd, Rows_log_event* event);
- int remove_pending_rows_event(THD *thd);
+ int flush_and_set_pending_rows_event(THD *thd, Rows_log_event* event,
+ bool is_transactional);
+ int remove_pending_rows_event(THD *thd, bool is_transactional);
#endif /* !defined(MYSQL_CLIENT) */
void reset_bytes_written()
@@ -368,7 +372,7 @@ public:
/* Use this to start writing a new log file */
void new_file();
- bool write(Log_event* event_info); // binary log write
+ bool write(Log_event* event_info);
bool write(THD *thd, IO_CACHE *cache, Log_event *commit_event, bool incident);
bool write_incident(THD *thd, bool lock);