summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-08-25 12:40:09 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-25 12:40:09 +0200
commit6b1863b8304662189a3b9a4aef1e1bebef035b86 (patch)
tree48ba2cbdda863b644108e93ace3668333ae0d193 /sql/handler.cc
parentea91bb6801b1b619d64fa137ea351eca9de683ec (diff)
parent5bbe929d706e26cb3f9b291da6009526a17b1545 (diff)
downloadmariadb-git-6b1863b8304662189a3b9a4aef1e1bebef035b86.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index e4aa1660c82..b862a0e5b0b 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -296,7 +296,7 @@ handler *get_ha_partition(partition_info *part_info)
static const char **handler_errmsgs;
C_MODE_START
-static const char **get_handler_errmsgs()
+static const char **get_handler_errmsgs(void)
{
return handler_errmsgs;
}
@@ -1360,7 +1360,8 @@ int ha_commit_trans(THD *thd, bool all)
uint rw_ha_count= ha_check_and_coalesce_trx_read_only(thd, ha_info, all);
/* rw_trans is TRUE when we in a transaction changing data */
- bool rw_trans= is_real_trans && (rw_ha_count > 0);
+ bool rw_trans= is_real_trans &&
+ (rw_ha_count > !thd->is_current_stmt_binlog_disabled());
MDL_request mdl_request;
DBUG_PRINT("info", ("is_real_trans: %d rw_trans: %d rw_ha_count: %d",
is_real_trans, rw_trans, rw_ha_count));
@@ -2736,6 +2737,15 @@ int handler::ha_index_next_same(uchar *buf, const uchar *key, uint keylen)
return result;
}
+
+bool handler::ha_was_semi_consistent_read()
+{
+ bool result= was_semi_consistent_read();
+ if (result)
+ increment_statistics(&SSV::ha_read_retry_count);
+ return result;
+}
+
/* Initialize handler for random reading, with error handling */
int handler::ha_rnd_init_with_error(bool scan)