1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.4' into bb-10.4-mdev16188

This commit is contained in:
Igor Babaev
2019-02-14 22:07:33 -08:00
387 changed files with 24685 additions and 5426 deletions

View File

@ -28,6 +28,7 @@
#include "rpl_tblmap.h"
#include "mdl.h"
#include "field.h" // Create_field
#include "opt_trace_context.h"
#include "probes_mysql.h"
#include "sql_locale.h" /* my_locale_st */
#include "sql_profile.h" /* PROFILING */
@ -569,6 +570,8 @@ typedef struct system_variables
ulonglong long_query_time;
ulonglong max_statement_time;
ulonglong optimizer_switch;
ulonglong optimizer_trace;
ulong optimizer_trace_max_mem_size;
sql_mode_t sql_mode; ///< which non-standard SQL behaviour should be enabled
sql_mode_t old_behavior; ///< which old SQL behaviour should be enabled
ulonglong option_bits; ///< OPTION_xxx constants, e.g. OPTION_PROFILING
@ -1351,6 +1354,14 @@ public:
restore_security_context(THD *thd, Security_context *backup);
#endif
bool user_matches(Security_context *);
/**
Check global access
@param want_access The required privileges
@param match_any if the security context must match all or any of the req.
* privileges.
@return True if the security context fulfills the access requirements.
*/
bool check_access(ulong want_access, bool match_any = false);
};
@ -2307,6 +2318,8 @@ public:
Security_context main_security_ctx;
Security_context *security_ctx;
Security_context *security_context() const { return security_ctx; }
void set_security_context(Security_context *sctx) { security_ctx = sctx; }
/*
Points to info-string that we show in SHOW PROCESSLIST
@ -2381,6 +2394,9 @@ public:
uint dbug_sentry; // watch out for memory corruption
#endif
struct st_my_thread_var *mysys_var;
/* Original charset number from the first client packet, or COM_CHANGE_USER*/
CHARSET_INFO *org_charset;
private:
/*
Type of current query: COM_STMT_PREPARE, COM_QUERY, etc. Set from
@ -2987,6 +3003,7 @@ public:
ulonglong bytes_sent_old;
ulonglong affected_rows; /* Number of changed rows */
Opt_trace_context opt_trace;
pthread_t real_id; /* For debugging */
my_thread_id thread_id, thread_dbug_id;
uint32 os_thread_id;
@ -3295,6 +3312,7 @@ public:
void reset_for_reuse();
bool store_globals();
void reset_globals();
bool trace_started();
#ifdef SIGNAL_WITH_VIO_CLOSE
inline void set_active_vio(Vio* vio)
{
@ -3438,10 +3456,6 @@ public:
inline ulong query_start_sec_part()
{ query_start_sec_part_used=1; return start_time_sec_part; }
MYSQL_TIME query_start_TIME();
Timeval query_start_timeval()
{
return Timeval(query_start(), query_start_sec_part());
}
time_round_mode_t temporal_round_mode() const
{
return variables.sql_mode & MODE_TIME_ROUND_FRACTIONAL ?