improve MySqlParameterizedOutputVisitor

This commit is contained in:
Yako
2014-10-22 19:41:05 +08:00
parent 38039e2480
commit 9da2cbc8d3
3 changed files with 12 additions and 10 deletions
@@ -26,11 +26,13 @@ public class MySqlParameterizedOutputVisitorTest_6 extends TestCase {
public void test_0() throws Exception {
String sql = "SET autocommit=1";
Assert.assertSame(ParameterizedOutputVisitorUtils.parameterize(sql, JdbcConstants.MYSQL), sql);
String paramSql = "SET @@autocommit = ?";
Assert.assertEquals(ParameterizedOutputVisitorUtils.parameterize(sql, JdbcConstants.MYSQL), paramSql);
}
public void test_1() throws Exception {
String sql = "SET GLOBAL sort_buffer_size=1000000, SESSION sort_buffer_size=1000000;";
Assert.assertSame(ParameterizedOutputVisitorUtils.parameterize(sql, JdbcConstants.MYSQL), sql);
String paramSql = "SET @@global.sort_buffer_size = ?, @@sort_buffer_size = ?";
Assert.assertEquals(ParameterizedOutputVisitorUtils.parameterize(sql, JdbcConstants.MYSQL), paramSql);
}
}