mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
45ed9dd957
Also fixes MDEV-23929: innodb_flush_neighbors is not being ignored for system tablespace on SSD When the maximum configured number of file is exceeded, InnoDB will close data files. We used to maintain a fil_system.LRU list and a counter fil_node_t::n_pending to achieve this, at the huge cost of multiple fil_system.mutex operations per I/O operation. fil_node_open_file_low(): Implement a FIFO replacement policy: The last opened file will be moved to the end of fil_system.space_list, and files will be closed from the start of the list. However, we will not move tablespaces in fil_system.space_list while i_s_tablespaces_encryption_fill_table() is executing (producing output for INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION) because it may cause information of some tablespaces to go missing. We also avoid this in mariabackup --backup because datafiles_iter_next() assumes that the ordering is not changed. IORequest: Fold more parameters to IORequest::type. fil_space_t::io(): Replaces fil_io(). fil_space_t::flush(): Replaces fil_flush(). OS_AIO_IBUF: Remove. We will always issue synchronous reads of the change buffer pages in buf_read_page_low(). We will always ignore some errors for background reads. This should reduce fil_system.mutex contention a little. fil_node_t::complete_write(): Replaces fil_node_t::complete_io(). On both read and write completion, fil_space_t::release_for_io() will have to be called. fil_space_t::io(): Do not acquire fil_system.mutex in the normal code path. xb_delta_open_matching_space(): Do not try to open the system tablespace which was already opened. This fixes a file sharing violation in mariabackup --prepare --incremental. Reviewed by: Vladislav Vaintroub
42 lines
1.1 KiB
Text
42 lines
1.1 KiB
Text
--source include/have_innodb.inc
|
|
--source include/have_innodb_punchhole.inc
|
|
|
|
--disable_query_log
|
|
--disable_warnings
|
|
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
|
|
--enable_warnings
|
|
--enable_query_log
|
|
|
|
# zlib
|
|
set global innodb_compression_algorithm = 1;
|
|
|
|
create table innodb_page_compressed (c1 int not null primary key auto_increment, b char(200), c char(200), d char(200)) engine=innodb page_compressed=1 page_compression_level=9;
|
|
show warnings;
|
|
|
|
delimiter //;
|
|
create procedure innodb_insert_proc (repeat_count int)
|
|
begin
|
|
declare current_num int;
|
|
set current_num = 0;
|
|
while current_num < repeat_count do
|
|
insert into innodb_page_compressed values (NULL,repeat('A',150),repeat('AB',75),repeat('B', 175));
|
|
set current_num = current_num + 1;
|
|
end while;
|
|
end//
|
|
delimiter ;//
|
|
commit;
|
|
|
|
set autocommit=0;
|
|
call innodb_insert_proc(16000);
|
|
commit;
|
|
set autocommit=1;
|
|
|
|
|
|
DROP PROCEDURE innodb_insert_proc;
|
|
DROP TABLE innodb_page_compressed;
|
|
|
|
--disable_query_log
|
|
--disable_warnings
|
|
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
|
|
--enable_warnings
|
|
--enable_query_log
|