diff options
author | sjaakola <seppo.jaakola@iki.fi> | 2017-02-16 23:19:10 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2017-08-11 13:23:51 +0300 |
commit | 7ef2d5aa5b5d0179d40bd42afea874235b8b60f8 (patch) | |
tree | fd6a5094243c31e603ef65c77f582d7867aba18a /sql/wsrep_mysqld.h | |
parent | 364b15c090e7337eb752eec4bea239052f73b2ed (diff) | |
download | mariadb-git-7ef2d5aa5b5d0179d40bd42afea874235b8b60f8.tar.gz |
Refs: MW-360 * splitting DROP TABLE query in separate DROP commands for temporary and real tables * not replicating temporary table DROP command * using wsrep_sidno GTID group only for innodb table drop command part all this follows more or less the logic of how mysql wants to split drop table list
Diffstat (limited to 'sql/wsrep_mysqld.h')
-rw-r--r-- | sql/wsrep_mysqld.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 5ec183f7186..fa069723021 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -254,6 +254,8 @@ extern wsrep_seqno_t wsrep_locked_seqno; #define WSREP_PROVIDER_EXISTS \ (wsrep_provider && strncasecmp(wsrep_provider, WSREP_NONE, FN_REFLEN)) +#define WSREP_QUERY(thd) (thd->query()) + extern void wsrep_ready_wait(); enum wsrep_trx_status { @@ -318,7 +320,7 @@ extern PSI_mutex_key key_LOCK_wsrep_slave_threads; extern PSI_mutex_key key_LOCK_wsrep_desync; #endif /* HAVE_PSI_INTERFACE */ struct TABLE_LIST; -int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, +int wsrep_to_isolation_begin(THD *thd, const char * query, char *db_, char *table_, const TABLE_LIST* table_list); void wsrep_to_isolation_end(THD *thd); void wsrep_cleanup_transaction(THD *thd); @@ -335,4 +337,26 @@ void wsrep_init_sidno(const wsrep_uuid_t&); bool wsrep_node_is_donor(); bool wsrep_node_is_synced(); +int wsrep_replicate_drop_query(THD *thd, TABLE_LIST *tables, bool if_exists, + bool drop_temporary, bool dont_log_query); + + +#define WSREP_MYSQL_DB (char *)"mysql" +#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \ + if (WSREP(thd) && wsrep_to_isolation_begin(thd, NULL, db_, table_, table_list_)) goto error; + +#define WSREP_TO_ISOLATION_BEGIN_QUERY(query, db_, table_, table_list_) \ + (WSREP(thd) && wsrep_to_isolation_begin(thd, query, db_, table_, table_list_)) + +#define WSREP_TO_ISOLATION_END \ + if (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER)) \ + wsrep_to_isolation_end(thd); + +/* Checks if lex->no_write_to_binlog is set for statements that use + LOCAL or NO_WRITE_TO_BINLOG +*/ +#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \ + if (WSREP(thd) && !thd->lex->no_write_to_binlog \ + && wsrep_to_isolation_begin(thd, NULL, db_, table_, table_list_)) goto error; + #endif /* WSREP_MYSQLD_H */ |