summaryrefslogtreecommitdiff
path: root/storage/tokudb
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-10-30 11:15:30 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-10-30 11:15:30 +0200
commit898521e2dd8a4a6706cba01b6ef0a7cea4114fd0 (patch)
tree4ef9a6ddc4298574bb75db673c2412f83c107c5b /storage/tokudb
parent571bcf9aaaf59b84e24bbfb809738dea25495d78 (diff)
parent199863d72b7cccaa4c75641c50c45a83b568ab8c (diff)
downloadmariadb-git-898521e2dd8a4a6706cba01b6ef0a7cea4114fd0.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'storage/tokudb')
-rw-r--r--storage/tokudb/hatoku_hton.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc
index a52f64dc807..c4d2cbf20a0 100644
--- a/storage/tokudb/hatoku_hton.cc
+++ b/storage/tokudb/hatoku_hton.cc
@@ -26,6 +26,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
#include "hatoku_hton.h"
#include "PerconaFT/src/ydb.h"
+#include <mutex>
#define TOKU_METADB_NAME "tokudb_meta"
@@ -239,6 +240,7 @@ tokudb::thread::rwlock_t tokudb_hton_initialized_lock;
static SHOW_VAR *toku_global_status_variables = NULL;
static uint64_t toku_global_status_max_rows;
static TOKU_ENGINE_STATUS_ROW_S* toku_global_status_rows = NULL;
+static std::mutex toku_global_status_rows_mutex;
static void handle_ydb_error(int error) {
switch (error) {
@@ -1901,6 +1903,7 @@ static int show_tokudb_vars(TOKUDB_UNUSED(THD* thd),
const int panic_string_len = 1024;
char panic_string[panic_string_len] = {'\0'};
fs_redzone_state redzone_state;
+ const std::lock_guard<std::mutex> lock(toku_global_status_rows_mutex);
uint64_t num_rows;
error = db_env->get_engine_status(