diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2017-06-26 18:29:30 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2017-06-26 18:29:30 +0300 |
commit | de209ca4a10385a392e3596c80187b88434b6fe5 (patch) | |
tree | 8776f639a549bac2e133579b6ce6a1335aa5a477 /sql/handler.cc | |
parent | 2a3fe45dd2df047cc0d66e2bcdbadd5005c85a1a (diff) | |
download | mariadb-git-bb-10.3-mdev12179.tar.gz |
MDEV-12179: Per-engine mysql.gtid_slave_pos tablesbb-10.3-mdev12179
Merge to 10.3
- changed a few LEX_STRING to LEX_CSTRING
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index c74675ed113..7a1cec3b6f2 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1546,6 +1546,7 @@ static int commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans) { int error= 0; + uint count= 0; Ha_trx_info *ha_info= trans->ha_list, *ha_info_next; DBUG_ENTER("commit_one_phase_2"); if (is_real_trans) @@ -1563,6 +1564,8 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans) } /* Should this be done only if is_real_trans is set ? */ status_var_increment(thd->status_var.ha_commit_count); + if (is_real_trans && ht != binlog_hton && ha_info->is_trx_read_write()) + ++count; ha_info_next= ha_info->next(); ha_info->reset(); /* keep it conveniently zero-filled */ } @@ -1581,6 +1584,8 @@ commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans) { thd->has_waiter= false; thd->transaction.cleanup(); + if (count >= 2) + statistic_increment(transactions_multi_engine, LOCK_status); } DBUG_RETURN(error); |