diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-05-28 09:47:58 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-05-28 09:47:58 +0400 |
commit | 59a99129634a020bc618324db1c36f36f9e14493 (patch) | |
tree | 88543c956886365a2376e01ce26a0436c38a4454 /sql/log_event.h | |
parent | 7758bdc8aad36927db408b4bc9546d39ef646c3c (diff) | |
parent | eb27f163a31ca6995c98ada9fc678176c041dd93 (diff) | |
download | mariadb-git-59a99129634a020bc618324db1c36f36f9e14493.tar.gz |
Auto-merge from mysql-trunk.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index e281fd6e206..bd95c74b6c5 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -469,10 +469,10 @@ struct sql_ex_info #define LOG_EVENT_SUPPRESS_USE_F 0x8 /* - The table map version internal to the log should be increased after - the event has been written to the binary log. + Note: this is a place holder for the flag + LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F (0x10), which is not used any + more, please do not reused this value for other flags. */ -#define LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F 0x10 /** @def LOG_EVENT_ARTIFICIAL_F @@ -1746,6 +1746,28 @@ public: /* !!! Public in this patch to allow old usage */ const char *query_arg, uint32 q_len_arg); #endif /* HAVE_REPLICATION */ + /* + If true, the event always be applied by slave SQL thread or be printed by + mysqlbinlog + */ + bool is_trans_keyword() + { + /* + Before the patch for bug#50407, The 'SAVEPOINT and ROLLBACK TO' + queries input by user was written into log events directly. + So the keywords can be written in both upper case and lower case + together, strncasecmp is used to check both cases. they also could be + binlogged with comments in the front of these keywords. for examples: + / * bla bla * / SAVEPOINT a; + / * bla bla * / ROLLBACK TO a; + but we don't handle these cases and after the patch, both quiries are + binlogged in upper case with no comments. + */ + return !strncmp(query, "BEGIN", q_len) || + !strncmp(query, "COMMIT", q_len) || + !strncasecmp(query, "SAVEPOINT", 9) || + !strncasecmp(query, "ROLLBACK", 8); + } }; |