MySQL 9.6.0
Source Code Documentation
mysql_runtime_warning.h
Go to the documentation of this file.
1/* Copyright (c) 2025, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef MYSQL_RUNTIME_WARNING_H
25#define MYSQL_RUNTIME_WARNING_H
26
29//! @cond Doxygen_Suppress
30#include <stdarg.h>
31//! @endcond
32
33/**
34 @ingroup group_components_services_inventory
35
36 This service defines the warning report function api.
37
38 This allows reporting warning into the connected session THD.
39*/
40BEGIN_SERVICE_DEFINITION(mysql_runtime_warning)
41/**
42 It calls the server SQL warning generation function and adds the warning
43 into the THD's error context.
44
45 @param thd Thd of a current session.
46 @param error_id mysql server error number, used to get the warning
47 description.
48 @param args variable argument list which has the warning message details.
49*/
50DECLARE_METHOD(void, emit, (MYSQL_THD thd, int error_id, ...));
51
52/**
53 It calls the server SQL warning generation function and adds the warning
54 into the THD's error context.
55
56 @param thd Thd of a current session.
57 @param error_id mysql server error number, used to get the warning
58 description.
59 @param args variable argument list which has the warning message details.
60*/
61DECLARE_METHOD(void, emit_v, (MYSQL_THD thd, int error_id, va_list args));
62
63END_SERVICE_DEFINITION(mysql_runtime_warning)
64
65#endif /* MYSQL_RUNTIME_WARNING_H */
static char * emit(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long *length, unsigned char *null_value, unsigned char *error)
UDF function itself.
Definition: audit_api_message_emit.cc:427
#define MYSQL_THD
Definition: backup_page_tracker.h:38
#define DECLARE_METHOD(retval, name, args)
Declares a method as a part of the Service definition.
Definition: service.h:103
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86