1 /* Copyright (c) 2008, 2021, 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 also distributed 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 included with MySQL.
13 
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License, version 2.0, for more details.
18 
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
22 
23 #ifndef BACKUP_LOCK_TAB
24 #define BACKUP_LOCK_TAB
25 
26 #include "SignalData.hpp"
27 
28 #define JAM_FILE_ID 82
29 
30 
31 /* This class is used for both REQ, CONF, and REF. */
32 
33 class BackupLockTab {
34   /* Sender(s). */
35   friend class Backup;
36 
37   /* Receiver(s). */
38   friend class Dbdict;
39 
40 public:
41   STATIC_CONST( SignalLength = 7 );
42 
43 private:
44   /* Values for m_lock_unlock. */
45   enum {
46     UNLOCK_TABLE = 0,
47     LOCK_TABLE = 1
48   };
49 
50   /* Values for m_backup_state. */
51   enum {
52     BACKUP_FRAGMENT_INFO = 0,
53     GET_TABINFO_CONF = 1,
54     CLEANUP = 2
55   };
56 
57   Uint32 m_senderRef;
58   Uint32 m_tableId;
59   Uint32 m_lock_unlock;
60   Uint32 errorCode;
61   /* The remaining words are used to keep track of state in block Backup. */
62   Uint32 m_backup_state;
63   Uint32 m_backupRecordPtr_I;
64   Uint32 m_tablePtr_I;
65 };
66 
67 
68 #undef JAM_FILE_ID
69 
70 #endif
71