MySQL 8.4.2
Source Code Documentation
sql_auth_cache.h
Go to the documentation of this file.
1/* Copyright (c) 2000, 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_USER_CACHE_INCLUDED
24#define SQL_USER_CACHE_INCLUDED
25
26#include <string.h>
27#include <sys/types.h>
28#include <atomic>
29#include <boost/graph/adjacency_list.hpp>
30#include <boost/graph/graph_selectors.hpp>
31#include <boost/graph/graph_traits.hpp>
32#include <boost/graph/properties.hpp>
33#include <boost/pending/property.hpp>
34#include <list>
35#include <memory>
36#include <string>
37#include <unordered_map>
38
39#include "lex_string.h"
40#include "lf.h"
41#include "map_helpers.h"
42#include "mf_wcomp.h" // wild_many, wild_one, wild_prefix
43#include "my_alloc.h"
44#include "my_compiler.h"
45#include "my_inttypes.h"
46#include "my_sharedlib.h"
47#include "my_sys.h"
51#include "mysql_com.h" // SCRAMBLE_LENGTH
52#include "mysql_time.h" // MYSQL_TIME
54#include "sql/auth/auth_internal.h" // List_of_authid, Authid
57#include "sql/psi_memory_key.h"
58#include "sql/sql_connect.h" // USER_RESOURCES
59#include "violite.h" // SSL_type
60
61/* Forward declarations */
63class String;
64class THD;
65struct TABLE;
66template <typename Element_type, size_t Prealloc>
69enum class Lex_acl_attrib_udyn;
70
71/* Classes */
72
74 public:
75 /**
76 IP mask type enum.
77 */
79 /**
80 Only IP is specified.
81 */
83 /**
84 IP specified with a mask in a CIDR form.
85 */
87 /**
88 IP specified with a mask in a form of a subnet.
89 */
91 };
92
93 const char *hostname;
95 long ip, ip_mask; // Used with masked ip:s
96 /**
97 IP mask type.
98 */
100
101 /**
102 IP mask parsing in the CIDR format.
103
104 @param[in] ip_arg Buffer containing CIDR mask value.
105 @param[out] val Numeric IP mask value on success.
106
107 @retval false Parsing succeeded.
108 @retval true Parsing failed.
109 */
110 static bool calc_cidr_mask(const char *ip_arg, long *val);
111
112 /**
113 IP mask parsing in the subnet format.
114
115 @param[in] ip_arg Buffer containing subnet mask value.
116 @param[out] val Numeric IP mask value on success.
117
118 @retval false Parsing succeeded.
119 @retval true Parsing failed.
120 */
121 static bool calc_ip_mask(const char *ip_arg, long *val);
122
123 /**
124 IP parsing.
125
126 @param[in] ip_arg Buffer containing IP value.
127 @param[out] val Numeric IP value on success.
128
129 @retval !nullptr Parsing succeeded. Returned value is the pointer following
130 the buffer holding the IP.
131 @retval nullptr Parsing failed. The buffer does not contain valid IP value.
132 */
133 static const char *calc_ip(const char *ip_arg, long *val);
134
135 public:
137 : hostname(nullptr),
139 ip(0),
140 ip_mask(0),
142 const char *get_host() const { return hostname ? hostname : ""; }
143 size_t get_host_len() const { return hostname_length; }
144
146 return (strchr(get_host(), wild_many) || strchr(get_host(), wild_one) ||
147 (ip_mask && (ip_mask != (long)UINT_MAX32)));
148 }
149
151 return (!hostname || (hostname[0] == wild_many && !hostname[1]));
152 }
153
154 void update_hostname(const char *host_arg);
155
156 bool compare_hostname(const char *host_arg, const char *ip_arg);
157};
158
160 public:
161 ACL_ACCESS() : host(), sort(0), access(0) {}
163 ulong sort;
165};
166
167/**
168 @class ACL_compare
169
170 Class that compares ACL_ACCESS objects. Used in std::sort functions.
171*/
173 public:
174 /**
175 Determine sort order of two user accounts.
176
177 ACL_ACCESS with IP specified is sorted before host name.
178
179 @param [in] a First object to compare.
180 @param [in] b Second object to compare.
181
182 @retval true First element goes first.
183 @retval false Second element goes first.
184 */
185 bool operator()(const ACL_ACCESS &a, const ACL_ACCESS &b);
186 bool operator()(const ACL_ACCESS *a, const ACL_ACCESS *b);
187};
188
189/**
190 @class ACL_USER_compare
191
192 Class that compares ACL_USER objects.
193*/
195 public:
196 /**
197 Determine sort order of two user accounts.
198
199 ACL_USER with IP specified is sorted before host name.
200 Non anonymous user is sorted before anonymous user, when properties of both
201 are equal.
202
203 @param [in] a First object to compare.
204 @param [in] b Second object to compare.
205
206 @retval true First element goes first.
207 @retval false Second element goes first.
208 */
209 bool operator()(const ACL_USER &a, const ACL_USER &b);
210 bool operator()(const ACL_USER *a, const ACL_USER *b);
211};
212
213/* ACL_HOST is used if no host is specified */
214
215class ACL_HOST : public ACL_ACCESS {
216 public:
217 char *db;
218};
219
220#define NUM_CREDENTIALS 2
221#define PRIMARY_CRED (NUM_CREDENTIALS - NUM_CREDENTIALS)
222#define SECOND_CRED (PRIMARY_CRED + 1)
223
225 public:
227 m_auth_string = {"", 0};
228 memset(m_salt, 0, SCRAMBLE_LENGTH + 1);
229 m_salt_len = 0;
230 }
231
232 public:
234 /**
235 The salt variable is used as the password hash for
236 native_password_authetication.
237 */
238 uint8 m_salt[SCRAMBLE_LENGTH + 1]; // scrambled password in binary form
239 /**
240 In the old protocol the salt_len indicated what type of autnetication
241 protocol was used: 0 - no password, 4 - 3.20, 8 - 4.0, 20 - 4.1.1
242 */
244};
245
246class ACL_USER : public ACL_ACCESS {
247 public:
249 char *user;
258 /**
259 Specifies whether the user account is locked or unlocked.
260 */
262 /**
263 If this ACL_USER was used as a role id then this flag is true.
264 During RENAME USER this variable is used for determining if it is safe
265 to rename the user or not.
266 */
268
269 /**
270 The number of old passwords to check when setting a new password
271 */
273
274 /**
275 Ignore @ref password_history_length,
276 use the global default @ref global_password_history
277 */
279
280 /**
281 The number of days that would have to pass before a password can be reused.
282 */
284 /**
285 Ignore @ref password_reuse_interval,
286 use the global default @ref global_password_reuse_interval
287 */
289
290 /**
291 The current password needed to be specified while changing it.
292 */
294
295 /**
296 Additional credentials
297 */
299
300 ACL_USER *copy(MEM_ROOT *root);
301 ACL_USER();
302
303 void set_user(MEM_ROOT *mem, const char *user_arg);
304 void set_host(MEM_ROOT *mem, const char *host_arg);
306 size_t get_username_length() const { return user ? strlen(user) : 0; }
308 public:
309 bool is_active() const {
311 }
314 }
318 bool update(THD *thd, bool successful_login, long *ret_days_remaining);
323 m_daynr_locked(0) {}
324
325 protected:
326 /**
327 read from the user config. The number of days to keep the account locked
328 */
330 /**
331 read from the user config. The number of failed login attempts before the
332 account is locked
333 */
335 /**
336 The remaining login tries, valid only if @ref m_failed_login_attempts and
337 @ref m_password_lock_time_days are non-zero
338 */
340 /** The day the account is locked, 0 if not locked */
344};
345
346class ACL_DB : public ACL_ACCESS {
347 public:
348 char *user, *db;
349
350 void set_user(MEM_ROOT *mem, const char *user_arg);
351 void set_host(MEM_ROOT *mem, const char *host_arg);
352};
353
355 const char *user;
357 const char *proxied_user;
359
360 typedef enum {
369
370 public:
371 ACL_PROXY_USER() = default;
372
373 void init(const char *host_arg, const char *user_arg,
374 const char *proxied_host_arg, const char *proxied_user_arg,
375 bool with_grant_arg);
376
377 void init(MEM_ROOT *mem, const char *host_arg, const char *user_arg,
378 const char *proxied_host_arg, const char *proxied_user_arg,
379 bool with_grant_arg);
380
381 void init(TABLE *table, MEM_ROOT *mem);
382
383 bool get_with_grant() { return with_grant; }
384 const char *get_user() { return user; }
385 const char *get_proxied_user() { return proxied_user; }
386 const char *get_proxied_host() { return proxied_host.get_host(); }
387 void set_user(MEM_ROOT *mem, const char *user_arg);
388 void set_host(MEM_ROOT *mem, const char *host_arg);
389
390 bool check_validity(bool check_no_resolve);
391
392 bool matches(const char *host_arg, const char *user_arg, const char *ip_arg,
393 const char *proxied_user_arg, bool any_proxy_user);
394
395 inline static bool auth_element_equals(const char *a, const char *b) {
396 return (a == b || (a != nullptr && b != nullptr && !strcmp(a, b)));
397 }
398
399 bool pk_equals(ACL_PROXY_USER *grant);
400
401 bool granted_on(const char *host_arg, const char *user_arg) {
402 return (
403 ((!user && (!user_arg || !user_arg[0])) ||
404 (user && user_arg && !strcmp(user, user_arg))) &&
405 ((!host.get_host() && (!host_arg || !host_arg[0])) ||
406 (host.get_host() && host_arg && !strcmp(host.get_host(), host_arg))));
407 }
408
409 void print_grant(THD *thd, String *str);
410
411 void set_data(ACL_PROXY_USER *grant) { with_grant = grant->with_grant; }
412
413 static int store_pk(TABLE *table, const LEX_CSTRING &host,
416
417 static int store_with_grant(TABLE *table, bool with_grant);
418
419 static int store_data_record(TABLE *table, const LEX_CSTRING &host,
420 const LEX_CSTRING &user,
423 const char *grantor);
424
425 size_t get_user_length() const { return user ? strlen(user) : 0; }
426
427 size_t get_proxied_user_length() const {
428 return proxied_user ? strlen(proxied_user) : 0;
429 }
430};
431
433 public:
436 char key[1]; // Key will be stored here
437};
438
440 public:
442 std::string column;
444};
445
447 public:
449 char *db;
450 const char *user;
451 char *tname;
453 ulong sort;
454 std::string hash_key;
455 GRANT_NAME(const char *h, const char *d, const char *u, const char *t,
456 Access_bitmask p, bool is_routine);
457 GRANT_NAME(TABLE *form, bool is_routine);
458 virtual ~GRANT_NAME() = default;
459 virtual bool ok() { return privs != 0; }
460 void set_user_details(const char *h, const char *d, const char *u,
461 const char *t, bool is_routine);
462};
463
464class GRANT_TABLE : public GRANT_NAME {
465 public:
470
471 GRANT_TABLE(const char *h, const char *d, const char *u, const char *t,
473 explicit GRANT_TABLE(TABLE *form);
474 bool init(TABLE *col_privs);
475 ~GRANT_TABLE() override;
476 bool ok() override { return privs != 0 || cols != 0; }
477};
478
479/*
480 * A default/no-arg constructor is useful with containers-of-containers
481 * situations in which a two-allocator scoped_allocator_adapter is not enough.
482 * This custom allocator provides a Malloc_allocator with a no-arg constructor
483 * by hard-coding the key_memory_acl_cache constructor argument.
484 * This "solution" lacks beauty, yet is pragmatic.
485 */
486template <class T>
488 public:
490 template <class U>
491 struct rebind {
493 };
494
495 template <class U>
496 Acl_cache_allocator(const Acl_cache_allocator<U> &other [[maybe_unused]])
498
499 template <class U>
501 [[maybe_unused]]) {}
502};
504typedef std::list<ACL_USER *, Acl_user_ptr_allocator> Acl_user_ptr_list;
507
508/* Data Structures */
510extern MEM_ROOT memex;
511const size_t ACL_PREALLOC_SIZE = 10U;
519extern std::unique_ptr<
523extern bool allow_all_hosts;
524extern uint grant_version; /* Version of priv tables */
525extern std::unique_ptr<Acl_restrictions> acl_restrictions;
526// Search for a matching grant. Prefer exact grants before non-exact ones.
527
529
530template <class T>
533 &name_hash,
534 const char *host, const char *ip, const char *db, const char *user,
535 const char *tname, bool exact, bool name_tolower) {
536 T *found = nullptr;
537
538 std::string name = tname;
539 if (name_tolower) my_casedn_str(files_charset_info, &name[0]);
540 std::string key = user;
541 key.push_back('\0');
542 key.append(db);
543 key.push_back('\0');
544 key.append(name);
545 key.push_back('\0');
546
547 auto it_range = name_hash.equal_range(key);
548 for (auto it = it_range.first; it != it_range.second; ++it) {
549 T *grant_name = it->second.get();
550 if (exact) {
551 if (!grant_name->host.get_host() ||
553 grant_name->host.get_host())) ||
554 (ip && !strcmp(ip, grant_name->host.get_host())))
555 return grant_name;
556 } else {
557 if (grant_name->host.compare_hostname(host, ip) &&
558 (!found || found->sort < grant_name->sort))
559 found = grant_name; // Host ok
560 }
561 }
562 return found;
563}
564
565inline GRANT_NAME *routine_hash_search(const char *host, const char *ip,
566 const char *db, const char *user,
567 const char *tname, bool proc,
568 bool exact) {
569 return name_hash_search(proc ? *proc_priv_hash : *func_priv_hash, host, ip,
570 db, user, tname, exact, true);
571}
572
573inline GRANT_TABLE *table_hash_search(const char *host, const char *ip,
574 const char *db, const char *user,
575 const char *tname, bool exact) {
576 return name_hash_search(*column_priv_hash, host, ip, db, user, tname, exact,
577 false);
578}
579
580inline GRANT_COLUMN *column_hash_search(GRANT_TABLE *t, const char *cname,
581 size_t length) {
582 return find_or_nullptr(t->hash_columns, std::string(cname, length));
583}
584
585/* Role management */
586
587/** Tag dispatch for custom Role_properties */
588namespace boost {
590BOOST_INSTALL_PROPERTY(vertex, acl_user);
591} // namespace boost
592
593/**
594 Custom vertex properties used in Granted_roles_graph
595 TODO ACL_USER contains too much information. We only need global access,
596 username and hostname. If this was a POD we don't have to hold the same
597 mutex as ACL_USER.
598*/
599typedef boost::property<boost::vertex_acl_user_t, ACL_USER,
600 boost::property<boost::vertex_name_t, std::string>>
602
603typedef boost::property<boost::edge_capacity_t, int> Role_edge_properties;
604
605/** A graph of all users/roles privilege inheritance */
606typedef boost::adjacency_list<boost::setS, // OutEdges
607 boost::vecS, // Vertices
608 boost::bidirectionalS, // Directed graph
609 Role_properties, // Vertex props
612
613/** The data type of a vertex in the Granted_roles_graph */
614typedef boost::graph_traits<Granted_roles_graph>::vertex_descriptor
616
617/** The data type of an edge in the Granted_roles_graph */
618typedef boost::graph_traits<Granted_roles_graph>::edge_descriptor
620
621/** The datatype of the map between authids and graph vertex descriptors */
622typedef std::unordered_map<std::string, Role_vertex_descriptor> Role_index_map;
623
624/** The type used for the number of edges incident to a vertex in the graph.
625 */
626using degree_s_t = boost::graph_traits<Granted_roles_graph>::degree_size_type;
627
628/** The type for the iterator returned by out_edges(). */
630 boost::graph_traits<Granted_roles_graph>::out_edge_iterator;
631
632/** The type for the iterator returned by in_edges(). */
634 boost::graph_traits<Granted_roles_graph>::in_edge_iterator;
635
636/** Container for global, schema, table/view and routine ACL maps */
637class Acl_map {
638 public:
639 Acl_map(Security_context *sctx, uint64 ver);
640 Acl_map(const Acl_map &map) = delete;
641 Acl_map(const Acl_map &&map);
642 ~Acl_map();
643
644 private:
645 Acl_map &operator=(const Acl_map &map);
646
647 public:
648 void *operator new(size_t size);
649 void operator delete(void *p);
653
665
666 private:
667 std::atomic<int32> m_reference_count;
678};
679
681
683 public:
684 Acl_cache();
685 ~Acl_cache();
686
687 /**
688 When ever the role graph is modified we must flatten the privileges again.
689 This is done by increasing the role graph version counter. Next time
690 a security context is created for an authorization id (aid) a request is
691 also sent to the acl_cache to checkout a flattened acl_map for this
692 particular aid. If a previous acl_map exists the version of this map is
693 compared to the role graph version. If they don't match a new acl_map
694 is calculated and inserted into the cache.
695 */
696 void increase_version();
697 /**
698 Returns a pointer to an acl map to the caller and increase the reference
699 count on the object, iff the object version is the same as the global
700 graph version.
701 If no acl map exists which correspond to the current authorization id of
702 the security context, a new acl map is calculated, inserted into the cache
703 and returned to the user.
704 A new object will also be created if the role graph version counter is
705 different than the acl map object's version.
706
707 @param sctx The target Security_context
708 @param uid The target authid
709 @param active_roles A list of active roles
710
711 @return A pointer to an Acl_map
712 @retval !NULL Success
713 @retval NULL A fatal OOM error happened.
714 */
716 List_of_auth_id_refs &active_roles);
717 /**
718 When the security context is done with the acl map it calls the cache
719 to decrease the reference count on that object.
720 @param map acl map
721 */
723 /**
724 Removes all acl map objects with a references count of zero.
725 */
726 void flush_cache();
727 /**
728 Return a lower boundary to the current version count.
729 */
730 uint64 version();
731 /**
732 Return a snapshot of the number of items in the cache
733 */
734 int32 size();
735
736 private:
737 /**
738 Creates a new acl map for the authorization id of the security context.
739
740 @param version The version of the new map
741 @param sctx The associated security context
742 */
744 /** Role graph version counter */
745 std::atomic<uint64> m_role_graph_version;
748};
749
751
752/**
753 Enum for specifying lock type over Acl cache
754*/
755
757
758/**
759 Lock guard for ACL Cache.
760 Destructor automatically releases the lock.
761*/
762
764 public:
766
767 /**
768 Acl_cache_lock_guard destructor.
769
770 Release lock(s) if taken
771 */
773
774 bool lock(bool raise_error = true);
775 void unlock();
776
777 private:
778 bool already_locked();
779
780 private:
781 /** Handle to THD object */
783 /** Lock mode */
785 /** Lock status */
787};
788
789/**
790 Cache to store the Restrictions of every auth_id.
791 This cache is not thread safe.
792 Callers must acquire acl_cache_write_lock before to amend the cache.
793 Callers should acquire acl_cache_read_lock to probe the cache.
794
795 Acl_restrictions is not part of ACL_USER because as of now latter is POD
796 type class. We use copy-POD for ACL_USER that makes the explicit memory
797 management of its members hard.
798*/
800 public:
802
807
808 void remove_restrictions(const ACL_USER *acl_user);
809 void upsert_restrictions(const ACL_USER *acl_user,
810 const Restrictions &restriction);
811
812 Restrictions find_restrictions(const ACL_USER *acl_user) const;
813 size_t size() const;
814
815 private:
817};
818
819#endif /* SQL_USER_CACHE_INCLUDED */
uint32_t Access_bitmask
Definition: auth_acls.h:34
std::pair< LEX_CSTRING, LEX_CSTRING > Auth_id_ref
user, host tuple which reference either acl_cache or g_default_roles
Definition: auth_common.h:80
std::vector< Auth_id_ref > List_of_auth_id_refs
Definition: auth_common.h:81
std::map< std::string, Access_bitmask > SP_access_map
Definition: auth_internal.h:65
std::map< std::string, Access_bitmask > Db_access_map
Definition: auth_internal.h:66
std::map< std::string, bool > Dynamic_privileges
Definition: auth_internal.h:279
std::unordered_set< std::string > Grant_acl_set
Definition: auth_internal.h:90
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
Definition: sql_auth_cache.h:159
Access_bitmask access
Definition: sql_auth_cache.h:164
ACL_HOST_AND_IP host
Definition: sql_auth_cache.h:162
ACL_ACCESS()
Definition: sql_auth_cache.h:161
ulong sort
Definition: sql_auth_cache.h:163
Definition: sql_auth_cache.h:346
char * user
Definition: sql_auth_cache.h:348
char * db
Definition: sql_auth_cache.h:348
void set_user(MEM_ROOT *mem, const char *user_arg)
Definition: sql_auth_cache.cc:682
void set_host(MEM_ROOT *mem, const char *host_arg)
Definition: sql_auth_cache.cc:686
Definition: sql_auth_cache.h:73
bool check_allow_all_hosts()
Definition: sql_auth_cache.h:150
bool has_wildcard()
Definition: sql_auth_cache.h:145
static bool calc_cidr_mask(const char *ip_arg, long *val)
IP mask parsing in the CIDR format.
Definition: sql_auth_cache.cc:227
long ip_mask
Definition: sql_auth_cache.h:95
size_t get_host_len() const
Definition: sql_auth_cache.h:143
enum_ip_mask_type
IP mask type enum.
Definition: sql_auth_cache.h:78
@ ip_mask_type_cidr
IP specified with a mask in a CIDR form.
Definition: sql_auth_cache.h:86
@ ip_mask_type_subnet
IP specified with a mask in a form of a subnet.
Definition: sql_auth_cache.h:90
@ ip_mask_type_implicit
Only IP is specified.
Definition: sql_auth_cache.h:82
static const char * calc_ip(const char *ip_arg, long *val)
IP parsing.
Definition: sql_auth_cache.cc:250
long ip
Definition: sql_auth_cache.h:95
static bool calc_ip_mask(const char *ip_arg, long *val)
IP mask parsing in the subnet format.
Definition: sql_auth_cache.cc:238
size_t hostname_length
Definition: sql_auth_cache.h:94
void update_hostname(const char *host_arg)
Update the hostname.
Definition: sql_auth_cache.cc:271
ACL_HOST_AND_IP()
Definition: sql_auth_cache.h:136
const char * get_host() const
Definition: sql_auth_cache.h:142
enum_ip_mask_type ip_mask_type
IP mask type.
Definition: sql_auth_cache.h:99
const char * hostname
Definition: sql_auth_cache.h:93
bool compare_hostname(const char *host_arg, const char *ip_arg)
Definition: sql_auth_cache.cc:323
Definition: sql_auth_cache.h:215
char * db
Definition: sql_auth_cache.h:217
Definition: sql_auth_cache.h:354
ACL_HOST_AND_IP proxied_host
Definition: sql_auth_cache.h:356
static int store_data_record(TABLE *table, const LEX_CSTRING &host, const LEX_CSTRING &user, const LEX_CSTRING &proxied_host, const LEX_CSTRING &proxied_user, bool with_grant, const char *grantor)
Definition: sql_auth_cache.cc:656
bool get_with_grant()
Definition: sql_auth_cache.h:383
const char * get_proxied_host()
Definition: sql_auth_cache.h:386
void print_grant(THD *thd, String *str)
Definition: sql_auth_cache.cc:609
bool matches(const char *host_arg, const char *user_arg, const char *ip_arg, const char *proxied_user_arg, bool any_proxy_user)
Definition: sql_auth_cache.cc:560
const char * get_user()
Definition: sql_auth_cache.h:384
void set_host(MEM_ROOT *mem, const char *host_arg)
Definition: sql_auth_cache.cc:678
size_t get_proxied_user_length() const
Definition: sql_auth_cache.h:427
size_t get_user_length() const
Definition: sql_auth_cache.h:425
void init(const char *host_arg, const char *user_arg, const char *proxied_host_arg, const char *proxied_user_arg, bool with_grant_arg)
Definition: sql_auth_cache.cc:511
static int store_pk(TABLE *table, const LEX_CSTRING &host, const LEX_CSTRING &user, const LEX_CSTRING &proxied_host, const LEX_CSTRING &proxied_user)
Definition: sql_auth_cache.cc:620
bool pk_equals(ACL_PROXY_USER *grant)
Definition: sql_auth_cache.cc:586
bool check_validity(bool check_no_resolve)
Definition: sql_auth_cache.cc:547
static bool auth_element_equals(const char *a, const char *b)
Definition: sql_auth_cache.h:395
void set_user(MEM_ROOT *mem, const char *user_arg)
Definition: sql_auth_cache.cc:674
static int store_with_grant(TABLE *table, bool with_grant)
Definition: sql_auth_cache.cc:646
void set_data(ACL_PROXY_USER *grant)
Definition: sql_auth_cache.h:411
old_acl_proxy_users
Definition: sql_auth_cache.h:360
@ MYSQL_PROXIES_PRIV_PROXIED_HOST
Definition: sql_auth_cache.h:363
@ MYSQL_PROXIES_PRIV_HOST
Definition: sql_auth_cache.h:361
@ MYSQL_PROXIES_PRIV_WITH_GRANT
Definition: sql_auth_cache.h:365
@ MYSQL_PROXIES_PRIV_GRANTOR
Definition: sql_auth_cache.h:366
@ MYSQL_PROXIES_PRIV_PROXIED_USER
Definition: sql_auth_cache.h:364
@ MYSQL_PROXIES_PRIV_TIMESTAMP
Definition: sql_auth_cache.h:367
@ MYSQL_PROXIES_PRIV_USER
Definition: sql_auth_cache.h:362
const char * proxied_user
Definition: sql_auth_cache.h:357
const char * get_proxied_user()
Definition: sql_auth_cache.h:385
ACL_PROXY_USER()=default
const char * user
Definition: sql_auth_cache.h:355
bool granted_on(const char *host_arg, const char *user_arg)
Definition: sql_auth_cache.h:401
bool with_grant
Definition: sql_auth_cache.h:358
Definition: sql_auth_cache.h:307
Password_locked_state()
Definition: sql_auth_cache.h:319
void set_parameters(uint password_lock_time_days, uint failed_login_attempts)
Definition: sql_auth_cache.cc:375
int m_password_lock_time_days
read from the user config.
Definition: sql_auth_cache.h:329
uint get_failed_login_attempts() const
Definition: sql_auth_cache.h:315
bool is_active() const
Definition: sql_auth_cache.h:309
uint m_remaining_login_attempts
The remaining login tries, valid only if m_failed_login_attempts and m_password_lock_time_days are no...
Definition: sql_auth_cache.h:339
long m_daynr_locked
The day the account is locked, 0 if not locked.
Definition: sql_auth_cache.h:341
uint m_failed_login_attempts
read from the user config.
Definition: sql_auth_cache.h:334
int get_password_lock_time_days() const
Definition: sql_auth_cache.h:312
bool update(THD *thd, bool successful_login, long *ret_days_remaining)
Updates the password locked state based on the time of day fetched from the THD.
Definition: sql_auth_cache.cc:393
Class that compares ACL_USER objects.
Definition: sql_auth_cache.h:194
bool operator()(const ACL_USER &a, const ACL_USER &b)
Determine sort order of two user accounts.
Definition: sql_auth_cache.cc:3770
Definition: sql_auth_cache.h:246
bool account_locked
Specifies whether the user account is locked or unlocked.
Definition: sql_auth_cache.h:261
Acl_credential credentials[NUM_CREDENTIALS]
Additional credentials.
Definition: sql_auth_cache.h:298
void set_mfa(MEM_ROOT *mem, I_multi_factor_auth *m)
Definition: sql_auth_cache.cc:493
MYSQL_TIME password_last_changed
Definition: sql_auth_cache.h:255
bool use_default_password_reuse_interval
Ignore password_reuse_interval, use the global default global_password_reuse_interval.
Definition: sql_auth_cache.h:288
uint password_lifetime
Definition: sql_auth_cache.h:256
Lex_acl_attrib_udyn password_require_current
The current password needed to be specified while changing it.
Definition: sql_auth_cache.h:293
bool can_authenticate
Definition: sql_auth_cache.h:254
bool is_role
If this ACL_USER was used as a role id then this flag is true.
Definition: sql_auth_cache.h:267
void set_host(MEM_ROOT *mem, const char *host_arg)
Definition: sql_auth_cache.cc:489
LEX_CSTRING plugin
Definition: sql_auth_cache.h:252
bool use_default_password_history
Ignore password_history_length, use the global default global_password_history.
Definition: sql_auth_cache.h:278
ACL_USER()
Definition: sql_auth_cache.cc:337
enum SSL_type ssl_type
Definition: sql_auth_cache.h:250
const char * x509_subject
Definition: sql_auth_cache.h:251
const char * ssl_cipher
Definition: sql_auth_cache.h:251
size_t get_username_length() const
Definition: sql_auth_cache.h:306
uint32 password_reuse_interval
The number of days that would have to pass before a password can be reused.
Definition: sql_auth_cache.h:283
I_multi_factor_auth * m_mfa
Definition: sql_auth_cache.h:343
bool password_expired
Definition: sql_auth_cache.h:253
USER_RESOURCES user_resource
Definition: sql_auth_cache.h:248
void set_user(MEM_ROOT *mem, const char *user_arg)
Definition: sql_auth_cache.cc:485
class ACL_USER::Password_locked_state password_locked_state
char * user
Definition: sql_auth_cache.h:249
const char * x509_issuer
Definition: sql_auth_cache.h:251
bool use_default_password_lifetime
Definition: sql_auth_cache.h:257
uint32 password_history_length
The number of old passwords to check when setting a new password.
Definition: sql_auth_cache.h:272
ACL_USER * copy(MEM_ROOT *root)
Definition: sql_auth_cache.cc:451
Class that compares ACL_ACCESS objects.
Definition: sql_auth_cache.h:172
bool operator()(const ACL_ACCESS &a, const ACL_ACCESS &b)
Determine sort order of two user accounts.
Definition: sql_auth_cache.cc:3740
Definition: sql_auth_cache.h:487
Acl_cache_allocator(const Acl_cache_allocator< U > &other)
Definition: sql_auth_cache.h:496
Acl_cache_allocator & operator=(const Acl_cache_allocator< U > &other)
Definition: sql_auth_cache.h:500
Acl_cache_allocator()
Definition: sql_auth_cache.h:489
Lock guard for ACL Cache.
Definition: sql_auth_cache.h:763
Acl_cache_lock_guard(THD *thd, Acl_cache_lock_mode mode)
Acl_cache_lock_guard constructor.
Definition: sql_auth_cache.cc:3532
Acl_cache_lock_mode m_mode
Lock mode.
Definition: sql_auth_cache.h:784
bool lock(bool raise_error=true)
Explicitly take lock on Acl_cache_lock_cache object.
Definition: sql_auth_cache.cc:3548
void unlock()
Explicitly unlock all acquired locks.
Definition: sql_auth_cache.cc:3578
~Acl_cache_lock_guard()
Acl_cache_lock_guard destructor.
Definition: sql_auth_cache.h:772
bool already_locked()
Check whether lock is already obtained or not.
Definition: sql_auth_cache.cc:3610
bool m_locked
Lock status.
Definition: sql_auth_cache.h:786
THD * m_thd
Handle to THD object.
Definition: sql_auth_cache.h:782
Definition: sql_auth_cache.h:682
int32 size()
Return a snapshot of the number of items in the cache.
Definition: sql_auth_cache.cc:3332
void increase_version()
When ever the role graph is modified we must flatten the privileges again.
Definition: sql_auth_cache.cc:3324
uint64 version()
Return a lower boundary to the current version count.
Definition: sql_auth_cache.cc:3330
~Acl_cache()
Definition: sql_auth_cache.cc:3246
Acl_map * create_acl_map(uint64 version, Security_context *sctx)
Creates a new acl map for the authorization id of the security context.
Definition: sql_auth_cache.cc:3433
mysql_mutex_t m_cache_flush_mutex
Definition: sql_auth_cache.h:747
void flush_cache()
Removes all acl map objects with a references count of zero.
Definition: sql_auth_cache.cc:3412
std::atomic< uint64 > m_role_graph_version
Role graph version counter.
Definition: sql_auth_cache.h:745
Acl_cache_internal m_cache
Definition: sql_auth_cache.h:746
Acl_cache()
Definition: sql_auth_cache.cc:3233
Acl_map * checkout_acl_map(Security_context *sctx, Auth_id_ref &uid, List_of_auth_id_refs &active_roles)
Returns a pointer to an acl map to the caller and increase the reference count on the object,...
Definition: sql_auth_cache.cc:3334
void return_acl_map(Acl_map *map)
When the security context is done with the acl map it calls the cache to decrease the reference count...
Definition: sql_auth_cache.cc:3383
Definition: sql_auth_cache.h:224
uint8 m_salt[SCRAMBLE_LENGTH+1]
The salt variable is used as the password hash for native_password_authetication.
Definition: sql_auth_cache.h:238
uint8 m_salt_len
In the old protocol the salt_len indicated what type of autnetication protocol was used: 0 - no passw...
Definition: sql_auth_cache.h:243
LEX_CSTRING m_auth_string
Definition: sql_auth_cache.h:233
Acl_credential()
Definition: sql_auth_cache.h:226
Container for global, schema, table/view and routine ACL maps.
Definition: sql_auth_cache.h:637
Grant_acl_set * grant_acls()
Definition: sql_auth_cache.cc:3308
void increase_reference_count()
Definition: sql_auth_cache.cc:3320
std::atomic< int32 > m_reference_count
Definition: sql_auth_cache.h:667
Dynamic_privileges * dynamic_privileges()
Definition: sql_auth_cache.cc:3314
Restrictions & restrictions()
Definition: sql_auth_cache.cc:3318
Acl_map(Security_context *sctx, uint64 ver)
Definition: sql_auth_cache.cc:3251
Acl_map & operator=(const Acl_map &map)
Definition: sql_auth_cache.cc:3298
void decrease_reference_count()
Definition: sql_auth_cache.cc:3322
Acl_map(const Acl_map &map)=delete
~Acl_map()
Definition: sql_auth_cache.cc:3278
Db_access_map * db_acls()
Definition: sql_auth_cache.cc:3302
SP_access_map m_sp_acls
Definition: sql_auth_cache.h:673
Table_access_map m_table_acls
Definition: sql_auth_cache.h:671
Access_bitmask m_global_acl
Definition: sql_auth_cache.h:672
uint32 reference_count()
Definition: sql_auth_cache.h:664
Db_access_map * db_wild_acls()
Definition: sql_auth_cache.cc:3304
Access_bitmask global_acl()
Definition: sql_auth_cache.cc:3300
Db_access_map m_db_acls
Definition: sql_auth_cache.h:669
uint64 m_version
Definition: sql_auth_cache.h:668
Db_access_map m_db_wild_acls
Definition: sql_auth_cache.h:670
Table_access_map * table_acls()
Definition: sql_auth_cache.cc:3306
SP_access_map * sp_acls()
Definition: sql_auth_cache.cc:3310
Dynamic_privileges m_dynamic_privileges
Definition: sql_auth_cache.h:676
SP_access_map * func_acls()
Definition: sql_auth_cache.cc:3312
Restrictions m_restrictions
Definition: sql_auth_cache.h:677
SP_access_map m_func_acls
Definition: sql_auth_cache.h:674
Grant_acl_set m_with_admin_acls
Definition: sql_auth_cache.h:675
uint64 version()
Definition: sql_auth_cache.h:663
Cache to store the Restrictions of every auth_id.
Definition: sql_auth_cache.h:799
Acl_restrictions(Acl_restrictions &&)=delete
malloc_unordered_map< std::string, Restrictions > m_restrictions_map
Definition: sql_auth_cache.h:816
Acl_restrictions(const Acl_restrictions &)=delete
Acl_restrictions & operator=(Acl_restrictions &&)=delete
void upsert_restrictions(const ACL_USER *acl_user, const Restrictions &restriction)
Update, insert or remove the Restrictions for the ACL_USER.
Definition: sql_auth_cache.cc:3827
Restrictions find_restrictions(const ACL_USER *acl_user) const
Find the Restrictions of the ACL_USER.
Definition: sql_auth_cache.cc:3854
size_t size() const
Definition: sql_auth_cache.cc:3868
void remove_restrictions(const ACL_USER *acl_user)
Remove the Restrictions of the ACL_USER.
Definition: sql_auth_cache.cc:3807
Acl_restrictions & operator=(const Acl_restrictions &)=delete
Acl_restrictions()
Construstor.
Definition: sql_auth_cache.cc:3800
Definition: sql_auth_cache.h:439
Access_bitmask rights
Definition: sql_auth_cache.h:441
GRANT_COLUMN(String &c, Access_bitmask y)
Definition: sql_auth_cache.cc:916
std::string column
Definition: sql_auth_cache.h:442
Definition: sql_auth_cache.h:446
void set_user_details(const char *h, const char *d, const char *u, const char *t, bool is_routine)
Definition: sql_auth_cache.cc:919
std::string hash_key
Definition: sql_auth_cache.h:454
char * tname
Definition: sql_auth_cache.h:451
const char * user
Definition: sql_auth_cache.h:450
Access_bitmask privs
Definition: sql_auth_cache.h:452
ACL_HOST_AND_IP host
Definition: sql_auth_cache.h:448
char * db
Definition: sql_auth_cache.h:449
virtual ~GRANT_NAME()=default
ulong sort
Definition: sql_auth_cache.h:453
GRANT_NAME(const char *h, const char *d, const char *u, const char *t, Access_bitmask p, bool is_routine)
Definition: sql_auth_cache.cc:943
virtual bool ok()
Definition: sql_auth_cache.h:459
Definition: sql_auth_cache.h:464
collation_unordered_multimap< std::string, unique_ptr_destroy_only< GRANT_COLUMN > > hash_columns
Definition: sql_auth_cache.h:469
GRANT_TABLE(const char *h, const char *d, const char *u, const char *t, Access_bitmask p, Access_bitmask c)
Definition: sql_auth_cache.cc:949
bool init(TABLE *col_privs)
Definition: sql_auth_cache.cc:1007
~GRANT_TABLE() override
bool ok() override
Definition: sql_auth_cache.h:476
Access_bitmask cols
Definition: sql_auth_cache.h:466
An interface to access information about Multi factor authentication methods.
Definition: sql_mfa.h:49
Malloc_allocator is a C++ STL memory allocator based on my_malloc/my_free.
Definition: malloc_allocator.h:63
A typesafe replacement for DYNAMIC_ARRAY.
Definition: prealloced_array.h:71
Container of all restrictions for a given user.
Definition: partial_revokes.h:155
A set of THD members describing the current authenticated user.
Definition: sql_security_ctx.h:54
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: auth_internal.h:68
Definition: sql_auth_cache.h:432
uint16 length
Definition: sql_auth_cache.h:435
char key[1]
Definition: sql_auth_cache.h:436
Access_bitmask access
Definition: sql_auth_cache.h:434
std::unordered_map, but with my_malloc and collation-aware comparison.
Definition: map_helpers.h:219
std::unordered_multimap, but with my_malloc and collation-aware comparison.
Definition: map_helpers.h:235
std::unordered_map, but with my_malloc, so that you can track the memory used using PSI memory keys.
Definition: map_helpers.h:157
std::unordered_multimap, but with my_malloc, so that you can track the memory used using PSI memory k...
Definition: map_helpers.h:198
const char * p
Definition: ctype-mb.cc:1235
A better implementation of the UNIX ctype(3) library.
int my_strcasecmp(const CHARSET_INFO *cs, const char *s1, const char *s2)
Definition: m_ctype.h:653
size_t my_casedn_str(const CHARSET_INFO *cs, char *str)
Definition: m_ctype.h:734
static auto find_or_nullptr(const Container &container, const Key &key)
Some useful helpers for associative arrays with MySQL-specific semantics.
Definition: map_helpers.h:54
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1542
const char wild_many
Character constant for wildcard representing zero or more characters (SQL style).
Definition: mf_wcomp.h:43
const char wild_one
Character constant for wildcard representing any one character (SQL style).
Definition: mf_wcomp.h:37
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
std::unique_ptr< T, Destroy_only< T > > unique_ptr_destroy_only
std::unique_ptr, but only destroying.
Definition: my_alloc.h:477
Header for compiler-dependent features.
Some integer typedefs for easier portability.
uint8_t uint8
Definition: my_inttypes.h:63
int32_t int32
Definition: my_inttypes.h:66
uint64_t uint64
Definition: my_inttypes.h:69
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
#define UINT_MAX32
Definition: my_inttypes.h:79
Functions related to handling of plugins and other dynamically loaded libraries.
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:71
Common header for many mysys elements.
Common definition between mysql server & client.
#define SCRAMBLE_LENGTH
Length of random string sent by server on handshake; this is also length of obfuscated password,...
Definition: mysql_com.h:128
ABI for instrumented mutexes.
Time declarations shared between the server and client API: you should not add anything to this heade...
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1081
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Tag dispatch for custom Role_properties.
Definition: sql_auth_cache.h:588
BOOST_INSTALL_PROPERTY(vertex, acl_user)
vertex_acl_user_t
Definition: sql_auth_cache.h:589
@ vertex_acl_user
Definition: sql_auth_cache.h:589
const std::string password_lock_time_days("password_lock_time_days")
underkeys of password locking
const std::string failed_login_attempts("failed_login_attempts")
underkeys of password locking
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
size_t size(const char *const c)
Definition: base64.h:46
mode
Definition: file_handle.h:61
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2892
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
PSI_memory_key key_memory_acl_cache
Definition: psi_memory_key.cc:101
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Lex_acl_attrib_udyn
This is generic enum.
Definition: table.h:2615
uint grant_version
Definition: sql_auth_cache.cc:166
std::unique_ptr< malloc_unordered_multimap< std::string, unique_ptr_destroy_only< GRANT_TABLE > > > column_priv_hash
Definition: sql_auth_cache.cc:143
Prealloced_array< ACL_DB, ACL_PREALLOC_SIZE > * acl_dbs
Definition: sql_auth_cache.cc:135
std::unique_ptr< malloc_unordered_multimap< std::string, unique_ptr_destroy_only< GRANT_NAME > > > proc_priv_hash
Definition: sql_auth_cache.cc:146
Acl_user_ptr_list * cached_acl_users_for_name(const char *name)
Fetch the list of ACL_USERs which share name or have no name.
Definition: sql_auth_cache.cc:1152
Acl_cache_allocator< ACL_USER * > Acl_user_ptr_allocator
Definition: sql_auth_cache.h:503
boost::adjacency_list< boost::setS, boost::vecS, boost::bidirectionalS, Role_properties, Role_edge_properties > Granted_roles_graph
A graph of all users/roles privilege inheritance.
Definition: sql_auth_cache.h:611
T * name_hash_search(const malloc_unordered_multimap< std::string, unique_ptr_destroy_only< T > > &name_hash, const char *host, const char *ip, const char *db, const char *user, const char *tname, bool exact, bool name_tolower)
Definition: sql_auth_cache.h:531
Acl_cache_lock_mode
Enum for specifying lock type over Acl cache.
Definition: sql_auth_cache.h:756
MYSQL_PLUGIN_IMPORT CHARSET_INFO * files_charset_info
Definition: mysqld.cc:1542
MEM_ROOT global_acl_memory
Definition: sql_auth_cache.cc:131
Prealloced_array< ACL_USER, ACL_PREALLOC_SIZE > * acl_users
Definition: sql_auth_cache.cc:133
bool allow_all_hosts
Definition: sql_auth_cache.cc:165
boost::property< boost::vertex_acl_user_t, ACL_USER, boost::property< boost::vertex_name_t, std::string > > Role_properties
Custom vertex properties used in Granted_roles_graph TODO ACL_USER contains too much information.
Definition: sql_auth_cache.h:601
boost::graph_traits< Granted_roles_graph >::in_edge_iterator in_edge_itr_t
The type for the iterator returned by in_edges().
Definition: sql_auth_cache.h:634
Acl_cache * get_global_acl_cache()
Definition: sql_auth_cache.cc:109
std::unique_ptr< malloc_unordered_multimap< std::string, unique_ptr_destroy_only< GRANT_NAME > > > func_priv_hash
Definition: sql_auth_cache.h:521
boost::graph_traits< Granted_roles_graph >::out_edge_iterator out_edge_itr_t
The type for the iterator returned by out_edges().
Definition: sql_auth_cache.h:630
std::unique_ptr< Acl_restrictions > acl_restrictions
Definition: sql_auth_cache.cc:150
Prealloced_array< ACL_HOST_AND_IP, ACL_PREALLOC_SIZE > * acl_wild_hosts
Definition: sql_auth_cache.cc:136
void rebuild_cached_acl_users_for_name(void)
Build the lists of ACL_USERs which share name or have no name.
Definition: sql_auth_cache.cc:1102
#define NUM_CREDENTIALS
Definition: sql_auth_cache.h:220
boost::property< boost::edge_capacity_t, int > Role_edge_properties
Definition: sql_auth_cache.h:603
MEM_ROOT memex
Definition: sql_auth_cache.cc:132
boost::graph_traits< Granted_roles_graph >::vertex_descriptor Role_vertex_descriptor
The data type of a vertex in the Granted_roles_graph.
Definition: sql_auth_cache.h:615
boost::graph_traits< Granted_roles_graph >::edge_descriptor Role_edge_descriptor
The data type of an edge in the Granted_roles_graph.
Definition: sql_auth_cache.h:619
GRANT_TABLE * table_hash_search(const char *host, const char *ip, const char *db, const char *user, const char *tname, bool exact)
Definition: sql_auth_cache.h:573
std::list< ACL_USER *, Acl_user_ptr_allocator > Acl_user_ptr_list
Definition: sql_auth_cache.h:504
std::unordered_map< std::string, Role_vertex_descriptor > Role_index_map
The datatype of the map between authids and graph vertex descriptors.
Definition: sql_auth_cache.h:622
boost::graph_traits< Granted_roles_graph >::degree_size_type degree_s_t
The type used for the number of edges incident to a vertex in the graph.
Definition: sql_auth_cache.h:626
GRANT_NAME * routine_hash_search(const char *host, const char *ip, const char *db, const char *user, const char *tname, bool proc, bool exact)
Definition: sql_auth_cache.h:565
collation_unordered_map< std::string, ACL_USER * > * acl_check_hosts
Definition: sql_auth_cache.cc:149
const size_t ACL_PREALLOC_SIZE
Definition: sql_auth_cache.h:511
Prealloced_array< ACL_PROXY_USER, ACL_PREALLOC_SIZE > * acl_proxy_users
Definition: sql_auth_cache.cc:134
GRANT_COLUMN * column_hash_search(GRANT_TABLE *t, const char *cname, size_t length)
Definition: sql_auth_cache.h:580
LF_HASH Acl_cache_internal
Definition: sql_auth_cache.h:680
static MEM_ROOT mem
Definition: sql_servers.cc:100
case opt name
Definition: sslopt-case.h:29
Definition: sql_auth_cache.h:491
Acl_cache_allocator< U > other
Definition: sql_auth_cache.h:492
Definition: m_ctype.h:423
Definition: lf.h:187
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: mysql_lex_string.h:40
Definition: mysql_time.h:82
Definition: table.h:1406
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: sql_connect.h:41
Vio Lite.
SSL_type
Definition: violite.h:307