File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
main/java/com/zendesk/maxwell/schema/ddl
test/java/com/zendesk/maxwell/schema/ddl Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public abstract class SchemaChange {
4242
4343 SQL_BLACKLIST .add (Pattern .compile ("\\ A\\ s*(ALTER|CREATE|DROP)\\ s+TEMPORARY\\ s+TABLE" , Pattern .CASE_INSENSITIVE | Pattern .MULTILINE ));
4444 SQL_BLACKLIST .add (Pattern .compile ("\\ A\\ s*(ALTER|CREATE|DROP)\\ s+TABLESPACE" , Pattern .CASE_INSENSITIVE | Pattern .MULTILINE ));
45+ SQL_BLACKLIST .add (Pattern .compile ("\\ A\\ s*ALTER\\ s+INSTANCE\\ s+(ROTATE INNODB MASTER KEY|ROTATE BINLOG MASTER KEY|RELOAD TLS)" , Pattern .CASE_INSENSITIVE | Pattern .MULTILINE ));
4546 SQL_BLACKLIST .add (Pattern .compile ("\\ A\\ s*(SET|DROP|CREATE)\\ s+(DEFAULT\\ s+)?ROLE" , Pattern .CASE_INSENSITIVE | Pattern .MULTILINE ));
4647 SQL_BLACKLIST .add (Pattern .compile ("\\ A\\ s*TRUNCATE\\ s+" , Pattern .CASE_INSENSITIVE | Pattern .MULTILINE ));
4748 SQL_BLACKLIST .add (Pattern .compile ("\\ A\\ s*OPTIMIZE\\ s+" , Pattern .CASE_INSENSITIVE | Pattern .MULTILINE ));
Original file line number Diff line number Diff line change @@ -620,4 +620,18 @@ public void testPolardbXCreateIndexSQL(){
620620 assertThat (changes ,is (nullValue ()));
621621
622622 }
623+
624+ @ Test
625+ public void testServerInstanceOperations (){
626+
627+ List <SchemaChange > parse = parse ("ALTER INSTANCE ROTATE INNODB MASTER KEY" );
628+ List <SchemaChange > parse1 = parse ("ALTER INSTANCE ROTATE BINLOG MASTER KEY" );
629+ List <SchemaChange > parse2 = parse ("ALTER INSTANCE RELOAD TLS" );
630+ List <SchemaChange > parse3 = parse ("ALTER INSTANCE RELOAD TLS NO ROLLBACK ON ERROR" );
631+
632+ assertThat (parse ,is (nullValue ()));
633+ assertThat (parse1 ,is (nullValue ()));
634+ assertThat (parse2 ,is (nullValue ()));
635+ assertThat (parse3 ,is (nullValue ()));
636+ }
623637}
You can’t perform that action at this time.
0 commit comments