summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/my_sys.h5
-rw-r--r--storage/innobase/os/os0file.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index ac1730eeaff..1d2fff0e476 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2010, 2017, MariaDB Corporation.
+ Copyright (c) 2010, 2021, MariaDB Corporation.
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
@@ -279,7 +279,8 @@ extern int my_umask_dir,
extern my_bool my_use_symdir;
extern ulong my_default_record_cache_size;
-extern my_bool my_disable_locking, my_disable_async_io,
+extern MYSQL_PLUGIN_IMPORT my_bool my_disable_locking;
+extern my_bool my_disable_async_io,
my_disable_flush_key_blocks, my_disable_symlinks;
extern my_bool my_disable_sync, my_disable_copystat_in_redel;
extern char wild_many,wild_one,wild_prefix;
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 884cadaf9f6..a793f9b30cb 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -1122,6 +1122,10 @@ os_file_lock(
int fd,
const char* name)
{
+ if (my_disable_locking) {
+ return 0;
+ }
+
struct flock lk;
lk.l_type = F_WRLCK;