MySQL 8.0.39
Source Code Documentation
sql_security_ctx.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 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#ifndef SQL_SECURITY_CTX_INCLUDED
24#define SQL_SECURITY_CTX_INCLUDED
25#include <string.h>
26#include <sys/types.h>
27#include <algorithm>
28#include <cinttypes>
29#include <utility>
30
31#include "lex_string.h"
32#include "m_ctype.h"
33#include "m_string.h"
34#include "my_dbug.h"
35#include "my_hostname.h" // HOSTNAME_LENGTH
36#include "mysql_com.h" // USERNAME_LENGTH
39#include "sql/sql_const.h"
40#include "sql_string.h"
41
42/* Forward declaration. Depends on sql_auth_cache.h (which depends on this file)
43 */
44class Acl_map;
45class ACL_USER;
46class THD;
47struct TABLE;
49
50/**
51 @class Security_context
52 @brief A set of THD members describing the current authenticated user.
53*/
54
56 public:
57 Security_context(THD *thd = nullptr);
59
60 Security_context(const Security_context &src_sctx);
61
63
64 void skip_grants(const char *user = "skip-grants user",
65 const char *host = "skip-grants host");
67
68 /**
69 Getter method for member m_user.
70
71 @retval LEX_CSTRING object having constant pointer to m_user.Ptr
72 and its length.
73 */
74 LEX_CSTRING user() const;
75
76 void set_user_ptr(const char *user_arg, const size_t user_arg_length);
77
78 void assign_user(const char *user_arg, const size_t user_arg_length);
79
80 std::pair<bool, bool> has_global_grant(const char *priv, size_t priv_len);
81 std::pair<bool, bool> has_global_grant(const Auth_id &auth_id,
82 const std::string &privilege,
83 bool cumulative = false);
84 bool can_operate_with(const Auth_id &auth_id, const std::string &privilege,
85 bool cumulative = false,
86 bool ignore_if_nonextant = true,
87 bool throw_error = true);
89 bool validate_access = false);
90 void clear_active_roles(void);
92 size_t get_num_active_roles() const;
94 void checkout_access_maps(void);
95 Access_bitmask db_acl(LEX_CSTRING db, bool use_pattern_scan = true) const;
100 LEX_CSTRING table);
101 bool has_with_admin_acl(const LEX_CSTRING &role_name,
102 const LEX_CSTRING &role_host);
103 bool any_sp_acl(const LEX_CSTRING &db);
104 bool any_table_acl(const LEX_CSTRING &db);
105
106 bool is_table_blocked(Access_bitmask priv, TABLE const *table);
107 bool has_column_access(Access_bitmask priv, TABLE const *table,
108 std::vector<std::string> column);
109
110 /**
111 Getter method for member m_host.
112
113 @retval LEX_CSTRING object having constant pointer to m_host.Ptr
114 and its length.
115 */
116
117 LEX_CSTRING host() const;
118
119 void set_host_ptr(const char *host_arg, const size_t host_arg_length);
120
121 void assign_host(const char *host_arg, const size_t host_arg_length);
122
123 /**
124 Getter method for member m_ip.
125
126 @retval LEX_CSTRING object having constant pointer to m_ip.Ptr
127 and its length
128 */
129 LEX_CSTRING ip() const;
130
131 void set_ip_ptr(const char *ip_arg, const int ip_arg_length);
132
133 void assign_ip(const char *ip_arg, const int ip_arg_length);
134
135 /**
136 Getter method for member m_host_or_ip.
137
138 @retval LEX_CSTRING object having constant pointer to m_host_or_ip.Ptr
139 and its length
140 */
141 LEX_CSTRING host_or_ip() const;
142
143 /**
144 Setter method for member m_host_or_ip.
145 */
146 void set_host_or_ip_ptr();
147
148 /**
149 Setter method for member m_host_or_ip.
150
151 @param[in] host_or_ip_arg New user value for m_host_or_ip.
152 @param[in] host_or_ip_arg_length Length of "host_or_ip_arg" param.
153 */
154 void set_host_or_ip_ptr(const char *host_or_ip_arg,
155 const int host_or_ip_arg_length);
156
157 /**
158 Getter method for member m_external_user.
159
160 @retval LEX_CSTRING object having constant pointer to m_external_host.Ptr
161 and its length
162 */
164
165 void set_external_user_ptr(const char *ext_user_arg,
166 const int ext_user_arg_length);
167
168 void assign_external_user(const char *ext_user_arg,
169 const int ext_user_arg_length);
170
171 /**
172 Getter method for member m_priv_user.
173
174 @retval LEX_CSTRING object having constant pointer to m_priv_user.Ptr
175 and its length
176 */
177 LEX_CSTRING priv_user() const;
178
179 void assign_priv_user(const char *priv_user_arg,
180 const size_t priv_user_arg_length);
181
182 /**
183 Getter method for member m_proxy_user.
184
185 @retval LEX_CSTRING object having constant pointer to m_proxy_user.Ptr
186 and its length
187 */
188 LEX_CSTRING proxy_user() const;
189
190 void assign_proxy_user(const char *proxy_user_arg,
191 const size_t proxy_user_arg_length);
192
193 /**
194 Getter method for member m_priv_host.
195
196 @retval LEX_CSTRING object having constant pointer to m_priv_host.Ptr
197 and its length
198 */
199 LEX_CSTRING priv_host() const;
200
201 void assign_priv_host(const char *priv_host_arg,
202 const size_t priv_host_arg_length);
203
204 const char *priv_host_name() const;
205
206 /**
207 Getter method for member m_master_access.
208 */
210
211 Access_bitmask master_access(const std::string &db_name) const;
212
213 const Restrictions restrictions() const;
214
216
219
220 /**
221 Check if a an account has been assigned to the security context
222
223 The account assignment to the security context is always executed in the
224 following order:
225 1) assign user's name to the context
226 2) assign user's hostname to the context
227 Whilst user name can be null, hostname cannot. This is why we can say that
228 the full account has been assigned to the context when hostname is not
229 equal to empty string.
230
231 @return Account assignment status
232 @retval true account has been assigned to the security context
233 @retval false account has not yet been assigned to the security context
234 */
235
236 bool has_account_assigned() const;
237
238 /**
239 Check permission against m_master_access
240 */
241
242 /**
243 Check global access
244 @param want_access The required privileges
245 @param db_name The database name to check if it has restrictions attached
246 @param match_any if the security context must match all or any of the req.
247 * privileges.
248 @return True if the security context fulfills the access requirements.
249 */
250 bool check_access(Access_bitmask want_access, const std::string &db_name = "",
251 bool match_any = false);
252
253 /**
254 Returns the schema level effective privileges (with applied roles)
255 for the currently active schema.
256 */
258
259 /**
260 Cache the schema level effective privileges (apply roles first!) for the
261 currently active schema.
262 */
264
265 /**
266 Getter method for member m_password_expired.
267 */
268 bool password_expired() const;
269
271
272 bool change_security_context(THD *thd, const LEX_CSTRING &definer_user,
273 const LEX_CSTRING &definer_host, const char *db,
274 Security_context **backup, bool force = false);
275
277
279
280 void logout();
281 /**
282 Locked account can still be used as routine definers and when they are
283 there shouldn't be any checks for expired passwords.
284 */
286
288
289 void set_drop_policy(const std::function<void(Security_context *)> &func);
290
291 void add_as_local_temp_privs(const std::vector<std::string> &privs);
292 bool check_in_local_temp_privs(const std::string &priv);
293
294 bool has_drop_policy(void);
295
296 bool has_executed_drop_policy(void);
297
298 void execute_drop_policy(void);
299
301 const std::string &db_name) const;
302
304
307
308 void set_thd(THD *thd);
309
310 THD *get_thd();
311
312 private:
313 void init();
314 void destroy();
315 void copy_security_ctx(const Security_context &src_sctx);
317 const std::string &db_name) const;
319 std::pair<bool, bool> fetch_global_grant(const ACL_USER &acl_user,
320 const std::string &privilege,
321 bool cumulative = false);
322 bool has_table_access(Access_bitmask priv, Table_ref *table);
323
324 private:
325 /**
326 m_user - user of the client, set to NULL until the user has been read from
327 the connection
328 */
330
331 /** m_host - host of the client */
333
334 /** m_ip - client IP */
336
337 /**
338 m_host_or_ip - points to host if host is available, otherwise points to ip
339 */
341
343
344 /**
345 m_priv_user - The user privilege we are using. May be "" for anonymous user.
346 */
349
352
353 /**
354 The host privilege we are using
355 */
358
359 /**
360 Global privileges from mysql.user.
361 */
363
364 /**
365 Privileges for current db
366 */
368
369 /**
370 password expiration flag.
371
372 This flag is set according to connecting user's context and not the
373 effective user.
374 */
378 /**
379 True if this account can't be logged into.
380 */
382 /**
383 True if the skip_grants_user is set.
384 */
386
391 /**
392 This flag tracks if server should be in sandbox mode or not.
393 When user account connects to server, with any of its authentication
394 plugin's registration step pending, in that case, the connection is
395 set in sandbox(or registration) mode i.e m_registration_sandbox_mode is set
396 to TRUE.
397 During this time only ALTER USER, SET PASSWORD statements are allowed.
398 Once user finishes the registration steps for the authentication plugin
399 via an ALTER USER statement, m_registration_sandbox_mode is set to FALSE,
400 making a full fledged connection, where user can execute any sql statement.
401 */
403
404 /**
405 m_thd - Thread handle, set to nullptr if this does not belong to any THD yet
406 */
408};
409
410/**
411 Getter method for member m_host_or_ip.
412
413 @retval LEX_CSTRING object having constant pointer to m_host_or_ip.Ptr
414 and its length
415*/
418
420
423
424 return host_or_ip;
425}
426
429
430 /*
431 Set host_or_ip to either host or ip if they are available else set it to
432 empty string.
433 */
434 const char *host_or_ip =
435 m_host.length() ? m_host.ptr() : (m_ip.length() ? m_ip.ptr() : "");
436
438}
439
441 const char *host_or_ip_arg, const int host_or_ip_arg_length) {
443
444 m_host_or_ip.set(host_or_ip_arg, host_or_ip_arg_length, system_charset_info);
445}
446
448 LEX_CSTRING ext_user;
449
451
452 ext_user.str = m_external_user.ptr();
453 ext_user.length = m_external_user.length();
454
455 return ext_user;
456}
457
459 return m_master_access;
460}
461
463 return m_restrictions;
464}
465
469 DBUG_PRINT("info", ("Cached master access is %" PRIu32, m_master_access));
470}
471
473 Access_bitmask master_access, const Restrictions &restrictions) {
476}
477
478inline const char *Security_context::priv_host_name() const {
479 return (*m_priv_host ? m_priv_host : "%");
480}
481
483 return m_priv_host[0] != '\0';
484}
485
487 return m_db_access;
488}
489
491 Access_bitmask db_access) {
492 m_db_access = db_access;
493}
494
496 return m_password_expired;
497}
498
499inline void Security_context::set_password_expired(bool password_expired) {
501}
502
505}
506
509}
510
513}
514
517}
518
519inline void Security_context::set_thd(THD *thd) { m_thd = thd; }
520
522
523#endif /* SQL_SECURITY_CTX_INCLUDED */
uint32_t Access_bitmask
Definition: auth_acls.h:34
std::vector< Auth_id_ref > List_of_auth_id_refs
Definition: auth_common.h:81
Definition: sql_auth_cache.h:246
Container for global, schema, table/view and routine ACL maps.
Definition: sql_auth_cache.h:637
Storage container for default auth ids.
Definition: auth_common.h:1073
Definition: sql_list.h:434
Container of all restrictions for a given user.
Definition: partial_revokes.h:155
void clear_db()
Clear database restrictions.
Definition: partial_revokes.cc:1520
A set of THD members describing the current authenticated user.
Definition: sql_security_ctx.h:55
bool user_matches(Security_context *)
Definition: sql_security_ctx.cc:311
String m_external_user
Definition: sql_security_ctx.h:342
void cache_current_db_access(Access_bitmask db_access)
Cache the schema level effective privileges (apply roles first!) for the currently active schema.
Definition: sql_security_ctx.h:490
THD * get_thd()
Definition: sql_security_ctx.h:521
Access_bitmask master_access() const
Getter method for member m_master_access.
Definition: sql_security_ctx.h:458
Grant_table_aggregate table_and_column_acls(LEX_CSTRING db, LEX_CSTRING table)
Definition: sql_security_ctx.cc:570
bool any_table_acl(const LEX_CSTRING &db)
Definition: sql_security_ctx.cc:618
String m_host
m_host - host of the client
Definition: sql_security_ctx.h:332
bool m_is_skip_grants_user
True if the skip_grants_user is set.
Definition: sql_security_ctx.h:385
bool check_in_local_temp_privs(const std::string &priv)
std::unique_ptr< std::function< void(Security_context *)> > m_drop_policy
Definition: sql_security_ctx.h:389
void add_as_local_temp_privs(const std::vector< std::string > &privs)
Access_bitmask db_acl(LEX_CSTRING db, bool use_pattern_scan=true) const
Get grant information for given database.
Definition: sql_security_ctx.cc:499
bool check_access(Access_bitmask want_access, const std::string &db_name="", bool match_any=false)
Check permission against m_master_access.
Definition: sql_security_ctx.cc:320
const char * priv_host_name() const
Definition: sql_security_ctx.h:478
Access_bitmask current_db_access() const
Returns the schema level effective privileges (with applied roles) for the currently active schema.
Definition: sql_security_ctx.h:486
void set_user_ptr(const char *user_arg, const size_t user_arg_length)
Setter method for member m_user.
Definition: sql_security_ctx.cc:814
void init()
Definition: sql_security_ctx.cc:78
LEX_CSTRING host() const
Getter method for member m_host.
Definition: sql_security_ctx.cc:852
LEX_CSTRING priv_user() const
Getter method for member m_priv_user.
Definition: sql_security_ctx.cc:780
void assign_user(const char *user_arg, const size_t user_arg_length)
Setter method for member m_user.
Definition: sql_security_ctx.cc:834
void copy_security_ctx(const Security_context &src_sctx)
Deep copy status of sctx object to this.
Definition: sql_security_ctx.cc:201
void set_password_expired(bool password_expired)
Definition: sql_security_ctx.h:499
void set_drop_policy(const std::function< void(Security_context *)> &func)
Definition: sql_security_ctx.cc:125
int activate_role(LEX_CSTRING user, LEX_CSTRING host, bool validate_access=false)
This method pushes a role to the list of active roles.
Definition: sql_security_ctx.cc:349
void set_registration_sandbox_mode(bool v)
Definition: sql_security_ctx.h:515
bool has_column_access(Access_bitmask priv, TABLE const *table, std::vector< std::string > column)
Check if required access to given table column is granted.
Definition: sql_security_ctx.cc:1270
Restrictions m_restrictions
Definition: sql_security_ctx.h:390
char m_priv_user[USERNAME_LENGTH]
m_priv_user - The user privilege we are using.
Definition: sql_security_ctx.h:347
void assign_proxy_user(const char *proxy_user_arg, const size_t proxy_user_arg_length)
Setter method for member m_proxy_user.
Definition: sql_security_ctx.cc:1057
void skip_grants(const char *user="skip-grants user", const char *host="skip-grants host")
Grants all privilegs to user.
Definition: sql_security_ctx.cc:174
~Security_context()
Definition: sql_security_ctx.cc:59
void checkout_access_maps(void)
Subscribes to a cache entry of aggregated ACLs.
Definition: sql_security_ctx.cc:380
size_t get_num_active_roles() const
Definition: sql_security_ctx.cc:447
THD * m_thd
m_thd - Thread handle, set to nullptr if this does not belong to any THD yet
Definition: sql_security_ctx.h:407
char m_proxy_user[USERNAME_LENGTH+HOSTNAME_LENGTH+6]
Definition: sql_security_ctx.h:350
void set_master_access(Access_bitmask master_access)
Definition: sql_security_ctx.h:466
void set_external_user_ptr(const char *ext_user_arg, const int ext_user_arg_length)
Setter method for member m_external_user.
Definition: sql_security_ctx.cc:979
String m_user
m_user - user of the client, set to NULL until the user has been read from the connection
Definition: sql_security_ctx.h:329
String m_ip
m_ip - client IP
Definition: sql_security_ctx.h:335
bool any_sp_acl(const LEX_CSTRING &db)
Definition: sql_security_ctx.cc:603
bool has_account_assigned() const
Check if a an account has been assigned to the security context.
Definition: sql_security_ctx.h:482
size_t m_proxy_user_length
Definition: sql_security_ctx.h:351
LEX_CSTRING external_user() const
Getter method for member m_external_user.
Definition: sql_security_ctx.h:447
void assign_host(const char *host_arg, const size_t host_arg_length)
Setter method for member m_host.
Definition: sql_security_ctx.cc:895
Access_bitmask m_db_access
Privileges for current db.
Definition: sql_security_ctx.h:367
void set_host_ptr(const char *host_arg, const size_t host_arg_length)
Setter method for member m_host.
Definition: sql_security_ctx.cc:872
bool m_is_locked
True if this account can't be logged into.
Definition: sql_security_ctx.h:381
bool is_table_blocked(Access_bitmask priv, TABLE const *table)
Check if required access to given table is not restricted.
Definition: sql_security_ctx.cc:1236
bool is_in_registration_sandbox_mode()
Definition: sql_security_ctx.h:511
Access_bitmask function_acl(LEX_CSTRING db, LEX_CSTRING procedure_name)
Definition: sql_security_ctx.cc:551
bool m_password_expired
password expiration flag.
Definition: sql_security_ctx.h:375
size_t m_priv_user_length
Definition: sql_security_ctx.h:348
bool account_is_locked()
Locked account can still be used as routine definers and when they are there shouldn't be any checks ...
Definition: sql_security_ctx.h:285
Access_bitmask filter_access(const Access_bitmask access, const std::string &db_name) const
If there is a restriction attached to an access on the given database then remove that access otherwi...
Definition: sql_security_ctx.cc:1128
bool is_access_restricted_on_db(Access_bitmask want_access, const std::string &db_name) const
Definition: sql_security_ctx.cc:1113
Security_context(THD *thd=nullptr)
Definition: sql_security_ctx.cc:54
void execute_drop_policy(void)
Definition: sql_security_ctx.cc:118
void assign_ip(const char *ip_arg, const int ip_arg_length)
Setter method for member m_ip.
Definition: sql_security_ctx.cc:959
List_of_auth_id_refs * get_active_roles()
Definition: sql_security_ctx.cc:443
void init_restrictions(const Restrictions &restrictions)
Definition: sql_security_ctx.cc:1109
Acl_map * m_acl_map
Definition: sql_security_ctx.h:377
void assign_external_user(const char *ext_user_arg, const int ext_user_arg_length)
Setter method for member m_external_user.
Definition: sql_security_ctx.cc:999
bool has_with_admin_acl(const LEX_CSTRING &role_name, const LEX_CSTRING &role_host)
Definition: sql_security_ctx.cc:589
Access_bitmask procedure_acl(LEX_CSTRING db, LEX_CSTRING procedure_name)
Definition: sql_security_ctx.cc:533
bool password_expired() const
Getter method for member m_password_expired.
Definition: sql_security_ctx.h:495
LEX_CSTRING ip() const
Getter method for member m_ip.
Definition: sql_security_ctx.cc:919
char m_priv_host[HOSTNAME_LENGTH+1]
The host privilege we are using.
Definition: sql_security_ctx.h:356
size_t m_priv_host_length
Definition: sql_security_ctx.h:357
LEX_CSTRING priv_host() const
Getter method for member m_priv_host.
Definition: sql_security_ctx.cc:1077
void set_host_or_ip_ptr()
Setter method for member m_host_or_ip.
Definition: sql_security_ctx.h:427
std::pair< bool, bool > fetch_global_grant(const ACL_USER &acl_user, const std::string &privilege, bool cumulative=false)
Checks if the acl_user does have the asked dynamic privilege.
Definition: sql_security_ctx.cc:1157
std::pair< bool, bool > has_global_grant(const char *priv, size_t priv_len)
Checks if the Current_user has the asked dynamic privilege.
Definition: sql_security_ctx.cc:648
void set_thd(THD *thd)
Definition: sql_security_ctx.h:519
void destroy()
Definition: sql_security_ctx.cc:132
String m_host_or_ip
m_host_or_ip - points to host if host is available, otherwise points to ip
Definition: sql_security_ctx.h:340
bool m_has_drop_policy
Definition: sql_security_ctx.h:388
LEX_CSTRING user() const
Getter method for member m_user.
Definition: sql_security_ctx.cc:794
void clear_db_restrictions()
Definition: sql_security_ctx.h:507
bool m_executed_drop_policy
Definition: sql_security_ctx.h:387
void logout()
Definition: sql_security_ctx.cc:99
void restore_security_context(THD *thd, Security_context *backup)
Definition: sql_security_ctx.cc:306
Access_bitmask m_master_access
Global privileges from mysql.user.
Definition: sql_security_ctx.h:362
const Restrictions restrictions() const
Definition: sql_security_ctx.h:462
bool m_registration_sandbox_mode
This flag tracks if server should be in sandbox mode or not.
Definition: sql_security_ctx.h:402
void lock_account(bool is_locked)
Definition: sql_security_ctx.h:287
LEX_CSTRING host_or_ip() const
Getter method for member m_host_or_ip.
Definition: sql_security_ctx.h:416
bool is_skip_grants_user()
Definition: sql_security_ctx.h:503
Access_bitmask table_acl(LEX_CSTRING db, LEX_CSTRING table)
Definition: sql_security_ctx.cc:583
List_of_auth_id_refs m_active_roles
Definition: sql_security_ctx.h:376
bool has_executed_drop_policy(void)
Definition: sql_security_ctx.cc:114
bool has_drop_policy(void)
Definition: sql_security_ctx.cc:112
bool change_security_context(THD *thd, const LEX_CSTRING &definer_user, const LEX_CSTRING &definer_host, const char *db, Security_context **backup, bool force=false)
Initialize this security context from the passed in credentials and activate it in the current thread...
Definition: sql_security_ctx.cc:279
void assign_priv_user(const char *priv_user_arg, const size_t priv_user_arg_length)
Setter method for member m_priv_user.
Definition: sql_security_ctx.cc:1019
bool has_table_access(Access_bitmask priv, Table_ref *table)
Check if required access to given table is granted.
Definition: sql_security_ctx.cc:1191
void set_ip_ptr(const char *ip_arg, const int ip_arg_length)
Setter method for member m_ip.
Definition: sql_security_ctx.cc:939
Security_context & operator=(const Security_context &src_sctx)
Definition: sql_security_ctx.cc:66
bool can_operate_with(const Auth_id &auth_id, const std::string &privilege, bool cumulative=false, bool ignore_if_nonextant=true, bool throw_error=true)
Checks if the specified auth_id with privilege can work with the current_user.
Definition: sql_security_ctx.cc:742
void clear_active_roles(void)
This helper method clears the active roles list and frees the allocated memory used for any previousl...
Definition: sql_security_ctx.cc:424
LEX_CSTRING proxy_user() const
Getter method for member m_proxy_user.
Definition: sql_security_ctx.cc:1039
void assign_priv_host(const char *priv_host_arg, const size_t priv_host_arg_length)
Setter method for member m_priv_host.
Definition: sql_security_ctx.cc:1095
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
const char * ptr() const
Definition: sql_string.h:250
size_t length() const
Definition: sql_string.h:242
void set(String &str, size_t offset, size_t arg_length)
Definition: sql_string.h:281
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Definition: table.h:2791
A better implementation of the UNIX ctype(3) library.
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1545
#define DBUG_PRINT(keyword, arglist)
Definition: my_dbug.h:181
#define DBUG_TRACE
Definition: my_dbug.h:146
Common definition used by mysys, performance schema and server & client.
static constexpr int HOSTNAME_LENGTH
Definition: my_hostname.h:43
static bool backup
Definition: myisampack.cc:195
Common definition between mysql server & client.
#define USERNAME_LENGTH
Definition: mysql_com.h:69
const char * db_name
Definition: rules_table_service.cc:55
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2438
File containing constants that can be used throughout the server.
Our own string classes, used pervasively throughout the executor.
Definition: auth_internal.h:59
Definition: mysql_lex_string.h:40
const char * str
Definition: mysql_lex_string.h:41
size_t length
Definition: mysql_lex_string.h:42
Definition: table.h:1399
int is_locked(int fd)