use of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement in project druid by alibaba.
the class DALParserTest method test_open_tables_3.
public void test_open_tables_3() throws Exception {
String sql = "SHOW OPEN TABLES in mysql like '%'";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowOpenTablesStatement show = (MySqlShowOpenTablesStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW OPEN TABLES FROM mysql LIKE '%'", output);
}
use of com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlShowOpenTablesStatement in project druid by alibaba.
the class DALParserTest method test_open_tables_4.
public void test_open_tables_4() throws Exception {
String sql = "SHOW OPEN TABLES in mysql where 1 = 1";
MySqlStatementParser parser = new MySqlStatementParser(sql);
MySqlShowOpenTablesStatement show = (MySqlShowOpenTablesStatement) parser.parseStatementList().get(0);
parser.match(Token.EOF);
String output = SQLUtils.toMySqlString(show);
Assert.assertEquals("SHOW OPEN TABLES FROM mysql WHERE 1 = 1", output);
}
Aggregations