mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
A previous changeset by me today about SQL_LOG_BIN had the problem
that it tested the privilege in ::update() whereas it should be in ::check() (see email from Serg, subject "Re: bk commit - 4.1 tree (guilhem:1.1706)"). So I add instead a check_func function to sys_var_thd_bit. I do the same addition to sys_var_thd_ulong, to unify handling of PSEUDO_THREAD_ID with the one of SQL_LOG_BIN. So class sys_var_pseudo_thread_id is not needed anymore, removing it.
This commit is contained in:
@ -5,10 +5,17 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
reset master;
|
||||
SET @@session.pseudo_thread_id=100;
|
||||
SET @save_select_limit=@@session.sql_select_limit;
|
||||
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
|
||||
ERROR HY000: Access denied. You need the SUPER privilege for this operation
|
||||
SET @@session.sql_log_bin=0;
|
||||
SELECT @@session.sql_select_limit = @save_select_limit;
|
||||
@@session.sql_select_limit = @save_select_limit
|
||||
1
|
||||
SET @@session.sql_select_limit=10, @@session.sql_log_bin=0;
|
||||
ERROR HY000: Access denied. You need the SUPER privilege for this operation
|
||||
SELECT @@session.sql_select_limit = @save_select_limit;
|
||||
@@session.sql_select_limit = @save_select_limit
|
||||
1
|
||||
SET @@session.pseudo_thread_id=100;
|
||||
SET @@session.pseudo_thread_id=connection_id();
|
||||
SET @@session.sql_log_bin=0;
|
||||
|
@ -28,11 +28,14 @@ connect (con3,localhost,zedjzlcsjhd,,);
|
||||
# check that it requires the SUPER privilege.
|
||||
|
||||
connection con3;
|
||||
SET @save_select_limit=@@session.sql_select_limit;
|
||||
--error 1227
|
||||
SET @@session.pseudo_thread_id=100;
|
||||
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
|
||||
SELECT @@session.sql_select_limit = @save_select_limit; #shouldn't have changed
|
||||
# While we are here we also test that SQL_LOG_BIN can't be set
|
||||
--error 1227
|
||||
SET @@session.sql_log_bin=0;
|
||||
SET @@session.sql_select_limit=10, @@session.sql_log_bin=0;
|
||||
SELECT @@session.sql_select_limit = @save_select_limit; #shouldn't have changed
|
||||
# Now as root, to be sure it works
|
||||
connection con2;
|
||||
SET @@session.pseudo_thread_id=100;
|
||||
|
Reference in New Issue
Block a user