mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
A fix for Bug#22891 "session level max_allowed_packet can be
set but is ignored". This patch makes @@session.max_allowed_packed and @@session.net_buffer_length read-only as suggested in the bug report. The user will have to use SET GLOBAL (and reconnect) to alter the session values of these variables. The error string ER_VARIABLE_IS_READONLY is introduced. Tests are modified accordingly.
This commit is contained in:
@ -1024,6 +1024,29 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief This is a specialization of sys_var_thd_ulong that implements a
|
||||
read-only session variable. The class overrides check() and check_default()
|
||||
to achieve the read-only property for the session part of the variable.
|
||||
*/
|
||||
class sys_var_thd_ulong_session_readonly : public sys_var_thd_ulong
|
||||
{
|
||||
public:
|
||||
sys_var_thd_ulong_session_readonly(sys_var_chain *chain_arg,
|
||||
const char *name_arg, ulong SV::*offset_arg,
|
||||
sys_check_func c_func= NULL,
|
||||
sys_after_update_func au_func= NULL,
|
||||
Binlog_status_enum bl_status_arg= NOT_IN_BINLOG):
|
||||
sys_var_thd_ulong(chain_arg, name_arg, offset_arg, c_func, au_func, bl_status_arg)
|
||||
{ }
|
||||
bool check(THD *thd, set_var *var);
|
||||
bool check_default(enum_var_type type)
|
||||
{
|
||||
return type != OPT_GLOBAL || !option_limits;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class sys_var_microseconds :public sys_var_thd
|
||||
{
|
||||
ulonglong SV::*offset;
|
||||
|
Reference in New Issue
Block a user