Browse Source
MDEV-12684 Show what config file a sysvar got a value from
MDEV-12684 Show what config file a sysvar got a value from
Show the config file in I_S.SYSTEM_VARIABLES But only if the user has FILE privilege10.5-circular-buffer
14 changed files with 270 additions and 13 deletions
-
2mysql-test/suite/funcs_1/r/is_columns_is.result
-
2mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
-
4mysql-test/suite/plugins/r/simple_password_check.result
-
8mysql-test/suite/sys_vars/r/sysvars_debug.result
-
113mysql-test/suite/sys_vars/r/sysvars_star.result
-
49mysql-test/suite/sys_vars/r/sysvars_wsrep.result
-
5mysql-test/suite/sys_vars/t/sysvars_star.cnf
-
2mysql-test/suite/sys_vars/t/sysvars_star.opt
-
41mysql-test/suite/sys_vars/t/sysvars_star.test
-
10sql/mysqld.cc
-
10sql/set_var.cc
-
3sql/set_var.h
-
33sql/sql_plugin.cc
-
1sql/sql_show.cc
@ -0,0 +1,113 @@ |
|||
set completion_type=CHAIN; |
|||
set global low_priority_updates=1; |
|||
install soname 'sql_errlog'; |
|||
select * from information_schema.system_variables |
|||
where variable_name in ( |
|||
'completion_type', #session!=global, origin=compile-time |
|||
'low_priority_updates', #global!=default, origin=sql |
|||
'column_compression_threshold', #origin=command-line |
|||
'plugin_maturity', #origin=config |
|||
'sql_error_log_rate', #plugin, origin=command-line |
|||
'sql_error_log_rotations' #plugin, origin=config |
|||
) |
|||
order by variable_name; |
|||
VARIABLE_NAME COLUMN_COMPRESSION_THRESHOLD |
|||
SESSION_VALUE 120 |
|||
GLOBAL_VALUE 120 |
|||
GLOBAL_VALUE_ORIGIN COMMAND-LINE |
|||
DEFAULT_VALUE 100 |
|||
VARIABLE_SCOPE SESSION |
|||
VARIABLE_TYPE INT UNSIGNED |
|||
VARIABLE_COMMENT Minimum column data length eligible for compression |
|||
NUMERIC_MIN_VALUE 0 |
|||
NUMERIC_MAX_VALUE 4294967295 |
|||
NUMERIC_BLOCK_SIZE 1 |
|||
ENUM_VALUE_LIST NULL |
|||
READ_ONLY NO |
|||
COMMAND_LINE_ARGUMENT REQUIRED |
|||
GLOBAL_VALUE_PATH NULL |
|||
VARIABLE_NAME COMPLETION_TYPE |
|||
SESSION_VALUE CHAIN |
|||
GLOBAL_VALUE NO_CHAIN |
|||
GLOBAL_VALUE_ORIGIN COMPILE-TIME |
|||
DEFAULT_VALUE NO_CHAIN |
|||
VARIABLE_SCOPE SESSION |
|||
VARIABLE_TYPE ENUM |
|||
VARIABLE_COMMENT The transaction completion type |
|||
NUMERIC_MIN_VALUE NULL |
|||
NUMERIC_MAX_VALUE NULL |
|||
NUMERIC_BLOCK_SIZE NULL |
|||
ENUM_VALUE_LIST NO_CHAIN,CHAIN,RELEASE |
|||
READ_ONLY NO |
|||
COMMAND_LINE_ARGUMENT REQUIRED |
|||
GLOBAL_VALUE_PATH NULL |
|||
VARIABLE_NAME LOW_PRIORITY_UPDATES |
|||
SESSION_VALUE OFF |
|||
GLOBAL_VALUE ON |
|||
GLOBAL_VALUE_ORIGIN SQL |
|||
DEFAULT_VALUE OFF |
|||
VARIABLE_SCOPE SESSION |
|||
VARIABLE_TYPE BOOLEAN |
|||
VARIABLE_COMMENT INSERTvar/UPDATE has lower priority than selects |
|||
NUMERIC_MIN_VALUE NULL |
|||
NUMERIC_MAX_VALUE NULL |
|||
NUMERIC_BLOCK_SIZE NULL |
|||
ENUM_VALUE_LIST OFF,ON |
|||
READ_ONLY NO |
|||
COMMAND_LINE_ARGUMENT OPTIONAL |
|||
GLOBAL_VALUE_PATH NULL |
|||
VARIABLE_NAME PLUGIN_MATURITY |
|||
SESSION_VALUE NULL |
|||
GLOBAL_VALUE alpha |
|||
GLOBAL_VALUE_ORIGIN CONFIG |
|||
DEFAULT_VALUE experimental |
|||
VARIABLE_SCOPE GLOBAL |
|||
VARIABLE_TYPE ENUM |
|||
VARIABLE_COMMENT The lowest desirable plugin maturity. Plugins less mature than that will not be installed or loaded |
|||
NUMERIC_MIN_VALUE NULL |
|||
NUMERIC_MAX_VALUE NULL |
|||
NUMERIC_BLOCK_SIZE NULL |
|||
ENUM_VALUE_LIST unknown,experimental,alpha,beta,gamma,stable |
|||
READ_ONLY YES |
|||
COMMAND_LINE_ARGUMENT REQUIRED |
|||
GLOBAL_VALUE_PATH var/my.cnf |
|||
VARIABLE_NAME SQL_ERROR_LOG_RATE |
|||
SESSION_VALUE NULL |
|||
GLOBAL_VALUE 100 |
|||
GLOBAL_VALUE_ORIGIN COMMAND-LINE |
|||
DEFAULT_VALUE 1 |
|||
VARIABLE_SCOPE GLOBAL |
|||
VARIABLE_TYPE INT UNSIGNED |
|||
VARIABLE_COMMENT Sampling rate. If set to 0(zero), the logging is disabled. |
|||
NUMERIC_MIN_VALUE 0 |
|||
NUMERIC_MAX_VALUE 1000000 |
|||
NUMERIC_BLOCK_SIZE 1 |
|||
ENUM_VALUE_LIST NULL |
|||
READ_ONLY NO |
|||
COMMAND_LINE_ARGUMENT REQUIRED |
|||
GLOBAL_VALUE_PATH NULL |
|||
VARIABLE_NAME SQL_ERROR_LOG_ROTATIONS |
|||
SESSION_VALUE NULL |
|||
GLOBAL_VALUE 5 |
|||
GLOBAL_VALUE_ORIGIN CONFIG |
|||
DEFAULT_VALUE 9 |
|||
VARIABLE_SCOPE GLOBAL |
|||
VARIABLE_TYPE INT UNSIGNED |
|||
VARIABLE_COMMENT Number of rotations before log is removed. |
|||
NUMERIC_MIN_VALUE 1 |
|||
NUMERIC_MAX_VALUE 999 |
|||
NUMERIC_BLOCK_SIZE 1 |
|||
ENUM_VALUE_LIST NULL |
|||
READ_ONLY YES |
|||
COMMAND_LINE_ARGUMENT REQUIRED |
|||
GLOBAL_VALUE_PATH var/my.cnf |
|||
create user foo@localhost; |
|||
connect foo,localhost,foo; |
|||
select global_value_path from information_schema.system_variables where variable_name='plugin_maturity'; |
|||
global_value_path NULL |
|||
connection default; |
|||
select global_value_path from information_schema.system_variables where variable_name='plugin_maturity'; |
|||
global_value_path var/my.cnf |
|||
drop user foo@localhost; |
|||
set global low_priority_updates=default; |
|||
uninstall soname 'sql_errlog'; |
|||
@ -0,0 +1,5 @@ |
|||
!include include/default_my.cnf |
|||
|
|||
[server] |
|||
loose-sql-error-log-rotations=5 |
|||
plugin-maturity=alpha |
|||
@ -0,0 +1,2 @@ |
|||
--column-compression-threshold=120 |
|||
--loose-sql-error-log-rate=100 |
|||
@ -0,0 +1,41 @@ |
|||
# |
|||
# MDEV-12684 Show what config file a sysvar got a value from |
|||
# |
|||
|
|||
source include/not_embedded.inc; |
|||
if (!$SQL_ERRLOG_SO) { |
|||
skip No sql_errlog plugin; |
|||
} |
|||
|
|||
#system_versioning_alter_history |
|||
#binlog_format |
|||
set completion_type=CHAIN; |
|||
set global low_priority_updates=1; |
|||
|
|||
install soname 'sql_errlog'; |
|||
|
|||
vertical_results; |
|||
replace_regex /\/.*\//var\//; |
|||
select * from information_schema.system_variables |
|||
where variable_name in ( |
|||
'completion_type', #session!=global, origin=compile-time |
|||
'low_priority_updates', #global!=default, origin=sql |
|||
'column_compression_threshold', #origin=command-line |
|||
'plugin_maturity', #origin=config |
|||
'sql_error_log_rate', #plugin, origin=command-line |
|||
'sql_error_log_rotations' #plugin, origin=config |
|||
) |
|||
order by variable_name; |
|||
|
|||
create user foo@localhost; |
|||
|
|||
connect foo,localhost,foo; |
|||
select global_value_path from information_schema.system_variables where variable_name='plugin_maturity'; |
|||
connection default; |
|||
replace_regex /\/.*\//var\//; |
|||
select global_value_path from information_schema.system_variables where variable_name='plugin_maturity'; |
|||
|
|||
drop user foo@localhost; |
|||
set global low_priority_updates=default; |
|||
disable_warnings; |
|||
uninstall soname 'sql_errlog'; |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue