[MDEV-21386] PURGE BINARY LOGS should raise a PURGE BINARY LOGS should raise an error if binary logging is disabledwarning if binary logging is disabled Created: 2019-12-23  Updated: 2023-04-25

Status: Open
Project: MariaDB Server
Component/s: Admin statements, Replication
Affects Version/s: None
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Kyle Joiner (Inactive) Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: binlog, warning


 Description   

If the server is started with skip-log-bin set, and if the user executes PURGE BINARY LOGS or RESET MASTER, then the server should warn the user that the statement will not work properly. The statement currently succeeds without raising any error or warning.

Steps to reproduce:

1. Add skip-log-bin to .cnf file
2. Restart database
3. run PURGE BINARY LOGS TO 'mysql-binlog.xxxx'; [or any other purge command like RESET MASTER, PURGE BINARY LOGS BEFORE etc]

Terminal output:
MariaDB [xxx_1]> PURGE BINARY LOGS BEFORE '2019-12-20 10:40:00';
Query OK, 0 rows affected (0.01 sec)



 Comments   
Comment by Andrei Elkin [ 2023-04-24 ]

ralf.gebhardt, that's a bug indeed. It needs to be fixed to produce an error actually, to be consistent with other commands like RESET MASTER, SHOW BINARY LOGS. Also all related to binlog commands have to be verified.

Generated at Thu Feb 08 09:06:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.