summaryrefslogtreecommitdiff
path: root/sql/wsrep_hton.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2014-12-31 20:58:54 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2014-12-31 20:58:54 -0500
commit6f4f8c5f8ae55f6fe05990e047c10309d598eb28 (patch)
tree934a20e50daa00b80289eb66e1312923953b08c7 /sql/wsrep_hton.cc
parent61f73d40cab40994a1baaacc87c9e81d8e335975 (diff)
downloadmariadb-git-6f4f8c5f8ae55f6fe05990e047c10309d598eb28.tar.gz
MDEV-7374 : Losing connection to MySQL while running ALTER TABLE
In the special case of ALTER TABLE with >10K rows, wsrep commit should skip if wsrep is not enabled. Added a test case.
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r--sql/wsrep_hton.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc
index b77cc54ee15..2c14809db21 100644
--- a/sql/wsrep_hton.cc
+++ b/sql/wsrep_hton.cc
@@ -158,11 +158,14 @@ static int wsrep_prepare(handlerton *hton, THD *thd, bool all)
(thd->variables.wsrep_on && !wsrep_trans_cache_is_empty(thd)))
{
int res= wsrep_run_wsrep_commit(thd, hton, all);
- if (res == WSREP_TRX_SIZE_EXCEEDED)
- res= EMSGSIZE;
- else
- res= EDEADLK; // for a better error message
- DBUG_RETURN (wsrep_run_wsrep_commit(thd, hton, all));
+ if (res != 0)
+ {
+ if (res == WSREP_TRX_SIZE_EXCEEDED)
+ res= EMSGSIZE;
+ else
+ res= EDEADLK; // for a better error message
+ }
+ DBUG_RETURN (res);
}
DBUG_RETURN(0);
}
@@ -554,7 +557,6 @@ static int wsrep_hton_init(void *p)
wsrep_hton->rollback= wsrep_rollback;
wsrep_hton->prepare= wsrep_prepare;
wsrep_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN; // todo: fix flags
- wsrep_hton->slot= 0;
return 0;
}