Hi,

I think the test is correct. I think I found the problem (a rollback
doesn't currently remove transient LOB entries), I will need to run some
more tests however.

Thanks a lot for the great test case!

Regards,
Thomas


On Wednesday, February 12, 2014, Steven Hall <[email protected]> wrote:

> Shouldn't the test be asserting that information_schema.lobs be one row
> not information_schema.lob_data?  Couldn't a large lob have
> multiple information_schema.lob_data rows?
>
> On Tuesday, February 11, 2014 1:35:58 AM UTC-6, Noel Grandin wrote:
>>
>>
>> I reduced the test-case, but I haven't found the problem yet.
>>
>> (Add this method to the TestLob unit test class)
>>
>>      private void testCleaningUpLobsOnRollback() throws Exception {
>>          deleteDb("lob");
>>          Connection conn = getConnection("lob");
>>          Statement stat = conn.createStatement();
>>          stat.execute("CREATE TABLE test(id int, data CLOB)");
>>          conn.setAutoCommit(false);
>>          stat.executeUpdate("insert into test values (1, '" +
>> MORE_THAN_128_CHARS + "')");
>>          conn.rollback();
>>          ResultSet rs = stat.executeQuery("select count(*) from test");
>>          rs.next();
>>          assertEquals(0, rs.getInt(1));
>>          rs = stat.executeQuery("select count(*) from
>> information_schema.lob_data");
>>          rs.next();
>>          assertEquals(0, rs.getInt(1));
>>          conn.close();
>>      }
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> [email protected]<javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>
> .
> To post to this group, send email to 
> [email protected]<javascript:_e(%7B%7D,'cvml','[email protected]');>
> .
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to