mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
`@@slave_connections_needed_for_purge`’s default of `1` ensures binary log availability on replication masters, but is not a sensible default suitable for all scenarios, especially for long-term slave servers and standalone (not in a replication setup) servers. The outcome was that standalone server users were confused why automatic binlog purging does not work. This commit changes this default to `0`, which is suitable for both standalone and (when backed by prompt failure recovery) replication setups. `0` also more closely matches the behaviour before MDEV-31404, which added this variable, out of the box. This commit also adds a one-time replication warning when registering a slave, but `@@slave_connections_needed_for_purge` is left unchanged. Rather than enforcing a defence with an unsensible default, this reminder will bring awareness of the risk of automatic binlog purging. This commit also cleans up Galera and MTR workarounds to the introduction of the `@@slave_connections_needed_for_purge=1` default.
27 lines
498 B
Plaintext
27 lines
498 B
Plaintext
--source include/galera_cluster.inc
|
|
--source include/have_innodb.inc
|
|
|
|
USE test;
|
|
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
|
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
|
SELECT * FROM t1;
|
|
|
|
--echo
|
|
--echo # On node_1
|
|
--connection node_1
|
|
SELECT * FROM test.t1;
|
|
|
|
--echo
|
|
--echo # On node_2
|
|
--connection node_2
|
|
SELECT * FROM test.t1;
|
|
|
|
--let $galera_diff_statement = SELECT * FROM t1
|
|
--source include/galera_diff.inc
|
|
|
|
# Cleanup
|
|
DROP TABLE t1;
|
|
|
|
--source include/galera_end.inc
|
|
--echo # End of test
|