1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge branch '10.2' into 10.3

This commit is contained in:
Oleksandr Byelkin
2019-10-31 10:58:06 +01:00
107 changed files with 2597 additions and 1355 deletions

View File

@ -1620,12 +1620,16 @@ public:
/**
@class Sub_statement_state
@brief Used to save context when executing a function or trigger
operations on stat tables aren't technically a sub-statement, but they are
similar in a sense that they cannot change the transaction status.
*/
/* Defines used for Sub_statement_state::in_sub_stmt */
#define SUB_STMT_TRIGGER 1
#define SUB_STMT_FUNCTION 2
#define SUB_STMT_STAT_TABLES 4
class Sub_statement_state
@ -6545,6 +6549,22 @@ class Sql_mode_save
sql_mode_t old_mode; // SQL mode saved at construction time.
};
class Switch_to_definer_security_ctx
{
public:
Switch_to_definer_security_ctx(THD *thd, TABLE_LIST *table) :
m_thd(thd), m_sctx(thd->security_ctx)
{
if (table->security_ctx)
thd->security_ctx= table->security_ctx;
}
~Switch_to_definer_security_ctx() { m_thd->security_ctx = m_sctx; }
private:
THD *m_thd;
Security_context *m_sctx;
};
/**
This class resembles the SQL Standard schema qualified object name: