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