MySQL 8.0.39
Source Code Documentation
mysql_backup_lock_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MYSQL_BACKUP_LOCK_INCLUDED
25#define MYSQL_BACKUP_LOCK_INCLUDED
26
29
30/**
31 Service API to acquire shared Backup Lock.
32
33 @param opaque_thd Current thread context.
34 @param lock_kind Kind of lock to acquire - BACKUP_LOCK_SERVICE_DEFAULT
35 or weaker.
36 @param lock_timeout Number of seconds to wait before giving up.
37
38 @return Operation status.
39 @retval false Success
40 @retval true Failure
41*/
42
44 (MYSQL_THD opaque_thd,
46 unsigned long lock_timeout));
47
48/**
49 Service API to release Backup Lock.
50
51 @param opaque_thd Current thread context.
52
53 @return Operation status.
54 @retval false Success
55 @retval true Failure
56*/
57
59
60#endif /* COMPONENTS_MYSQL_SERVER_MYSQL_BACKUP_LOCK_H_ */
enum_backup_lock_service_lock_kind
Kind of Backup Lock to be acquired.
Definition: backup_lock_service.h:35
#define MYSQL_THD
Definition: backup_page_tracker.h:38
Specifies macros to define Components.
mysql_service_status_t mysql_release_backup_lock(THD *opaque_thd) noexcept
Service API to release Backup Lock.
Definition: backup_lock_service.cc:53
mysql_service_status_t mysql_acquire_backup_lock(THD *opaque_thd, enum enum_backup_lock_service_lock_kind lock_kind, unsigned long lock_timeout) noexcept
Service API to acquire shared Backup Lock.
Definition: backup_lock_service.cc:35
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88