diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-02-03 22:55:46 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-02-03 22:55:46 -0500 |
commit | 7ca53d947959fe420c28400c621f427b3008fe19 (patch) | |
tree | 89015270bb4f7a4c1b833e69ed7d973a55d57060 /sql/wsrep_hton.cc | |
parent | 30b6b39d0b388dc13cbb75aabc539409f19e2f0f (diff) | |
download | mariadb-git-7ca53d947959fe420c28400c621f427b3008fe19.tar.gz |
Merging revisions 3934..3944 from codership-mysql/5.5.
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r-- | sql/wsrep_hton.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 8eb5340dd58..be60d997265 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -77,8 +77,13 @@ void wsrep_register_hton(THD* thd, bool all) { trans_register_ha(thd, all, wsrep_hton); - /* follow innodb read/write settting */ - if (i->is_trx_read_write()) + /* follow innodb read/write settting + * but, as an exception: CTAS with empty result set will not be + * replicated unless we declare wsrep hton as read/write here + */ + if (i->is_trx_read_write() || + (thd->lex->sql_command == SQLCOM_CREATE_TABLE && + thd->wsrep_exec_mode == LOCAL_STATE)) { thd->ha_data[wsrep_hton->slot].ha_info[all].set_trx_read_write(); } |