1#ifndef MYSQL_SERVICE_THD_AUTOINC_INCLUDED
2/* Copyright (C) 2013 MariaDB Foundation.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16
17/**
18 @file
19 This service provides access to the auto_increment related system variables:
20
21 @@auto_increment_offset
22 @@auto_increment_increment
23*/
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29extern struct thd_autoinc_service_st {
30 void (*thd_get_autoinc_func)(const MYSQL_THD thd,
31 unsigned long* off, unsigned long* inc);
32} *thd_autoinc_service;
33
34#ifdef MYSQL_DYNAMIC_PLUGIN
35#define thd_get_autoinc(thd, off, inc) \
36 (thd_autoinc_service->thd_get_autoinc_func((thd), (off), (inc)))
37#else
38/**
39 Return autoincrement system variables
40 @param IN thd user thread connection handle
41 @param OUT off the value of @@SESSION.auto_increment_offset
42 @param OUT inc the value of @@SESSION.auto_increment_increment
43*/
44void thd_get_autoinc(const MYSQL_THD thd,
45 unsigned long* off, unsigned long* inc);
46#endif
47
48#ifdef __cplusplus
49}
50#endif
51
52#define MYSQL_SERVICE_THD_AUTOINC_INCLUDED
53#endif
54