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