Commit e4212898 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-8542 - The "aria_recover" variable should be renamed "aria_recover_options"

            to match MyISAM

Renamed aria_recover to aria_recover_options.
parent 54689e1d
......@@ -2131,7 +2131,7 @@ sub mysqld_client_arguments () {
sub have_maria_support () {
my $maria_var= $mysqld_variables{'aria-recover'};
my $maria_var= $mysqld_variables{'aria-recover-options'};
return defined $maria_var;
}
......
--loose-aria-recover=backup --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp
--loose-aria-recover-options=backup --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp
select @@global.aria_recover;
@@global.aria_recover
select @@global.aria_recover_options;
@@global.aria_recover_options
BACKUP
set global aria_recover=off;
select @@global.aria_recover;
@@global.aria_recover
set global aria_recover_options=off;
select @@global.aria_recover_options;
@@global.aria_recover_options
OFF
set global aria_recover=default;
select @@global.aria_recover;
@@global.aria_recover
set global aria_recover_options=default;
select @@global.aria_recover_options;
@@global.aria_recover_options
NORMAL
set global aria_recover=normal;
select @@global.aria_recover;
@@global.aria_recover
set global aria_recover_options=normal;
select @@global.aria_recover_options;
@@global.aria_recover_options
NORMAL
drop database if exists mysqltest;
create database mysqltest;
......@@ -35,5 +35,5 @@ a
ThursdayMorningsMarket
ThursdayMorningsMarketb
drop database mysqltest;
set global aria_recover=backup;
set global aria_recover_options=backup;
set global aria_checkpoint_interval=30;
# Test of the --aria-recover option.
# Test of the --aria-recover-options option.
--source include/have_maria.inc
......@@ -18,13 +18,13 @@ let $def_checkinterval=`select @@global.aria_checkpoint_interval`;
# so that the perl code below can access it.
let MYSQLD_DATADIR= `select @@datadir`;
select @@global.aria_recover;
set global aria_recover=off;
select @@global.aria_recover;
set global aria_recover=default;
select @@global.aria_recover;
set global aria_recover=normal;
select @@global.aria_recover;
select @@global.aria_recover_options;
set global aria_recover_options=off;
select @@global.aria_recover_options;
set global aria_recover_options=default;
select @@global.aria_recover_options;
set global aria_recover_options=normal;
select @@global.aria_recover_options;
--disable_warnings
drop database if exists mysqltest;
......@@ -72,5 +72,5 @@ select * from t_corrupted2; # should show corruption and repair messages
select * from t_corrupted2; # should show just rows
drop database mysqltest;
set global aria_recover=backup;
set global aria_recover_options=backup;
eval set global aria_checkpoint_interval=$def_checkinterval;
......@@ -317,7 +317,7 @@ aria_pagecache_buffer_size 8388608
aria_pagecache_division_limit 100
aria_pagecache_file_hash_size 512
aria_page_checksum OFF
aria_recover NORMAL
aria_recover_options NORMAL
aria_repair_threads 1
aria_sort_buffer_size 268434432
aria_stats_method nulls_unequal
......
......@@ -2,7 +2,7 @@ package My::Suite::Maria;
@ISA = qw(My::Suite);
return "Need Aria engine" unless defined $::mysqld_variables{'aria-recover'};
return "Need Aria engine" unless defined $::mysqld_variables{'aria-recover-options'};
bless { };
SET @start_global_value = @@global.aria_recover;
select @@global.aria_recover;
@@global.aria_recover
NORMAL
select @@session.aria_recover;
ERROR HY000: Variable 'aria_recover' is a GLOBAL variable
show global variables like 'aria_recover';
Variable_name Value
aria_recover NORMAL
show session variables like 'aria_recover';
Variable_name Value
aria_recover NORMAL
select * from information_schema.global_variables where variable_name='aria_recover';
VARIABLE_NAME VARIABLE_VALUE
ARIA_RECOVER NORMAL
select * from information_schema.session_variables where variable_name='aria_recover';
VARIABLE_NAME VARIABLE_VALUE
ARIA_RECOVER NORMAL
set global aria_recover=1;
select @@global.aria_recover;
@@global.aria_recover
NORMAL
set session aria_recover=1;
ERROR HY000: Variable 'aria_recover' is a GLOBAL variable and should be set with SET GLOBAL
set global aria_recover=normal;
select @@global.aria_recover;
@@global.aria_recover
NORMAL
set global aria_recover=backup;
select @@global.aria_recover;
@@global.aria_recover
BACKUP
set global aria_recover='force';
select @@global.aria_recover;
@@global.aria_recover
FORCE
set global aria_recover=off;
select @@global.aria_recover;
@@global.aria_recover
OFF
set global aria_recover='quick,force';
select @@global.aria_recover;
@@global.aria_recover
FORCE,QUICK
set global aria_recover=16;
select @@global.aria_recover;
@@global.aria_recover
OFF
set global aria_recover=1.1;
ERROR 42000: Incorrect argument type to variable 'aria_recover'
set global aria_recover=1e1;
ERROR 42000: Incorrect argument type to variable 'aria_recover'
set global aria_recover="foo";
ERROR 42000: Variable 'aria_recover' can't be set to the value of 'foo'
set global aria_recover=32;
ERROR 42000: Variable 'aria_recover' can't be set to the value of '32'
SET @@global.aria_recover = @start_global_value;
SET @start_global_value = @@global.aria_recover_options;
select @@global.aria_recover_options;
@@global.aria_recover_options
NORMAL
select @@session.aria_recover_options;
ERROR HY000: Variable 'aria_recover_options' is a GLOBAL variable
show global variables like 'aria_recover_options';
Variable_name Value
aria_recover_options NORMAL
show session variables like 'aria_recover_options';
Variable_name Value
aria_recover_options NORMAL
select * from information_schema.global_variables where variable_name='aria_recover_options';
VARIABLE_NAME VARIABLE_VALUE
ARIA_RECOVER_OPTIONS NORMAL
select * from information_schema.session_variables where variable_name='aria_recover_options';
VARIABLE_NAME VARIABLE_VALUE
ARIA_RECOVER_OPTIONS NORMAL
set global aria_recover_options=1;
select @@global.aria_recover_options;
@@global.aria_recover_options
NORMAL
set session aria_recover_options=1;
ERROR HY000: Variable 'aria_recover_options' is a GLOBAL variable and should be set with SET GLOBAL
set global aria_recover_options=normal;
select @@global.aria_recover_options;
@@global.aria_recover_options
NORMAL
set global aria_recover_options=backup;
select @@global.aria_recover_options;
@@global.aria_recover_options
BACKUP
set global aria_recover_options='force';
select @@global.aria_recover_options;
@@global.aria_recover_options
FORCE
set global aria_recover_options=off;
select @@global.aria_recover_options;
@@global.aria_recover_options
OFF
set global aria_recover_options='quick,force';
select @@global.aria_recover_options;
@@global.aria_recover_options
FORCE,QUICK
set global aria_recover_options=16;
select @@global.aria_recover_options;
@@global.aria_recover_options
OFF
set global aria_recover_options=1.1;
ERROR 42000: Incorrect argument type to variable 'aria_recover_options'
set global aria_recover_options=1e1;
ERROR 42000: Incorrect argument type to variable 'aria_recover_options'
set global aria_recover_options="foo";
ERROR 42000: Variable 'aria_recover_options' can't be set to the value of 'foo'
set global aria_recover_options=32;
ERROR 42000: Variable 'aria_recover_options' can't be set to the value of '32'
SET @@global.aria_recover_options = @start_global_value;
......@@ -211,7 +211,7 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_RECOVER
VARIABLE_NAME ARIA_RECOVER_OPTIONS
SESSION_VALUE NULL
GLOBAL_VALUE NORMAL
GLOBAL_VALUE_ORIGIN COMPILE-TIME
......
# set global
--source include/have_maria.inc
SET @start_global_value = @@global.aria_recover;
SET @start_global_value = @@global.aria_recover_options;
#
# exists as global only
#
select @@global.aria_recover;
select @@global.aria_recover_options;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.aria_recover;
show global variables like 'aria_recover';
show session variables like 'aria_recover';
select * from information_schema.global_variables where variable_name='aria_recover';
select * from information_schema.session_variables where variable_name='aria_recover';
select @@session.aria_recover_options;
show global variables like 'aria_recover_options';
show session variables like 'aria_recover_options';
select * from information_schema.global_variables where variable_name='aria_recover_options';
select * from information_schema.session_variables where variable_name='aria_recover_options';
#
# show that it's writable
#
set global aria_recover=1;
select @@global.aria_recover;
set global aria_recover_options=1;
select @@global.aria_recover_options;
--error ER_GLOBAL_VARIABLE
set session aria_recover=1;
set session aria_recover_options=1;
#
# valid values
#
set global aria_recover=normal;
select @@global.aria_recover;
set global aria_recover=backup;
select @@global.aria_recover;
set global aria_recover='force';
select @@global.aria_recover;
set global aria_recover=off;
select @@global.aria_recover;
set global aria_recover='quick,force';
select @@global.aria_recover;
set global aria_recover=16;
select @@global.aria_recover;
set global aria_recover_options=normal;
select @@global.aria_recover_options;
set global aria_recover_options=backup;
select @@global.aria_recover_options;
set global aria_recover_options='force';
select @@global.aria_recover_options;
set global aria_recover_options=off;
select @@global.aria_recover_options;
set global aria_recover_options='quick,force';
select @@global.aria_recover_options;
set global aria_recover_options=16;
select @@global.aria_recover_options;
#
# incorrect types/values
#
--error ER_WRONG_TYPE_FOR_VAR
set global aria_recover=1.1;
set global aria_recover_options=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global aria_recover=1e1;
set global aria_recover_options=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global aria_recover="foo";
set global aria_recover_options="foo";
--error ER_WRONG_VALUE_FOR_VAR
set global aria_recover=32;
set global aria_recover_options=32;
SET @@global.aria_recover = @start_global_value;
SET @@global.aria_recover_options = @start_global_value;
......@@ -255,7 +255,7 @@ static MYSQL_SYSVAR_ULONG(pagecache_file_hash_size, pagecache_file_hash_size,
"value is probably 1/10 of number of possible open Aria files.", 0,0,
512, 128, 16384, 1);
static MYSQL_SYSVAR_SET(recover, maria_recover_options, PLUGIN_VAR_OPCMDARG,
static MYSQL_SYSVAR_SET(recover_options, maria_recover_options, PLUGIN_VAR_OPCMDARG,
"Specifies how corrupted tables should be automatically repaired",
NULL, NULL, HA_RECOVER_DEFAULT, &maria_recover_typelib);
......@@ -3494,7 +3494,7 @@ static int mark_recovery_start(const char* log_dir)
DBUG_ENTER("mark_recovery_start");
if (!(maria_recover_options & HA_RECOVER_ANY))
ma_message_no_user(ME_JUST_WARNING, "Please consider using option"
" --aria-recover[=...] to automatically check and"
" --aria-recover-options[=...] to automatically check and"
" repair tables when logs are removed by option"
" --aria-force-start-after-recovery-failures=#");
if (recovery_failures >= force_start_after_recovery_failures)
......@@ -3701,7 +3701,7 @@ struct st_mysql_sys_var* system_variables[]= {
MYSQL_SYSVAR(pagecache_buffer_size),
MYSQL_SYSVAR(pagecache_division_limit),
MYSQL_SYSVAR(pagecache_file_hash_size),
MYSQL_SYSVAR(recover),
MYSQL_SYSVAR(recover_options),
MYSQL_SYSVAR(repair_threads),
MYSQL_SYSVAR(sort_buffer_size),
MYSQL_SYSVAR(stats_method),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment