diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-02-28 13:56:08 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-02-28 13:56:08 -0500 |
commit | c3a2394641e2f7b199977bcf699ad64c1bb1367f (patch) | |
tree | f8867141b6f645065820a14eb74562778ca8d0e4 /sql/handler.cc | |
parent | ae6e1548cbda6cb1509f84edb57786c9520a7a6e (diff) | |
download | mariadb-git-c3a2394641e2f7b199977bcf699ad64c1bb1367f.tar.gz |
* Merged revisions 3945, 3946..3950, 3951..3961
from codership-mysql/5.5.
* Merged changes in innobase to xtradb.
* Updated WSREP_PATCH_REVNO.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 5f12a6b5c96..dc7e3cb3084 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1302,18 +1302,27 @@ int ha_commit_trans(THD *thd, bool all) if (err) { #ifdef WITH_WSREP - if (WSREP(thd) && ht->db_type== DB_TYPE_WSREP) - { - error= 1; - /* avoid sending error, if we need to replay */ - if (thd->wsrep_conflict_state!= MUST_REPLAY) - { - my_error(ER_LOCK_DEADLOCK, MYF(0), err); - } - } - else - { - /* not wsrep hton, bail to native mysql behavior */ + if (WSREP(thd) && ht->db_type== DB_TYPE_WSREP) + { + error= 1; + switch (err) + { + case WSREP_TRX_SIZE_EXCEEDED: + /* give user size exeeded erro from wsrep_api.h */ + my_error(ER_ERROR_DURING_COMMIT, MYF(0), WSREP_SIZE_EXCEEDED); + break; + case WSREP_TRX_CERT_FAIL: + case WSREP_TRX_ERROR: + /* avoid sending error, if we need to replay */ + if (thd->wsrep_conflict_state!= MUST_REPLAY) + { + my_error(ER_LOCK_DEADLOCK, MYF(0), err); + } + } + } + else + { + /* not wsrep hton, bail to native mysql behavior */ #endif /* WITH_WSREP */ my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); error= 1; @@ -5119,6 +5128,17 @@ static int binlog_log_row(TABLE* table, bool error= 0; THD *const thd= table->in_use; +#ifdef WITH_WSREP + /* only InnoDB tables will be replicated through binlog emulation */ + if (WSREP_EMULATE_BINLOG(thd) && + table->file->ht->db_type != DB_TYPE_INNODB && + !(table->file->ht->db_type == DB_TYPE_PARTITION_DB && + (((ha_partition*)(table->file))->wsrep_db_type() == DB_TYPE_INNODB))) + // !strcmp(table->file->table_type(), "InnoDB")) + { + return 0; + } +#endif /* WITH_WSREP */ if (check_table_binlog_row_based(thd, table)) { MY_BITMAP cols; |