Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public abstract class SchemaChange {
SQL_BLACKLIST.add(Pattern.compile("\\A\\s*ANALYZE\\s+TABLE", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE));
SQL_BLACKLIST.add(Pattern.compile("\\A\\s*SET\\s+PASSWORD", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE));
SQL_BLACKLIST.add(Pattern.compile("\\A\\s*(ALTER|CREATE|DROP|RENAME)\\s+USER", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE));
SQL_BLACKLIST.add(Pattern.compile("\\A\\s*ALTER\\s+INSTANCE.*", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE));

SQL_BLACKLIST.add(Pattern.compile("\\A\\s*(ALTER|CREATE|DROP)\\s+TEMPORARY\\s+TABLE", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE));
SQL_BLACKLIST.add(Pattern.compile("\\A\\s*(ALTER|CREATE|DROP)\\s+TABLESPACE", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE));
Expand Down
14 changes: 14 additions & 0 deletions src/test/java/com/zendesk/maxwell/schema/ddl/DDLParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -620,4 +620,18 @@ public void testPolardbXCreateIndexSQL(){
assertThat(changes,is(nullValue()));

}

@Test
public void testServerInstanceOperations(){

List<SchemaChange> parse = parse("ALTER INSTANCE ROTATE INNODB MASTER KEY");
List<SchemaChange> parse1 = parse("ALTER INSTANCE ROTATE BINLOG MASTER KEY");
List<SchemaChange> parse2 = parse("ALTER INSTANCE RELOAD TLS");
List<SchemaChange> parse3 = parse("ALTER INSTANCE RELOAD TLS NO ROLLBACK ON ERROR");

assertThat(parse,is(nullValue()));
assertThat(parse1,is(nullValue()));
assertThat(parse2,is(nullValue()));
assertThat(parse3,is(nullValue()));
}
}