MySQL 9.1.0
Source Code Documentation
multi_option.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2012, 2024, Oracle and/or its affiliates.
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, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License, version 2.0, for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#include "mysql.h"
28#include "prealloced_array.h"
29
30#ifndef _MULTI_OPTION_H_
31#define _MULTI_OPTION_H_
32
33/**
34 Class for handling multiple options like e.g. --init-command,
35 --init-command-add
36*/
38 /**
39 Type of the internal container
40 */
42
43 public:
44 /**
45 Constaexpr constructor
46 */
48
49 /**
50 Adds option value to the container
51
52 @param value [in]: value of the option
53 @param clear [in]: if true the container will be cleared before adding the
54 command
55 */
56 void add_value(char *value, bool clear);
57
58 /**
59 Sets options to MYSQL structure.
60
61 @param mysql [in, out]: pointer to MYSQL structure to be augmented with the
62 option
63 @param option [in]: option to be set
64 */
66
67 /**
68 Free the commands
69 */
70 void free();
71
72 private:
73 /**
74 The internal container with values
75 */
77};
78
79#endif //_MULTI_OPTION_H_
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
Class for handling multiple options like e.g.
Definition: multi_option.h:37
void set_mysql_options(MYSQL *mysql, mysql_option option)
Sets options to MYSQL structure.
Definition: multi_option.cc:40
constexpr Multi_option()
Constaexpr constructor.
Definition: multi_option.h:47
void add_value(char *value, bool clear)
Adds option value to the container.
Definition: multi_option.cc:28
Multi_option_container * option_values
The internal container with values.
Definition: multi_option.h:76
void free()
Free the commands.
Definition: multi_option.cc:46
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
mysql_option
Definition: mysql.h:170
Definition: instrumented_condition_variable.h:32
static mysql_service_status_t clear(reference_caching_channel channel) noexcept
Definition: component.cc:146
Definition: mysql.h:300