Re: [h2] Corruption in a database created in 1.3.174 when opening and closing it in 1.3.176

2014-06-03 Thread Cecil Westerhof
2014-06-02 18:04 GMT+02:00 Thomas Mueller thomas.tom.muel...@gmail.com: Yes, this problem was introduced in version 1.3.176, actually by fixing another bug. It happens when upgrading a database with a special kind of foreign key constraint from an older version to 1.3.176. I found the problem

Re: [h2] Exception when opening DB after forced shutdown (1.3.176)

2014-06-03 Thread too
Hello, I can test the fix for you easily, all I need is h2 jar with fix. Regarding the test I tried all I could think of. Our app is fairly large (15MB jar of classes with lots of framework-ish stuff happening in the background) so it is difficult to point out the scenario. Tried INFO logging

[h2] ARRAY_AGG() support

2014-06-03 Thread Lukas Eder
Hello, I just wanted to create an example for a blog post and noticed that there is (probably?) no way to aggregate data into an array, the way PostgreSQL allows it through ARRAY_AGG(): http://www.postgresql.org/docs/9.3/interactive/functions-aggregate.html An example in PostgreSQL: select

[h2] Query processing in H2 DB

2014-06-03 Thread krismat . design
Hello, I have a question about the H2 Database. Where can I analyzing the code about query processing and optimization? In which data file is it? Thanks for each help :-) -- You received this message because you are subscribed to the Google Groups H2 Database group. To unsubscribe from this

[h2] Re: Query processing in H2 DB

2014-06-03 Thread too
Hi, I am not sure whether I understand the question but here are few tips to analyse H2 performance http://zvikico.typepad.com/problog/2008/04/h2-performance.html Tono On Tuesday, June 3, 2014 12:55:58 PM UTC+2, krismat...@gmail.com wrote: Hello, I have a question about the H2 Database.

Re: [h2] Query processing in H2 DB

2014-06-03 Thread Noel Grandin
It's in lots of files. You'll have to be more specific. On 2014-06-03 12:55 PM, krismat.des...@gmail.com wrote: I have a question about the H2 Database. Where can I analyzing the code about query processing and optimization? In which data file is it? -- You received this message because you

[h2] State of the recursive CTE feature

2014-06-03 Thread Lukas Eder
Hello, We're currently integrating support for CTE in jOOQ and we're wondering if we should support CTE for H2 at all. H2 has experimental CTE support, if I'm not mistaken: http://www.h2database.com/html/advanced.html?highlight=recursivesearch=recursive#recursive_queries This would be one of our

[h2] Recursive CTE don't work when recursion predicate uses a bind variable

2014-06-03 Thread Lukas Eder
Java program to reproduce this: Connection con = getConnection(); System.out.println(Wrong result:); PreparedStatement stmt = con.prepareStatement( WITH recursive t(f) AS ( + SELECT 1 + UNION ALL+ SELECT t.f + 1 + FROM t

[h2] Re: Recursive CTE don't work when recursion predicate uses a bind variable

2014-06-03 Thread Lukas Eder
In fact, there seems to be a second issue related to bind variables and recursive CTE. Consider the following alternative program: Connection con = getConnection(); System.out.println(Wrong result:); PreparedStatement stmt = con.prepareStatement( WITH

[h2] web console Servlet - how to not allow others to create new databases

2014-06-03 Thread Adam McMahon
Hi, We use embedded H2 in a webapp with tomcat. We use the servlet webconsole to manage the database. Our database is password protected, which should allow some security. But I don't see how to prevent an unauthorized user from creating a new database and filling it with junk if they visit

[h2] understanding preparestatement reuse

2014-06-03 Thread Adam McMahon
Hi, I frequently use PreparedStatements, but I am a bit unsure how to properly reuse them. I create a statement String sql = select * from users where score?; PreparedStatement ps = con.prepareStatement(sql); ps.setInt(1, n); ResultSet rs = ps.executeQuery(); // do stuff rs.close();

Re: [h2] Query processing in H2 DB

2014-06-03 Thread krismat . design
Yes, but where could I begin the analysis? The question is, how do the h2 database processed a sql query? The individual steps of the query processing, parsing and validating for example. Am Dienstag, 3. Juni 2014 13:24:13 UTC+2 schrieb Noel Grandin: It's in lots of files. You'll have to be