-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathtestLongStatement.java
More file actions
34 lines (23 loc) · 948 Bytes
/
Copy pathtestLongStatement.java
File metadata and controls
34 lines (23 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package test;
/*
* Date: 13-8-14
*/
import gudusoft.gsqlparser.EDbVendor;
import gudusoft.gsqlparser.TGSqlParser;
import junit.framework.TestCase;
public class testLongStatement extends TestCase {
public void test1(){
TGSqlParser parser = new TGSqlParser(EDbVendor.dbvmysql);
StringBuffer stringBuffer = new StringBuffer("REPLACE INTO sales.testTable (var1) VALUES ('");
for (int j = 0; j < 10000; j++) {
if (j % 1000 == 0) {
// System.out.println("Appended VALUES " + j + " times");
}
stringBuffer.append("- This is only part" + j + " of a really long value -");
}
stringBuffer.append("')");
parser.sqltext = stringBuffer.toString();
int response = parser.parse();
assertTrue(response == 0);
}
}