Closed GoogleCodeExporter closed 9 years ago
What is the result with the newest versin, 1.2.125?
Original comment by thomas.t...@gmail.com
on 17 Dec 2009 at 12:00
According to my test case, the database grows up to 4 MB, but then stays this
size
(with 1.2.125). That's the behavior I expected, therefore I set the bug to
'works for
me'. My test case is:
package db;
import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import org.h2.tools.DeleteDbFiles;
public class TestSimple {
public static void main(String... args) throws Exception {
Class.forName("org.h2.Driver");
DeleteDbFiles.execute("data", "test", false);
Connection conn = DriverManager.getConnection(
"jdbc:h2:data/test");
for (int i = 0; i < 100000; i++) {
Connection conn1 = DriverManager.getConnection(
"jdbc:h2:data/test");
Statement stat1 = conn1.createStatement();
stat1.execute(
"create table test(id int primary key, name varchar)");
stat1.execute(
"drop table test");
conn1.close();
if (i % 1000 == 0) {
System.out.println(i + " " +
new File("data/test.h2.db").length());
}
}
conn.close();
}
}
Original comment by thomas.t...@gmail.com
on 21 Dec 2009 at 11:17
Original issue reported on code.google.com by
phewl...@oats.co.uk
on 17 Dec 2009 at 11:38