summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 30b45cb18df..85ef7d24d67 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -73,14 +73,15 @@ static void init_signals(void)
static inline bool end_active_trans(THD *thd)
{
+ int error=0;
if (thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN))
{
thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE);
thd->server_status&= ~SERVER_STATUS_IN_TRANS;
if (ha_commit(thd))
- return 1;
+ error=1;
}
- return 0;
+ return error;
}