mirror of
https://github.com/MariaDB/server.git
synced 2025-11-27 05:41:41 +03:00
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
17 lines
388 B
Plaintext
17 lines
388 B
Plaintext
connect con1,localhost,root,,;
|
|
FLUSH LOGS;
|
|
FLUSH LOGS;
|
|
FLUSH LOGS;
|
|
SET DEBUG_SYNC= "at_after_lock_index WAIT_FOR con1_go";
|
|
SHOW BINARY LOGS;
|
|
connect con2,localhost,root,,;
|
|
RESET MASTER;
|
|
FLUSH LOGS;
|
|
SET DEBUG_SYNC= "now SIGNAL con1_go";
|
|
connection con1;
|
|
# The correct result must consists of two records
|
|
Log_name File_size
|
|
master-bin.000001 #
|
|
master-bin.000002 #
|
|
SET debug_sync = 'reset';
|