[MDEV-509] CREATE / DROP SERVER statements are not written to the binary log Created: 2012-09-05  Updated: 2022-09-08

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.0, 5.5.25, 5.1.62
Fix Version/s: 5.5

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: upstream-wontfix


 Description   

Also reproducible on MySQL versions and filed as http://bugs.mysql.com/bug.php?id=66708

In 5.5 and 10.0, CREATE / DROP SERVER statements are not written to the binary log at all, and neither are the changes to mysql.servers table. In 5.1, in ROW binlog format, mysql.servers table changes are logged (which is not good, and was apparently fixed in 5.5+, but the statement replication, usual for DDL, wasn't enabled).

Test output from 5.5:

 
SET binlog_format = STATEMENT;
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql
OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
DROP SERVER s1;
SHOW BINLOG EVENTS;
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
master-bin.000001       4       Format_desc     1       245     Server ver: 5.5.25-MariaDB-log, Binlog ver: 4
SET binlog_format = MIXED;
CREATE SERVER s2 FOREIGN DATA WRAPPER mysql
OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
DROP SERVER s2;
SHOW BINLOG EVENTS;
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
master-bin.000001       4       Format_desc     1       245     Server ver: 5.5.25-MariaDB-log, Binlog ver: 4
SET binlog_format = ROW;
CREATE SERVER s3 FOREIGN DATA WRAPPER mysql
OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
DROP SERVER s3;
SHOW BINLOG EVENTS;
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
master-bin.000001       4       Format_desc     1       245     Server ver: 5.5.25-MariaDB-log, Binlog ver: 4

Test case:

--source include/have_log_bin.inc
 
SET binlog_format = STATEMENT;
 
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql
  OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
DROP SERVER s1;
 
SHOW BINLOG EVENTS;
 
SET binlog_format = MIXED;
 
CREATE SERVER s2 FOREIGN DATA WRAPPER mysql
  OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
DROP SERVER s2;
 
SHOW BINLOG EVENTS;
 
SET binlog_format = ROW;
 
CREATE SERVER s3 FOREIGN DATA WRAPPER mysql
  OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
DROP SERVER s3;
 
SHOW BINLOG EVENTS;
 



 Comments   
Comment by Elena Stepanova [ 2012-09-05 ]

Upd: they say it's intentional (http://bugs.mysql.com/bug.php?id=66708, comment [5 Sep 17:09] Sveta Smirnova).
If we care about Federated well-being, we might want to reconsider it.

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