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

cleanup: RAII helper for changing thd->count_cuted_rows

This commit is contained in:
Sergei Golubchik
2020-11-23 19:40:47 +01:00
parent 08b0b70daa
commit 00f54b56b1
12 changed files with 42 additions and 64 deletions

View File

@ -6581,6 +6581,23 @@ class Switch_to_definer_security_ctx
};
class Check_level_instant_set
{
THD *m_thd;
enum_check_fields m_check_level;
public:
Check_level_instant_set(THD *thd, enum_check_fields temporary_value)
:m_thd(thd), m_check_level(thd->count_cuted_fields)
{
thd->count_cuted_fields= temporary_value;
}
~Check_level_instant_set()
{
m_thd->count_cuted_fields= m_check_level;
}
};
/**
This class resembles the SQL Standard schema qualified object name:
<schema qualified name> ::= [ <schema name> <period> ] <qualified identifier>