mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for big or
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.alibaba.druid.bvt.sql;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
|
||||
public class BigOrTest extends TestCase {
|
||||
|
||||
public void testBigOr() throws Exception {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append("SELECT * FROM T WHERE FID = ?");
|
||||
for (int i = 0; i < 10000; ++i) {
|
||||
buf.append(" OR FID = " + i);
|
||||
}
|
||||
String sql = buf.toString();
|
||||
List<SQLStatement> stmtList = SQLUtils.parseStatements(sql, null);
|
||||
String text = SQLUtils.toSQLString(stmtList.get(0));
|
||||
System.out.println(text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user