1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for bug #29131: SHOW VARIABLES reports variable 'log' but SET

doesn't recognize it

This is a 5.0 version of the patch, it will be null-merged to 5.1

Problem:

'log' and 'log_slow_queries' were "fixed" variables, i.e. they showed up
in SHOW VARIABLES, but could not be used in expressions like 
"select @@log". Also, using them in the SET statement produced an 
incorrect "unknown system variable" error.

Solution:

Make 'log' and 'log_slow_queries' read-only dynamic variables to make 
them available for use in expressions, and produce a correct error 
about the variable being read-only when used in the SET statement.
This commit is contained in:
kaa@polly.(none)
2007-10-25 14:02:27 +04:00
parent 349841118f
commit 99f4b74311
6 changed files with 62 additions and 6 deletions

View File

@ -674,6 +674,20 @@ set @@hostname= "anothername";
--replace_column 2 #
show variables like 'hostname';
#
# Bug #29131: SHOW VARIABLES reports variable 'log' but SET doesn't recognize it
#
SHOW VARIABLES LIKE 'log';
SELECT @@log;
--error 1238
SET GLOBAL log=0;
SHOW VARIABLES LIKE 'log_slow_queries';
SELECT @@log_slow_queries;
--error 1238
SET GLOBAL log_slow_queries=0;
--echo End of 5.0 tests
# This is at the very after the versioned tests, since it involves doing