schema and tableName should be processed according to lower_case_table_names in advance
(schema string, tableName string)
| 1184 | |
| 1185 | // schema and tableName should be processed according to lower_case_table_names in advance |
| 1186 | func (b *BinlogReader) skipQueryDDL(schema string, tableName string) bool { |
| 1187 | switch schema { |
| 1188 | case "mysql": |
| 1189 | if b.mysqlContext.ExpandSyntaxSupport { |
| 1190 | return false |
| 1191 | } else { |
| 1192 | return true |
| 1193 | } |
| 1194 | case "sys", "information_schema", "performance_schema", g.DtleSchemaName: |
| 1195 | return true |
| 1196 | default: |
| 1197 | if len(b.mysqlContext.ReplicateIgnoreDb) > 0 { |
| 1198 | if common.IgnoreDbByReplicateIgnoreDb(b.mysqlContext.ReplicateIgnoreDb, schema) { |
| 1199 | return true |
| 1200 | } |
| 1201 | if common.IgnoreTbByReplicateIgnoreDb(b.mysqlContext.ReplicateIgnoreDb, schema, tableName) { |
| 1202 | return true |
| 1203 | } |
| 1204 | } |
| 1205 | if len(b.mysqlContext.ReplicateDoDb) > 0 { |
| 1206 | return !b.matchTable(b.mysqlContext.ReplicateDoDb, schema, tableName) |
| 1207 | } else { |
| 1208 | // replicate all dbs and tbs |
| 1209 | return false |
| 1210 | } |
| 1211 | } |
| 1212 | } |
| 1213 | |
| 1214 | var ( |
| 1215 | // > A Regexp is safe for concurrent use by multiple goroutines... |