| 1 |
--source include/have_maria.inc |
| 2 |
--let $datadir= `SELECT @@datadir` |
| 3 |
|
| 4 |
--echo # |
| 5 |
--echo # MDEV-30971 Add a new system variable aria_data_home_dir |
| 6 |
--echo # |
| 7 |
|
| 8 |
--let $ARIA_LOGDIR=$MYSQLTEST_VARDIR/tmp/aria_log_dir_path_1 |
| 9 |
--mkdir $ARIA_LOGDIR |
| 10 |
--let $restart_parameters=--loose-aria-log-file-size=8388608 --loose-aria-log-dir-path=$ARIA_LOGDIR |
| 11 |
--source include/restart_mysqld.inc |
| 12 |
|
| 13 |
# |
| 14 |
# Test that: |
| 15 |
# - aria_log_dir_path is set to a non-default directory. |
| 16 |
# - New Aria log files are created in the non-default directory. |
| 17 |
# - The contents of the log directory (according to "file_exists" commands) |
| 18 |
# is in sync with the "SHOW ENGINE aria logs" ouput. |
| 19 |
# |
| 20 |
|
| 21 |
# Prevent automatic purge |
| 22 |
SET @@global.aria_log_purge_type=external; |
| 23 |
|
| 24 |
SHOW VARIABLES LIKE 'aria_log_file_size'; |
| 25 |
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR |
| 26 |
SELECT @@aria_log_dir_path; |
| 27 |
|
| 28 |
|
| 29 |
SET @@global.aria_checkpoint_interval=DEFAULT /*Force checkpoint*/; |
| 30 |
--file_exists $ARIA_LOGDIR/aria_log_control |
| 31 |
--file_exists $ARIA_LOGDIR/aria_log.00000001 |
| 32 |
--error 1 |
| 33 |
--file_exists $ARIA_LOGDIR/aria_log.00000002 |
| 34 |
--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/ |
| 35 |
SHOW ENGINE aria logs; |
| 36 |
|
| 37 |
|
| 38 |
CREATE TABLE t1 (id INT, txt LONGTEXT) ENGINE=Aria; |
| 39 |
DELIMITER $$; |
| 40 |
BEGIN NOT ATOMIC |
| 41 |
FOR id IN 0..9 DO |
| 42 |
INSERT INTO test.t1 (id, txt) VALUES (id, REPEAT(id,1024*1024)); |
| 43 |
END FOR; |
| 44 |
END; |
| 45 |
$$ |
| 46 |
DELIMITER ;$$ |
| 47 |
|
| 48 |
|
| 49 |
SET @@global.aria_checkpoint_interval=DEFAULT /*Force checkpoint*/; |
| 50 |
--file_exists $ARIA_LOGDIR/aria_log_control |
| 51 |
--file_exists $ARIA_LOGDIR/aria_log.00000001 |
| 52 |
--file_exists $ARIA_LOGDIR/aria_log.00000002 |
| 53 |
--error 1 |
| 54 |
--file_exists $ARIA_LOGDIR/aria_log.00000003 |
| 55 |
--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/ |
| 56 |
SHOW ENGINE aria logs; |
| 57 |
|
| 58 |
DROP TABLE t1; |
| 59 |
|
| 60 |
--let $restart_parameters= |
| 61 |
--source include/restart_mysqld.inc |
| 62 |
--remove_file $ARIA_LOGDIR/aria_log_control |
| 63 |
--remove_file $ARIA_LOGDIR/aria_log.00000001 |
| 64 |
--remove_file $ARIA_LOGDIR/aria_log.00000002 |
| 65 |
--rmdir $ARIA_LOGDIR |