MySQL 8.0.39
Source Code Documentation
rpl_async_conn_failover_delete_source_udf.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 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 RPL_ASYNC_CONN_FAILOVER_DELETE_SOURCE_UDF_H
25#define RPL_ASYNC_CONN_FAILOVER_DELETE_SOURCE_UDF_H
26
29
31 private:
33 static constexpr const char *m_udf_name =
34 "asynchronous_connection_failover_delete_source";
35 bool m_initialized{false};
36
37 public:
40
41 /**
42 Initialize variables, acquires the mysql_service_mysql_udf_metadata from the
43 registry service and register the Asynchronous Connection Failover's UDFs.
44 If there is an error registering any UDF, all installed UDFs are
45 unregistered.
46
47 @retval true if there was an error
48 @retval false if all UDFs were registered
49 */
50 bool init() override;
51
52 /**
53 Release the udf_metadata service.
54
55 @retval false Success
56 @retval true Failure. service could not be released
57 */
58 bool deinit();
59
60 /**
61 Deletes source network configuration details
62
63 @param[in] init_id UDF_INIT structure
64 @param[in] args UDF_ARGS structure containing argument details
65 @param[out] result error message
66 @param[out] length error message length
67 @param[out] is_null if result is null
68 @param[in,out] error error code
69
70 @return error message
71 */
72 static char *delete_source(UDF_INIT *init_id, UDF_ARGS *args, char *result,
73 unsigned long *length, unsigned char *is_null,
74 unsigned char *error);
75
76 /**
77 Initialize and verifies UDF's arguments. Also sets argument and result
78 charset.
79
80 @param[in] init_id UDF_INIT structure
81 @param[in] args UDF_ARGS structure containing argument details
82 @param[out] message error message
83
84 @return True if error, false otherwise.
85 */
86 static bool delete_source_init(UDF_INIT *init_id, UDF_ARGS *args,
87 char *message);
88
89 /**
90 Deinitialize variables initialized during init function.
91
92 @param[in] init_id UDF_INIT structure
93 */
94 static void delete_source_deinit(UDF_INIT *init_id);
95};
96#endif /* RPL_ASYNC_CONN_FAILOVER_DELETE_SOURCE_UDF_H */
Definition: rpl_async_conn_failover_delete_source_udf.h:30
bool init() override
Initialize variables, acquires the mysql_service_mysql_udf_metadata from the registry service and reg...
Definition: rpl_async_conn_failover_delete_source_udf.cc:35
Udf_charset_service m_charset_service
Definition: rpl_async_conn_failover_delete_source_udf.h:32
~Rpl_async_conn_failover_delete_source() override=default
static char * delete_source(UDF_INIT *init_id, UDF_ARGS *args, char *result, unsigned long *length, unsigned char *is_null, unsigned char *error)
Deletes source network configuration details.
Definition: rpl_async_conn_failover_delete_source_udf.cc:52
bool deinit()
Release the udf_metadata service.
Definition: rpl_async_conn_failover_delete_source_udf.cc:47
static void delete_source_deinit(UDF_INIT *init_id)
Deinitialize variables initialized during init function.
Definition: rpl_async_conn_failover_delete_source_udf.cc:172
bool m_initialized
Definition: rpl_async_conn_failover_delete_source_udf.h:35
static constexpr const char * m_udf_name
Definition: rpl_async_conn_failover_delete_source_udf.h:33
static bool delete_source_init(UDF_INIT *init_id, UDF_ARGS *args, char *message)
Initialize and verifies UDF's arguments.
Definition: rpl_async_conn_failover_delete_source_udf.cc:95
Definition: udf_service_util.h:37
Definition: udf_service_impl.h:61
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: udf_registration_types.h:48
Information about the result of a user defined function.
Definition: udf_registration_types.h:66
Definition: result.h:30