Bug #118266 We can't set some session variable even have super privilege
Submitted: 26 May 2:29 Modified: 30 May 7:03
Reporter: karry zhang (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[26 May 2:29] karry zhang
Description:
We can't set some session variable even have super privilege 

How to repeat:
Execute the following test cases:

CREATE USER 'test_user'@'localhost';
GRANT SUPER on *.* to 'test_user'@'localhost';

connect(conn,localhost,test_user,,);
connection conn;

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set select_into_buffer_size = 8192;

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set select_into_disk_sync_delay = 8192;

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set low_priority_updates=on;

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set max_insert_delayed_threads=1024;

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set max_error_count=2048;

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set min_examined_row_limit=1024;

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set preload_buffer_size=1024;

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
set internal_tmp_mem_storage_engine = 'MEMORY';

--error ER_SPECIFIC_ACCESS_DENIED_ERROR
SET show_old_temporals = ON;

connection default;
DROP USER 'test_user'@'localhost';

Suggested fix:
We can set these session variable when we have super privilege.
[26 May 5:11] karry zhang
Hello, Verification Team, this is my patch.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: fix.patch (application/octet-stream, text), 5.39 KiB.

[29 May 12:55] MySQL Verification Team
Hello karry zhang,

Thank you for the report and contribution.

regards,
Umesh
[30 May 7:00] Georgi Kodinov
Note that the SUPER privilege is deprecated and will be removed going forward.
Please consider using the individual more detailed replacements. 
Also, some new features do not even check SUPER.
[30 May 7:03] Georgi Kodinov
Posted by developer:
 
This is not a bug. SUPER is deprecated. Please use the replacement, more specific privileges.