Projects >> druid >>a5a3a2865d62aea751d4f5ec44fbbf9a44cac5ea

Chunk
Conflicting content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
<<<<<<< HEAD
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
Solution content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
File
MySqlStatementParser.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
            MySqlShowPluginsStatement stmt = new MySqlShowPluginsStatement();
            return stmt;
        }
<<<<<<< HEAD
        
        if (identifierEquals("PRIVILEGES")) {
            lexer.nextToken();
            MySqlShowPrivilegesStatement stmt = new MySqlShowPrivilegesStatement();
            return stmt;
        }
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28

        throw new ParserException("TODO " + lexer.stringVal());
    }
Solution content
            MySqlShowPluginsStatement stmt = new MySqlShowPluginsStatement();
            return stmt;
        }
        
        if (identifierEquals("PRIVILEGES")) {
            lexer.nextToken();
            MySqlShowPrivilegesStatement stmt = new MySqlShowPrivilegesStatement();
            return stmt;
        }

        throw new ParserException("TODO " + lexer.stringVal());
    }
File
MySqlStatementParser.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
<<<<<<< HEAD
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
Solution content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
File
MySqlASTVisitor.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    boolean visit(MySqlShowPluginsStatement x);
    
    void endVisit(MySqlShowPluginsStatement x);
<<<<<<< HEAD
    
    boolean visit(MySqlShowPrivilegesStatement x);
    
    void endVisit(MySqlShowPrivilegesStatement x);
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
}
Solution content
    boolean visit(MySqlShowPluginsStatement x);
    
    void endVisit(MySqlShowPluginsStatement x);
    
    boolean visit(MySqlShowPrivilegesStatement x);
    
    void endVisit(MySqlShowPrivilegesStatement x);
}
File
MySqlASTVisitor.java
Developer's decision
Version 1
Kind of conflict
Method interface
Chunk
Conflicting content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
<<<<<<< HEAD
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
Solution content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
File
MySqlASTVisitorAdapter.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    }
<<<<<<< HEAD
    public void endVisit(MySqlShowPluginsStatement x) {
        
    
    @Override
    public boolean visit(MySqlShowPrivilegesStatement x) {
        return true;
    }
    
    @Override
    public void endVisit(MySqlShowPrivilegesStatement x) {
        
    }
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
}
Solution content
    public void endVisit(MySqlShowPluginsStatement x) {
        
    }
    
    @Override
    public boolean visit(MySqlShowPrivilegesStatement x) {
        return true;
    }
    
    @Override
    public void endVisit(MySqlShowPrivilegesStatement x) {
        
    }
}
File
MySqlASTVisitorAdapter.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
<<<<<<< HEAD
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
Solution content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
File
MySqlOutputVisitor.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    public void endVisit(MySqlShowPluginsStatement x) {
        
    }
<<<<<<< HEAD
    
    @Override
    public boolean visit(MySqlShowPrivilegesStatement x) {
        print("SHOW PRIVILEGES");
        return false;
    }
    
    @Override
    public void endVisit(MySqlShowPrivilegesStatement x) {
        
    }
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
}
Solution content
    public void endVisit(MySqlShowPluginsStatement x) {
        
    }
    
    @Override
    public boolean visit(MySqlShowPrivilegesStatement x) {
        print("SHOW PRIVILEGES");
        return false;
    }
    
    @Override
    public void endVisit(MySqlShowPrivilegesStatement x) {
        
    }
}
File
MySqlOutputVisitor.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
<<<<<<< HEAD
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
Solution content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowWarningsStatement;
File
MySqlSchemaStatVisitor.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    public void endVisit(MySqlShowPluginsStatement x) {
        
    }
<<<<<<< HEAD

    @Override
    public boolean visit(MySqlShowPrivilegesStatement x) {
        return false;
    }

    @Override
    public void endVisit(MySqlShowPrivilegesStatement x) {
        
    }
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
}
Solution content
    }

    @Override
    public void endVisit(MySqlShowPluginsStatement x) {
        
    }

    @Override
    public boolean visit(MySqlShowPrivilegesStatement x) {
        return false;
    public void endVisit(MySqlShowPrivilegesStatement x) {
        
    }
}
File
MySqlSchemaStatVisitor.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
<<<<<<< HEAD
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser;
import com.alibaba.druid.sql.parser.Token;
Solution content
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowMasterStatusStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPluginsStatement;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowPrivilegesStatement;
import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser;
import com.alibaba.druid.sql.parser.Token;
File
DALParserTest.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
        Assert.assertEquals("SHOW OPEN TABLES FROM mysql WHERE 1 = 1", output);
    }
    
<<<<<<< HEAD
    public void test_show_open_plugins() throws Exception {
=======
    public void test_open_plugins() throws Exception {
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
        String sql = "SHOW plugins";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowPluginsStatement show = (MySqlShowPluginsStatement) parser.parseStatementList().get(0);
Solution content
        Assert.assertEquals("SHOW OPEN TABLES FROM mysql WHERE 1 = 1", output);
    }
    
    public void test_show_open_plugins() throws Exception {
        String sql = "SHOW plugins";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowPluginsStatement show = (MySqlShowPluginsStatement) parser.parseStatementList().get(0);
File
DALParserTest.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        Assert.assertEquals("SHOW PLUGINS", output);
    }
    
<<<<<<< HEAD
    public void test_show_PRIVILEGES() throws Exception {
        String sql = "SHOW PRIVILEGES";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowPrivilegesStatement show = (MySqlShowPrivilegesStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PRIVILEGES", output);
    }
    
=======
>>>>>>> f6be37a00024b99be40fa2b7f82f7f6e806c3b28
//
//    public void testShow() throws Exception {
//
Solution content
        Assert.assertEquals("SHOW PLUGINS", output);
    }
    
    public void test_show_PRIVILEGES() throws Exception {
        String sql = "SHOW PRIVILEGES";
        MySqlStatementParser parser = new MySqlStatementParser(sql);
        MySqlShowPrivilegesStatement show = (MySqlShowPrivilegesStatement) parser.parseStatementList().get(0);
        parser.match(Token.EOF);
        String output = SQLUtils.toMySqlString(show);
        Assert.assertEquals("SHOW PRIVILEGES", output);
    }
    
//
//    public void testShow() throws Exception {
//
File
DALParserTest.java
Developer's decision
Version 1
Kind of conflict
Method declaration