Hi, > 1) does creating a temporary table cause an implicit > transaction commit?
Yes, in all cases. > Does LOCAL/GLOBAL matter here? No. > "create cached local temporary table if not exists" > in a separate connection. > the "main connection" is able to see it. I can't reproduce this. Local temporary tables are kept in the connection, so this should not work. My test case throws an exception: http://h2database.com/p.html#4d04031e2abad7738756f232658a2502 package db; import java.sql.Connection; import java.sql.DriverManager; 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", true); Connection conn1 = DriverManager.getConnection("jdbc:h2:data/test"); Connection conn2 = DriverManager.getConnection("jdbc:h2:data/test"); try { conn1.createStatement().execute( "create cached local temporary table if not exists test(id int)"); conn2.createStatement().execute( "select * from test"); } finally { conn1.close(); conn2.close(); } } } Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
