From ee71f2f04e026094672b092f648544c566c11adc Mon Sep 17 00:00:00 2001 From: xzh1988 Date: Fri, 23 May 2025 16:11:41 +0800 Subject: [PATCH] rocksdb interface port---rdb_mutex_wrapper.h-1 --- storage/rocksdb/rdb_mutex_wrapper.h | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 storage/rocksdb/rdb_mutex_wrapper.h diff --git a/storage/rocksdb/rdb_mutex_wrapper.h b/storage/rocksdb/rdb_mutex_wrapper.h new file mode 100644 index 000000000..1ac73eaf9 --- /dev/null +++ b/storage/rocksdb/rdb_mutex_wrapper.h @@ -0,0 +1,45 @@ +/* + Copyright (c) 2015, Facebook, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#pragma once + +/* C++ standard header file */ +#include +#include +#include +#include +#include + +/* MySQL header files */ +#include "my_sys.h" +#include "mysql/plugin.h" + +/* RocksDB header files */ +#include "rocksdb/utilities/transaction_db_mutex.h" + +/* MyRocks header files */ +#include "./rdb_global.h" +#include "./rdb_psi.h" + +namespace myrocks { + +class Rdb_mutex : public rocksdb::TransactionDBMutex { + Rdb_mutex(const Rdb_mutex &p) = delete; + Rdb_mutex &operator=(const Rdb_mutex &p) = delete; + + public: + Rdb_mutex(); + virtual ~Rdb_mutex() override; -- Gitee