1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-27 05:41:41 +03:00
Files
mariadb/mysql-test/suite/binlog/t/show_concurrent_rotate.test
Monty adb7016214 MDEV-19117 Don't keep binary log index file locked during show binary logs
On some systems with 10,000+ binlogs, show binary logs could block
log rotation for more than 10 seconds.

This patch fixes this by first caching all binary log names and
releases all mutexes while calculating the sizes of the binary logs.

Other things:
- Ensure that reinit_io_cache() sets end_of_file when moving to read_cache.
  This ensures that external changes of the underlying file is known to
  the cache.
- get_binlog_list() is made more efficent and show_binlogs() is changed
  to call get_binlog_list()

Reviewed by Andrei Elkin
2019-04-01 19:47:24 +03:00

25 lines
519 B
Plaintext

--source include/have_debug.inc
--source include/have_debug_sync.inc
# mere to limit it run rate
--source include/have_binlog_format_row.inc
connect(con1,localhost,root,,);
FLUSH LOGS;
FLUSH LOGS;
FLUSH LOGS;
SET DEBUG_SYNC= "at_after_lock_index WAIT_FOR con1_go";
--send SHOW BINARY LOGS
connect(con2,localhost,root,,);
RESET MASTER;
FLUSH LOGS;
SET DEBUG_SYNC= "now SIGNAL con1_go";
--connection con1
--echo # The correct result must consists of two records
--replace_column 2 #
--reap
SET debug_sync = 'reset';