Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8f9bb826
Commit
8f9bb826
authored
Mar 31, 2023
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-30971 Add a new system variable aria_data_home_dir
parent
8020b1bd
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
203 additions
and
1 deletion
+203
-1
mysql-test/suite/maria/aria_log_dir_path.result
mysql-test/suite/maria/aria_log_dir_path.result
+29
-0
mysql-test/suite/maria/aria_log_dir_path.test
mysql-test/suite/maria/aria_log_dir_path.test
+65
-0
mysql-test/suite/maria/maria3.result
mysql-test/suite/maria/maria3.result
+1
-0
mysql-test/suite/sys_vars/r/aria_log_dir_path_basic.result
mysql-test/suite/sys_vars/r/aria_log_dir_path_basic.result
+36
-0
mysql-test/suite/sys_vars/r/sysvars_aria.result
mysql-test/suite/sys_vars/r/sysvars_aria.result
+12
-0
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+10
-0
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
...l-test/suite/sys_vars/r/sysvars_server_notembedded.result
+10
-0
mysql-test/suite/sys_vars/t/aria_log_dir_path_basic.test
mysql-test/suite/sys_vars/t/aria_log_dir_path_basic.test
+35
-0
mysql-test/suite/sys_vars/t/sysvars_aria.test
mysql-test/suite/sys_vars/t/sysvars_aria.test
+4
-0
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+1
-1
No files found.
mysql-test/suite/maria/aria_log_dir_path.result
0 → 100644
View file @
8f9bb826
#
# MDEV-30971 Add a new system variable aria_data_home_dir
#
# restart: --loose-aria-log-file-size=8388608 --loose-aria-log-dir-path=MYSQLTEST_VARDIR/tmp/aria_log_dir_path_1
SET @@global.aria_log_purge_type=external;
SHOW VARIABLES LIKE 'aria_log_file_size';
Variable_name Value
aria_log_file_size 8388608
SELECT @@aria_log_dir_path;
@@aria_log_dir_path
MYSQLTEST_VARDIR/tmp/aria_log_dir_path_1
SET @@global.aria_checkpoint_interval=DEFAULT /*Force checkpoint*/;
SHOW ENGINE aria logs;
Type Name Status
Aria aria_log.00000001 in use
CREATE TABLE t1 (id INT, txt LONGTEXT) ENGINE=Aria;
BEGIN NOT ATOMIC
FOR id IN 0..9 DO
INSERT INTO test.t1 (id, txt) VALUES (id, REPEAT(id,1024*1024));
END FOR;
END;
$$
SET @@global.aria_checkpoint_interval=DEFAULT /*Force checkpoint*/;
SHOW ENGINE aria logs;
Type Name Status
Aria aria_log.00000001 free
Aria aria_log.00000002 in use
DROP TABLE t1;
# restart
mysql-test/suite/maria/aria_log_dir_path.test
0 → 100644
View file @
8f9bb826
--
source
include
/
have_maria
.
inc
--
let
$datadir
=
`SELECT @@datadir`
--
echo
#
--
echo
# MDEV-30971 Add a new system variable aria_data_home_dir
--
echo
#
--
let
$ARIA_LOGDIR
=
$MYSQLTEST_VARDIR
/
tmp
/
aria_log_dir_path_1
--
mkdir
$ARIA_LOGDIR
--
let
$restart_parameters
=--
loose
-
aria
-
log
-
file
-
size
=
8388608
--
loose
-
aria
-
log
-
dir
-
path
=
$ARIA_LOGDIR
--
source
include
/
restart_mysqld
.
inc
#
# Test that:
# - aria_log_dir_path is set to a non-default directory.
# - New Aria log files are created in the non-default directory.
# - The contents of the log directory (according to "file_exists" commands)
# is in sync with the "SHOW ENGINE aria logs" ouput.
#
# Prevent automatic purge
SET
@@
global
.
aria_log_purge_type
=
external
;
SHOW
VARIABLES
LIKE
'aria_log_file_size'
;
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
SELECT
@@
aria_log_dir_path
;
SET
@@
global
.
aria_checkpoint_interval
=
DEFAULT
/*Force checkpoint*/
;
--
file_exists
$ARIA_LOGDIR
/
aria_log_control
--
file_exists
$ARIA_LOGDIR
/
aria_log
.
00000001
--
error
1
--
file_exists
$ARIA_LOGDIR
/
aria_log
.
00000002
--
replace_regex
/
Size
+
[
0
-
9
]
+
;
.+
aria_log
/
aria_log
/
SHOW
ENGINE
aria
logs
;
CREATE
TABLE
t1
(
id
INT
,
txt
LONGTEXT
)
ENGINE
=
Aria
;
DELIMITER
$$
;
BEGIN
NOT
ATOMIC
FOR
id
IN
0.
.
9
DO
INSERT
INTO
test
.
t1
(
id
,
txt
)
VALUES
(
id
,
REPEAT
(
id
,
1024
*
1024
));
END
FOR
;
END
;
$$
DELIMITER
;
$$
SET
@@
global
.
aria_checkpoint_interval
=
DEFAULT
/*Force checkpoint*/
;
--
file_exists
$ARIA_LOGDIR
/
aria_log_control
--
file_exists
$ARIA_LOGDIR
/
aria_log
.
00000001
--
file_exists
$ARIA_LOGDIR
/
aria_log
.
00000002
--
error
1
--
file_exists
$ARIA_LOGDIR
/
aria_log
.
00000003
--
replace_regex
/
Size
+
[
0
-
9
]
+
;
.+
aria_log
/
aria_log
/
SHOW
ENGINE
aria
logs
;
DROP
TABLE
t1
;
--
let
$restart_parameters
=
--
source
include
/
restart_mysqld
.
inc
--
remove_file
$ARIA_LOGDIR
/
aria_log_control
--
remove_file
$ARIA_LOGDIR
/
aria_log
.
00000001
--
remove_file
$ARIA_LOGDIR
/
aria_log
.
00000002
--
rmdir
$ARIA_LOGDIR
mysql-test/suite/maria/maria3.result
View file @
8f9bb826
...
@@ -311,6 +311,7 @@ aria_encrypt_tables #
...
@@ -311,6 +311,7 @@ aria_encrypt_tables #
aria_force_start_after_recovery_failures #
aria_force_start_after_recovery_failures #
aria_group_commit #
aria_group_commit #
aria_group_commit_interval #
aria_group_commit_interval #
aria_log_dir_path #
aria_log_file_size #
aria_log_file_size #
aria_log_purge_type #
aria_log_purge_type #
aria_max_sort_file_size #
aria_max_sort_file_size #
...
...
mysql-test/suite/sys_vars/r/aria_log_dir_path_basic.result
0 → 100644
View file @
8f9bb826
SELECT COUNT(@@GLOBAL.aria_log_dir_path);
COUNT(@@GLOBAL.aria_log_dir_path)
1
SET @@GLOBAL.aria_log_dir_path=1;
ERROR HY000: Variable 'aria_log_dir_path' is a read only variable
SELECT COUNT(@@GLOBAL.aria_log_dir_path);
COUNT(@@GLOBAL.aria_log_dir_path)
1
SELECT @@GLOBAL.aria_log_dir_path = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='aria_log_dir_path';
@@GLOBAL.aria_log_dir_path = VARIABLE_VALUE
1
SELECT COUNT(@@GLOBAL.aria_log_dir_path);
COUNT(@@GLOBAL.aria_log_dir_path)
1
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='aria_log_dir_path';
COUNT(VARIABLE_VALUE)
1
SELECT @@aria_log_dir_path = @@GLOBAL.aria_log_dir_path;
@@aria_log_dir_path = @@GLOBAL.aria_log_dir_path
1
SELECT COUNT(@@aria_log_dir_path);
COUNT(@@aria_log_dir_path)
1
SELECT COUNT(@@local.aria_log_dir_path);
ERROR HY000: Variable 'aria_log_dir_path' is a GLOBAL variable
SELECT COUNT(@@SESSION.aria_log_dir_path);
ERROR HY000: Variable 'aria_log_dir_path' is a GLOBAL variable
SELECT COUNT(@@GLOBAL.aria_log_dir_path);
COUNT(@@GLOBAL.aria_log_dir_path)
1
SELECT aria_log_dir_path = @@SESSION.aria_log_dir_path;
ERROR 42S22: Unknown column 'aria_log_dir_path' in 'field list'
mysql-test/suite/sys_vars/r/sysvars_aria.result
View file @
8f9bb826
...
@@ -85,6 +85,18 @@ NUMERIC_BLOCK_SIZE 1
...
@@ -85,6 +85,18 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_DIR_PATH
SESSION_VALUE NULL
DEFAULT_VALUE DATADIR
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path to the directory where to store transactional log
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_NAME ARIA_LOG_FILE_SIZE
SESSION_VALUE NULL
SESSION_VALUE NULL
DEFAULT_VALUE 1073741824
DEFAULT_VALUE 1073741824
...
...
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
View file @
8f9bb826
...
@@ -102,6 +102,16 @@ NUMERIC_BLOCK_SIZE 1
...
@@ -102,6 +102,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_DIR_PATH
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path to the directory where to store transactional log
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_TYPE BIGINT UNSIGNED
...
...
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
View file @
8f9bb826
...
@@ -102,6 +102,16 @@ NUMERIC_BLOCK_SIZE 1
...
@@ -102,6 +102,16 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_DIR_PATH
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Path to the directory where to store transactional log
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_NAME ARIA_LOG_FILE_SIZE
VARIABLE_SCOPE GLOBAL
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_TYPE BIGINT UNSIGNED
...
...
mysql-test/suite/sys_vars/t/aria_log_dir_path_basic.test
0 → 100644
View file @
8f9bb826
--
source
include
/
have_maria
.
inc
SELECT
COUNT
(
@@
GLOBAL
.
aria_log_dir_path
);
--
error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SET
@@
GLOBAL
.
aria_log_dir_path
=
1
;
SELECT
COUNT
(
@@
GLOBAL
.
aria_log_dir_path
);
SELECT
@@
GLOBAL
.
aria_log_dir_path
=
VARIABLE_VALUE
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'aria_log_dir_path'
;
SELECT
COUNT
(
@@
GLOBAL
.
aria_log_dir_path
);
SELECT
COUNT
(
VARIABLE_VALUE
)
FROM
INFORMATION_SCHEMA
.
GLOBAL_VARIABLES
WHERE
VARIABLE_NAME
=
'aria_log_dir_path'
;
SELECT
@@
aria_log_dir_path
=
@@
GLOBAL
.
aria_log_dir_path
;
SELECT
COUNT
(
@@
aria_log_dir_path
);
--
Error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
COUNT
(
@@
local
.
aria_log_dir_path
);
--
Error
ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT
COUNT
(
@@
SESSION
.
aria_log_dir_path
);
SELECT
COUNT
(
@@
GLOBAL
.
aria_log_dir_path
);
--
Error
ER_BAD_FIELD_ERROR
SELECT
aria_log_dir_path
=
@@
SESSION
.
aria_log_dir_path
;
mysql-test/suite/sys_vars/t/sysvars_aria.test
View file @
8f9bb826
...
@@ -2,7 +2,11 @@
...
@@ -2,7 +2,11 @@
--
source
include
/
have_aria_used_for_temp_tables
.
inc
--
source
include
/
have_aria_used_for_temp_tables
.
inc
--
source
include
/
word_size
.
inc
--
source
include
/
word_size
.
inc
let
datadir
=
`select @@datadir`
;
--
vertical_results
--
vertical_results
--
replace_result
$datadir
DATADIR
select
VARIABLE_NAME
,
SESSION_VALUE
,
DEFAULT_VALUE
,
VARIABLE_SCOPE
,
VARIABLE_TYPE
,
VARIABLE_COMMENT
,
NUMERIC_MIN_VALUE
,
NUMERIC_MAX_VALUE
,
NUMERIC_BLOCK_SIZE
,
ENUM_VALUE_LIST
,
READ_ONLY
,
COMMAND_LINE_ARGUMENT
from
information_schema
.
system_variables
select
VARIABLE_NAME
,
SESSION_VALUE
,
DEFAULT_VALUE
,
VARIABLE_SCOPE
,
VARIABLE_TYPE
,
VARIABLE_COMMENT
,
NUMERIC_MIN_VALUE
,
NUMERIC_MAX_VALUE
,
NUMERIC_BLOCK_SIZE
,
ENUM_VALUE_LIST
,
READ_ONLY
,
COMMAND_LINE_ARGUMENT
from
information_schema
.
system_variables
where
variable_name
like
'aria%'
where
variable_name
like
'aria%'
order
by
variable_name
;
order
by
variable_name
;
storage/maria/ha_maria.cc
View file @
8f9bb826
...
@@ -188,7 +188,7 @@ static MYSQL_SYSVAR_BOOL(page_checksum, maria_page_checksums, 0,
...
@@ -188,7 +188,7 @@ static MYSQL_SYSVAR_BOOL(page_checksum, maria_page_checksums, 0,
/* It is only command line argument */
/* It is only command line argument */
static
MYSQL_SYSVAR_STR
(
log_dir_path
,
maria_data_root
,
static
MYSQL_SYSVAR_STR
(
log_dir_path
,
maria_data_root
,
PLUGIN_VAR_
NOSYSVAR
|
PLUGIN_VAR_
RQCMDARG
|
PLUGIN_VAR_READONLY
,
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_READONLY
,
"Path to the directory where to store transactional log"
,
"Path to the directory where to store transactional log"
,
NULL
,
NULL
,
mysql_real_data_home
);
NULL
,
NULL
,
mysql_real_data_home
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment