mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser support, fix #3947
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.alibaba.druid.bvt.sql.mysql;
|
||||
|
||||
import com.alibaba.druid.DbType;
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser;
|
||||
@@ -52,4 +53,9 @@ public class MySqlSetTest_3 extends TestCase {
|
||||
|
||||
Assert.assertEquals("SET sql_mode = ?, NAMES ?, CHARACTER SET utf8, CHARACTER_SET_RESULTS = utf8, COLLATION_CONNECTION = ?", text);
|
||||
}
|
||||
|
||||
public void test_1() throws Exception {
|
||||
SQLUtils.parseSingleStatement("set names utf8mb4", "mysql");
|
||||
SQLUtils.parseSingleStatement("set names utf8mb4", (DbType) null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user