SET @global=@@global.proxy_protocol_networks; # # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables # # Test that "SET proxy_protocol_networks" is not allowed without CONNECTION ADMIN CREATE USER user1@localhost; GRANT ALL PRIVILEGES ON *.* TO user1@localhost; REVOKE CONNECTION ADMIN ON *.* FROM user1@localhost; connect user1,localhost,user1,,; SET GLOBAL proxy_protocol_networks=""; ERROR 42000: Access denied; you need (at least one of) the CONNECTION ADMIN privilege(s) for this operation SET proxy_protocol_networks=""; ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL SET SESSION proxy_protocol_networks=""; ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL disconnect user1; connection default; DROP USER user1@localhost; # Test that "SET proxy_protocol_networks" is allowed with CONNECTION ADMIN CREATE USER user1@localhost; GRANT CONNECTION ADMIN ON *.* TO user1@localhost; connect user1,localhost,user1,,; SET GLOBAL proxy_protocol_networks=""; SET proxy_protocol_networks=""; ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL SET SESSION proxy_protocol_networks=""; ERROR HY000: Variable 'proxy_protocol_networks' is a GLOBAL variable and should be set with SET GLOBAL disconnect user1; connection default; DROP USER user1@localhost; # # MDEV-39658 ASAN crash on invalid proxy_protocol_networks value # SET GLOBAL proxy_protocol_networks='1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0'; ERROR 42000: Error parsing proxy_protocol_networks parameter, near '1' # End of 10.6 tests SET @@global.proxy_protocol_networks=@global;