bug fixed for issue #3986

This commit is contained in:
高铁
2020-10-22 17:10:35 +08:00
parent a4aca07c6c
commit 89bc4ae161
2 changed files with 27 additions and 0 deletions
@@ -0,0 +1,18 @@
package com.alibaba.druid.bvt.sql;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLStatement;
import junit.framework.TestCase;
import java.util.List;
public class CompatibleTest extends TestCase {
public void test_for_issue_3986() throws Exception {
String sql = "select 1 from dual;";
List<SQLStatement> stmts = SQLUtils.parseStatements(sql, "mysql");
assertEquals(1, stmts.size());
assertEquals("select 1\n" +
"from dual;", stmts.get(0).toLowerCaseString());
}
}