diff options
author | Alfranio Correia <alfranio.correia@sun.com> | 2010-08-02 20:48:56 +0100 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@sun.com> | 2010-08-02 20:48:56 +0100 |
commit | 1feee134fdc346bb1ad73cce54cd7e87df5c839a (patch) | |
tree | 363a0395eb448a1b3c5f37f8125af5e5d7f7ba1d /sql/log.h | |
parent | 2aee4d8ddd736642488c5ed32fe2d2fd46061596 (diff) | |
download | mariadb-git-1feee134fdc346bb1ad73cce54cd7e87df5c839a.tar.gz |
BUG#55625 RBR breaks on failing 'CREATE TABLE'
A CREATE...SELECT that fails is written to the binary log if a non-transactional
statement is updated. If the logging format is ROW, the CREATE statement and the
changes are written to the binary log as distinct events and by consequence the
created table is not rolled back in the slave.
In this patch, we opted to let the slave goes out of sync by not writting to the
binary log the CREATE statement. We do this by simply reseting the binary log's
cache.
Diffstat (limited to 'sql/log.h')
-rw-r--r-- | sql/log.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/log.h b/sql/log.h index 8d3880d9171..8f1ed7ee90c 100644 --- a/sql/log.h +++ b/sql/log.h @@ -356,10 +356,11 @@ public: /* Use this to start writing a new log file */ void new_file(); + void reset_gathered_updates(THD *thd); bool write(Log_event* event_info); // binary log write bool write(THD *thd, IO_CACHE *cache, Log_event *commit_event, bool incident); - bool write_incident(THD *thd, bool lock); + bool write_incident(THD *thd, bool lock); int write_cache(IO_CACHE *cache, bool lock_log, bool flush_and_sync); void set_write_error(THD *thd); bool check_write_error(THD *thd); |