bug fixed for PageUtils.limit h2 support. for issue #2313

This commit is contained in:
wenshao
2018-02-04 10:43:33 +08:00
parent 0604a3c71b
commit 0f10b84a83
2 changed files with 21 additions and 2 deletions
@@ -0,0 +1,19 @@
package com.alibaba.druid.bvt.sql;
import com.alibaba.druid.sql.PagerUtils;
import com.alibaba.druid.util.JdbcConstants;
import com.alibaba.druid.util.JdbcUtils;
import junit.framework.TestCase;
import org.junit.Assert;
public class PagerUtilsTest_Limit_h2_0 extends TestCase {
public void test_db2_union() throws Exception {
String sql = "select * from t1 union select * from t2";
String result = PagerUtils.limit("SELECT * FROM test", JdbcUtils.H2, 0, 10);
System.out.println(result);
Assert.assertEquals("SELECT *\n" +
"FROM test\n" +
"LIMIT 10", result);
}
}