Note that this filter is only intended for use with MySQL<>MySQL replication and will not have any benefit at this time for heterogeneous replication.
There may be occasions where you do not require specific DDL statements to be replicated. For example, you may NOT want to allow TRIGGERS or VIEWS to be replicated, but you do want TABLES, INDEXES, FUNCTIONS and PROCEDURES. The dropddl filter is intended for this purpose.
The dropddl filter allows you to configure which, if any, ddl statements to drop from THL and not be replicated.
Pre-configured filter name |
dropddl
| ||
JavaScript Filter File |
tungsten-replicator/support/filters-javascript/dropddl.js
| ||
Property prefix |
replicator.filter.dropddl
| ||
Stage compatibility |
binlog-to-q ,
q-to-dbms
| ||
tpm Option compatibility |
--svc-extractor-filters ,
--svc-applier-filters
| ||
Data compatibility | Any event | ||
Parameters | |||
Parameter | Type | Default | Description |
dropTableDDL | boolean |
false | Drop CREATE TABLE and DROP TABLE statements |
dropViewDDL | boolean |
false | Drop CREATE VIEW and DROP VIEWS statements |
dropIndexDDL | boolean |
false | Drop CREATE INDEX and DROP INDEX statements |
dropTriggerDDL | boolean |
false | Drop CREATE TRIGGER and DROP TRIGGER statements |
dropFunctionDDL | boolean |
false | Drop CREATE FUNCTION and DROP FUNCTION statements |
dropProcedureDDL | boolean |
false | Drop CREATE PROCEDURE and DROP PROCEDURE statements |
dropUserDDL | boolean |
false | Drop CREATE USER and ALTER USER statements |
dropGrantDDL | boolean |
false | Drop GRANT and REVOKE statements |
Example:
If you wish to drop VIEW and TRIGGER DDL on the applier, the following options need to be added to your configuration:
svc-applier-filters=dropddl property=replicator.filter.dropddl.dropViewDDL=true property=replicator.filter.dropddl.dropTriggerDDL=true