diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2012-04-26 20:18:30 +0300 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2012-04-26 20:18:30 +0300 |
commit | 609388fcfd912c9c2cb03a92251469a25a781893 (patch) | |
tree | 9135fdc6e31e1e784fbdbcc35ae63003d0600824 /sql/sql_base.cc | |
parent | e0015163515d1fe5d3747c6f859461a30c2ecfd6 (diff) | |
download | mariadb-git-609388fcfd912c9c2cb03a92251469a25a781893.tar.gz |
Merged changes from lp:codership-mysql up to rev 3743
-r3725..3737
-r3738..3740
-r3741..3743
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d4aeedeb852..da93cfeb001 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -62,6 +62,7 @@ #ifdef WITH_WSREP #include "wsrep_mysqld.h" + #endif // WITH_WSREP bool @@ -5077,6 +5078,24 @@ restart: } } } +#ifdef WITH_WSREP +#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \ + if (WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto err; + + if ((thd->lex->sql_command== SQLCOM_INSERT || + thd->lex->sql_command== SQLCOM_INSERT_SELECT || + thd->lex->sql_command== SQLCOM_REPLACE || + thd->lex->sql_command== SQLCOM_REPLACE_SELECT || + thd->lex->sql_command== SQLCOM_UPDATE || + thd->lex->sql_command== SQLCOM_UPDATE_MULTI || + thd->lex->sql_command== SQLCOM_LOAD || + thd->lex->sql_command== SQLCOM_DELETE) && + wsrep_replicate_myisam && + (*start)->table && (*start)->table->file->ht->db_type == DB_TYPE_MYISAM) + { + WSREP_TO_ISOLATION_BEGIN(NULL, NULL, (*start)); + } +#endif err: #ifdef WITH_WSREP |