mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
补充testcase---兼容mysql的另一种语法:show columns from tableName in databaseName;
This commit is contained in:
@@ -59,6 +59,17 @@ public class SHOW_COLUMNS_Syntax_Test extends TestCase {
|
||||
|
||||
Assert.assertEquals("SHOW COLUMNS FROM mydb.mytable;", text);
|
||||
}
|
||||
|
||||
public void test_3() throws Exception {
|
||||
String sql = "SHOW COLUMNS FROM mytable IN mydb;";
|
||||
|
||||
SQLStatementParser parser = new MySqlStatementParser(sql);
|
||||
List<SQLStatement> stmtList = parser.parseStatementList();
|
||||
|
||||
String text = output(stmtList);
|
||||
|
||||
Assert.assertEquals("SHOW COLUMNS FROM mydb.mytable;", text);
|
||||
}
|
||||
|
||||
private String output(List<SQLStatement> stmtList) {
|
||||
StringBuilder out = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user