Source:
<code>private void initReplDump(ASTNode ast) throws HiveException { int numChildren = ast.getChildCount(); dbNameOrPattern = PlanUtils.stripQuotes(ast.getChild(0).getText()); for (String dbName : Utils.matchesDb(db, dbNameOrPattern)) { <START> if (dbName.equalsIgnoreCase(Warehouse.DEFAULT_DATABASE_NAME)) { <END> continue; } Database database = db.getDatabase(dbName); if (database != null) { if (!ReplChangeManager.isSourceOfReplication(database)) { throw new HiveException("Cannot dump database " + dbNameOrPattern + " as it is not a source of replication"); } } else { throw new HiveException("Cannot dump database " + dbNameOrPattern + " as it does not exist"); } } int currNode = 1; while (currNode < numChildren) { if (ast.getChild(currNode).getType() == TOK_REPL_CONFIG) { Map<String, String> replConfigs = DDLSemanticAnalyzer.getProps((ASTNode) ast.getChild(currNode).getChild(0)); if (null != replConfigs) { for (Map.Entry<String, String> config : replConfigs.entrySet()) { conf.set(config.getKey(), config.getValue()); } } } else if (ast.getChild(currNode).getType() == TOK_TABNAME) { tblNameOrPattern = PlanUtils.stripQuotes(ast.getChild(currNode).getChild(0).getText()); } else { Tree fromNode = ast.getChild(currNode); eventFrom = Long.parseLong(PlanUtils.stripQuotes(fromNode.getChild(0).getText())); int numChild = 1; while (numChild < fromNode.getChildCount()) { if (fromNode.getChild(numChild).getType() == TOK_TO) { eventTo = Long.parseLong(PlanUtils.stripQuotes(fromNode.getChild(numChild + 1).getText())); numChild++; } else if (fromNode.getChild(numChild).getType() == TOK_LIMIT) { maxEventLimit = Integer.parseInt(PlanUtils.stripQuotes(fromNode.getChild(numChild + 1).getText())); numChild++; } numChild++; } } currNode++; } }</code><technical_language>default database exempted source_of_replication check? Also, CM recycle dropped files default database allowing problem</technical_language>

Target:
private void initReplDump(ASTNode ast) throws HiveException { int numChildren = ast.getChildCount(); dbNameOrPattern = PlanUtils.stripQuotes(ast.getChild(0).getText()); for (String dbName : Utils.matchesDb(db, dbNameOrPattern)) { Database database = db.getDatabase(dbName); if (database != null) { if (!ReplChangeManager.isSourceOfReplication(database)) { throw new SemanticException("Cannot dump database " + dbNameOrPattern + " as it is not a source of replication"); } } else { throw new SemanticException("Cannot dump database " + dbNameOrPattern + " as it does not exist"); } } int currNode = 1; while (currNode < numChildren) { if (ast.getChild(currNode).getType() == TOK_REPL_CONFIG) { Map<String, String> replConfigs = DDLSemanticAnalyzer.getProps((ASTNode) ast.getChild(currNode).getChild(0)); if (null != replConfigs) { for (Map.Entry<String, String> config : replConfigs.entrySet()) { conf.set(config.getKey(), config.getValue()); } } } else if (ast.getChild(currNode).getType() == TOK_TABNAME) { tblNameOrPattern = PlanUtils.stripQuotes(ast.getChild(currNode).getChild(0).getText()); } else { Tree fromNode = ast.getChild(currNode); eventFrom = Long.parseLong(PlanUtils.stripQuotes(fromNode.getChild(0).getText())); int numChild = 1; while (numChild < fromNode.getChildCount()) { if (fromNode.getChild(numChild).getType() == TOK_TO) { eventTo = Long.parseLong(PlanUtils.stripQuotes(fromNode.getChild(numChild + 1).getText())); numChild++; } else if (fromNode.getChild(numChild).getType() == TOK_LIMIT) { maxEventLimit = Integer.parseInt(PlanUtils.stripQuotes(fromNode.getChild(numChild + 1).getText())); numChild++; } numChild++; } } currNode++; } }