diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-09-18 15:34:24 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-10-23 10:07:40 +0200 |
commit | c4f8ccc0f53a4de9ca0cac54392b35348494040c (patch) | |
tree | 2cecbd678778047a9f6e57fc8a89ee0e1bec44e1 /storage | |
parent | 54c521ca338322ea08a6aba583be3b99649fb666 (diff) | |
download | mariadb-git-c4f8ccc0f53a4de9ca0cac54392b35348494040c.tar.gz |
MDEV-21954 mysqld got signal 11 Fatal signal 6 while backtracing on parallel show global status
protect global toku_global_status_rows with a mutex
Diffstat (limited to 'storage')
-rw-r--r-- | storage/tokudb/hatoku_hton.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc index 81355ea20ff..6002a3efd88 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) { @@ -1902,6 +1904,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( |