MySQL 8.4.0
Source Code Documentation
auto_increment.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 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 GROUP_REPLICATION_AUTO_INCREMENT
25#define GROUP_REPLICATION_AUTO_INCREMENT
26
28
29#define SERVER_DEFAULT_AUTO_INCREMENT 1
30#define SERVER_DEFAULT_AUTO_OFFSET 1
31
32/*
33 @class Plugin_group_replication_auto_increment
34
35 This class will be used to configure auto_increment variables
36 (auto_increment_increment and auto_increment_offset)
37 */
39 public:
40 /**
41 Plugin_group_replication_auto_increment constructor
42
43 Set auto_increment_increment and auto_increment_offset in the server
44 */
46
47 /**
48 Set auto_increment_increment and auto_increment_offset
49
50 @param increment the interval between successive column values
51 @param offset the starting point for the AUTO_INCREMENT column value
52 */
53
54 void set_auto_increment_variables(ulong increment, ulong offset);
55
56 /**
57 Reset auto_increment_increment and auto_increment_offset,
58 if modified by this plugin in set function
59
60 @param force if true, it ignores the member being in primary mode or not
61 */
62 void reset_auto_increment_variables(bool force = false);
63
64 private:
67};
68
69#endif /* GROUP_REPLICATION_AUTO_INCREMENT */
Definition: auto_increment.h:38
ulong group_replication_auto_offset
Definition: auto_increment.h:66
void set_auto_increment_variables(ulong increment, ulong offset)
Set auto_increment_increment and auto_increment_offset.
Definition: auto_increment.cc:61
Plugin_group_replication_auto_increment()
Plugin_group_replication_auto_increment constructor.
Definition: auto_increment.cc:30
ulong group_replication_auto_increment
Definition: auto_increment.h:65
void reset_auto_increment_variables(bool force=false)
Reset auto_increment_increment and auto_increment_offset, if modified by this plugin in set function.
Definition: auto_increment.cc:33