Debian Codegraph @

unittest/gunit/components/mysql_server/builtins_stubs.cc

raw symbols SCIP
1 /* Copyright (c) 2017, 2026, 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 BUILTIN_STUBS
25 #define BUILTIN_STUBS
26
27 #include <mysql/components/services/log_shared.h>
28 #include <atomic>
29
30 #include "my_compiler.h"
31 #include "sql/sql_class.h"
32
33 std::atomic<int32> connection_events_loop_aborted_flag;
34 thread_local THD *current_thd = nullptr;
35 ulong log_error_verbosity;
36 ulong opt_log_timestamps = 0;
37 char *opt_log_error_services = nullptr;
38 const char *log_error_dest = "stderr";
39
40 void THD::debug_assert_query_locked() const {}
41
42 my_thread_id log_get_thread_id(THD *thd [[maybe_unused]]) { return -1; }
43
44 void log_write_errstream(const char *buffer [[maybe_unused]],
45 size_t length [[maybe_unused]]) {}
46
47 const char *mysql_errno_to_symbol(int mysql_errno [[maybe_unused]]) {
48 return nullptr;
49 }
50
51 int mysql_symbol_to_errno(const char *error_symbol [[maybe_unused]]) {
52 return -1;
53 }
54
55 const char *mysql_errno_to_sqlstate(uint mysql_errno [[maybe_unused]]) {
56 return nullptr;
57 }
58
59 int mysql_errno_to_builtin(uint mysql_errno [[maybe_unused]]) { return 0; }
60
61 int log_vmessage(int log_type [[maybe_unused]], va_list lili [[maybe_unused]]) {
62 return -1;
63 }
64
65 int log_message(int log_type [[maybe_unused]], ...) { return -1; }
66
67 const char *error_message_for_error_log(int mysql_errno [[maybe_unused]]) {
68 return nullptr;
69 }
70
71 void push_warning(THD *thd [[maybe_unused]],
72 Sql_condition::enum_severity_level severity [[maybe_unused]],
73 uint code [[maybe_unused]],
74 const char *message_text [[maybe_unused]]) {}
75
76 #endif