diff options
author | Eugene Kosov <claprix@yandex.ru> | 2020-02-19 15:44:33 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2020-02-20 18:24:21 +0300 |
commit | 6618fc29749f8521c5a0a007ae6d6fadb5121717 (patch) | |
tree | 389a498ff6cedbe2de804fd778648d6f84bca6be /storage/innobase/include/log0log.h | |
parent | 84e3f9ce84c3e7fce70142cff4bea1c8b916810b (diff) | |
download | mariadb-git-6618fc29749f8521c5a0a007ae6d6fadb5121717.tar.gz |
MDEV-21774 Innodb, Windows : restore file sharing logic in Innodb
recv_sys_t opened redo log files along with log_sys_t. That's why I
removed file sharing logic from InnoDB
in 9ef2d29ff44de2013c95666a011b993e5c2e5674
But it was actually used to ensure that only one MariaDB instance
will touch the same InnoDB files.
os0file.cc: revert some changes done previously
mapped_file_t::map(): now has arguments read_only, nvme
file_io::open(): now has argument read_only
class file_os_io: make final
log_file_t::open(): now has argument read_only
Diffstat (limited to 'storage/innobase/include/log0log.h')
-rw-r--r-- | storage/innobase/include/log0log.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index c2348e121a3..3e87e03f646 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -468,7 +468,8 @@ public: mapped_file_t &operator=(mapped_file_t &&)= delete; ~mapped_file_t() noexcept; - dberr_t map(const char *path, int flags= 0) noexcept; + dberr_t map(const char *path, bool read_only= false, + bool nvme= false) noexcept; dberr_t unmap() noexcept; byte *data() noexcept { return m_area.data(); } @@ -482,7 +483,7 @@ class file_io public: file_io(bool durable_writes= false) : m_durable_writes(durable_writes) {} virtual ~file_io() noexcept {}; - virtual dberr_t open(const char *path) noexcept= 0; + virtual dberr_t open(const char *path, bool read_only) noexcept= 0; virtual dberr_t rename(const char *old_path, const char *new_path) noexcept= 0; virtual dberr_t close() noexcept= 0; @@ -498,7 +499,7 @@ protected: bool m_durable_writes; }; -class file_os_io : public file_io +class file_os_io final: public file_io { public: file_os_io()= default; @@ -508,7 +509,7 @@ public: file_os_io &operator=(file_os_io &&rhs); ~file_os_io() noexcept; - dberr_t open(const char *path) noexcept final; + dberr_t open(const char *path, bool read_only) noexcept final; bool is_opened() const noexcept { return m_fd != OS_FILE_CLOSED; } dberr_t rename(const char *old_path, const char *new_path) noexcept final; dberr_t close() noexcept final; @@ -527,7 +528,7 @@ class log_file_t public: log_file_t(std::string path= "") noexcept : m_path{std::move(path)} {} - dberr_t open() noexcept; + dberr_t open(bool read_only) noexcept; bool is_opened() const noexcept; const std::string &get_path() const noexcept { return m_path; } |