[h2] H2 Database Engine: New version 1.4.192 available

2016-05-26 Thread Thomas Mueller Graf
Hello,

A new version of H2 is available at http://www.h2database.com
(you may have to click 'Refresh').

For details, see the 'Change Log' at
http://www.h2database.com/html/changelog.html

For future plans, see the 'Roadmap' page at
http://www.h2database.com/html/roadmap.html

Please note the jar file may not yet be available in the
Maven central repository (synchronizing usually takes a few hours).

P.S. If you reply to this message please use a different subject.

Have fun,
Thomas

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: H2 Database Engine: New version 1.4.192 available

2016-05-26 Thread Thomas Mueller Graf
Hi,

Yes, the changelog was incorrect. Fixed now. Thanks!

Regards,
Thomas


On Thu, May 26, 2016 at 1:51 PM, IntensiveH2  wrote:

> Hello,
>
> It seems that the file http://www.h2database.com/html/changelog.html
> <http://www.google.com/url?q=http%3A%2F%2Fwww.h2database.com%2Fhtml%2Fchangelog.html&sa=D&sntz=1&usg=AFQjCNGYU5bS1drcMIXjlMbqwuQcFGLUVA>
>  is
> not update for the version  1.4.192.
>
> Regards,
> Thierry.
>
> Le jeudi 26 mai 2016 09:30:05 UTC+2, Thomas Mueller Graf a écrit :
>>
>> Hello,
>>
>> A new version of H2 is available at http://www.h2database.com
>> (you may have to click 'Refresh').
>>
>> For details, see the 'Change Log' at
>> http://www.h2database.com/html/changelog.html
>>
>> For future plans, see the 'Roadmap' page at
>> http://www.h2database.com/html/roadmap.html
>>
>> Please note the jar file may not yet be available in the
>> Maven central repository (synchronizing usually takes a few hours).
>>
>> P.S. If you reply to this message please use a different subject.
>>
>> Have fun,
>> Thomas
>>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Grammar error in website

2016-06-01 Thread Thomas Mueller Graf
Hi,

Sorry I don't understand. As far as I know, "insensitive" = "not sensitive".
So your change would result in: "In MySQL text columns are case
insensitive, while in H2 they are case insensitive." So case insensitive in
both cases. That is not correct and wouldn't make sense as a sentence.

Regards,
Thomas




On Tuesday, May 24, 2016, Ricardo PinGuiM 
wrote:

> Hello guys, im new here and i just want to report an grammatical error in
> this link http://www.h2database.com/html/features.html#compatibility
>
> The text is "In MySQL text columns are case insensitive by default, while
> in H2 they are case sensitive." and i think it has to be "In MySQL text
> columns are case insensitive by default, while in H2 they are not case
> sensitive."
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] The OFFSET should be optimized in H2

2016-06-01 Thread Thomas Mueller Graf
Hi,

I will document this. Existing documentation: "OFFSET specified how many
rows to skip.". I will add "Please note using high offset values should be
avoided because it can cause performance problems."

Regards,
Thomas


On Thursday, May 26, 2016, Silvio  wrote:

> Which is why I said you should use LIMIT.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Constraints & Functions

2016-06-01 Thread Thomas Mueller Graf
Hi,

Yes, Java functions are supported.

Regards,
Thomas


On Thursday, May 26, 2016,  wrote:

> Hi!
>
> My apologies if this has already been asked. Our team is trying to update
> our schema, but now we have constraints which include functions. Does
> anyone know if H2 supports constraints with functions?
>
> Thanks so much!
> Joye
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Help with proper data formatting - Rookie needs a little help

2016-06-01 Thread Thomas Mueller Graf
Hi,

> H2 does not support the "TO_DATE" function!!

It does, since a few releases. Maybe you use an old version of H2? This
works for me:

call TO_DATE('13-OCT-2011 10:35:24', 'DD-MON- HH24:MI:SS')
> 2011-10-13 10:35:24.0

Regards,
Thomas


On Sunday, May 29, 2016, Kerry Sainsbury  wrote:

> You stand a better chance of getting some help if you provide the DDL for
> the L_LUNCHES and L_EMPLOYEES tables.
>
> On 29 May 2016 at 18:19, Kent Sands  > wrote:
>
>> Anyone please help?
>>
>> I have all of my database tables created and have run into problems
>> running INSERT statements that seem to be fairly straight forward, but
>> there's something wrong with the format I'm using for the date values and I
>> can't seem to find any resources that can provide me with an example of
>> what the proper syntax is to use for table inserts. Any assistance would be
>> greatly appreciated!
>>
>> There are two different sets of date inserts being performed. This first
>> set seems fairly straight forward, but I'm missing something and don't know
>> how to code this to make it work!
>>
>> INSERT INTO L_EMPLOYEES VALUES
>>   (201, 'SUSAN', 'BROWN', 'EXE', '01-JUN-1998', 30, '3484', NULL);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (202, 'JIM', 'KERN', 'SAL', '16-AUG-1999', 25, '8722', 201);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (203, 'MARTHA', 'WOODS', 'SHP', '02-FEB-2009', 25, '7591', 201);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (204, 'ELLEN', 'OWENS', 'SAL', '01-JUL-2008', 15, '6830', 202);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (205, 'HENRY', 'PERKINS', 'SAL', '01-MAR-2006', 25, '5286', 202);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (206, 'CAROL', 'ROSE', 'ACT', NULL, NULL, NULL, NULL);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (207, 'DAN', 'SMITH', 'SHP', '01-DEC-2008', 25, '2259', 203);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (208, 'FRED', 'CAMPBELL', 'SHP', '01-APR-2008', 25, '1752', 203);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (209, 'PAULA', 'JACOBS', 'MKT', '17-MAR-1999', 15, '3357', 201);
>> INSERT INTO L_EMPLOYEES VALUES
>>   (210, 'NANCY', 'HOFFMAN', 'SAL', '16-FEB-2007', 25, '2974', 203);
>> COMMIT;
>>
>> [image: Inline image]
>>
>>
>> These statements are likewise producing errors. *H2 does not support the
>> "TO_DATE" function!!* So that means we need to determine how to code the
>> date function including the time for this section of the script.
>>
>> So fat today I have put about 9 hours of time working on this stupid
>> script. This date/time issue has been really causing problems.
>>
>> INSERT INTO L_LUNCHES VALUES (1, '16-NOV-2011', 201, TO_DATE('13-OCT-2011
>> 10:35:24', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (2, '16-NOV-2011', 207, TO_DATE('13-OCT-2011
>> 10:35:39', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (3, '16-NOV-2011', 203, TO_DATE('13-OCT-2011
>> 10:35:45', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (4, '16-NOV-2011', 204, TO_DATE('13-OCT-2011
>> 10:35:58', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (6, '16-NOV-2011', 202, TO_DATE('13-OCT-2011
>> 10:36:41', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (7, '16-NOV-2011', 210, TO_DATE('13-OCT-2011
>> 10:38:52', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (8, '25-NOV-2011', 201, TO_DATE('14-OCT-2011
>> 11:15:37', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (9, '25-NOV-2011', 208, TO_DATE('14-OCT-2011
>> 14:23:36', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (12, '25-NOV-2011', 204,
>> TO_DATE('14-OCT-2011 15:02:53', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (13, '25-NOV-2011', 207,
>> TO_DATE('18-OCT-2011 08:42:11', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (15, '25-NOV-2011', 205,
>> TO_DATE('21-OCT-2011 16:23:50', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (16, '05-DEC-2011', 201,
>> TO_DATE('21-OCT-2011 16:23:59', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (17, '05-DEC-2011', 210,
>> TO_DATE('21-OCT-2011 16:35:26', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (20, '05-DEC-2011', 205,
>> TO_DATE('24-OCT-2011 09:55:27', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (21, '05-DEC-2011', 203,
>> TO_DATE('24-OCT-2011 11:43:13', 'DD-MON- HH24:MI:SS'));
>> INSERT INTO L_LUNCHES VALUES (22, '05-DEC-2011', 208,
>> TO_DATE('24-OCT-2011 14:37:32', 'DD-MON- HH24:MI:SS'));
>> COMMIT;
>>
>>
>> [image: Inline image]
>>
>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com
>> 
>> .
>> To post to this group, send email to h2-database@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed

Re: [h2] Timeout trying to lock table: Caused by .. Concurrent update in table "MY_TABLE": another transaction has updated or deleted the same row

2016-06-01 Thread Thomas Mueller Graf
Hi,

On a concurrent update, the statement (just the statement, not the whole
transaction) is rolled back and re-run. This is done a few times, and after
some time (the configured timeout), the "timeout" exception is thrown.

Regards,
Thomas


On Tuesday, May 31, 2016, Martin Lichtin  wrote:

> We're sometimes seeing this exception when doing SELECT .. FOR UPDATE
> concurrently .
>
> Caused by: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table ;
> SQL statement:
> SELECT * FROM SA.MY_TABLE WHERE MY_ID = ? FOR UPDATE [50200-191]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:345
> )
> at org.h2.message.DbException.get(DbException.java:168)
> at org.h2.command.Command.filterConcurrentUpdate(Command.java:307)
> at org.h2.command.Command.executeQuery(Command.java:203)
> at org.h2.server.TcpServerThread.process(TcpServerThread.java:320)
> at org.h2.server.TcpServerThread.run(TcpServerThread.java:159)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.h2.jdbc.JdbcSQLException: Concurrent update in table
> "MY_TABLE": another transaction has updated or deleted the same row [90131
> -191]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:345
> )
> at org.h2.message.DbException.get(DbException.java:179)
> at org.h2.message.DbException.get(DbException.java:155)
> at org.h2.table.RegularTable.removeRow(RegularTable.java:374)
> at org.h2.table.TableFilter.lockRows(TableFilter.java:1147)
> at org.h2.command.dml.Select.queryFlat(Select.java:565)
> at org.h2.command.dml.Select.queryWithoutCache(Select.java:654)
> at org.h2.command.dml.Query.query(Query.java:341)
> at org.h2.command.dml.Query.query(Query.java:309)
> at org.h2.command.dml.Query.query(Query.java:36)
> at org.h2.command.CommandContainer.query(CommandContainer.java:110)
> at org.h2.command.Command.executeQuery(Command.java:201)
> ... 3 more
>
> at org.h2.engine.SessionRemote.done(SessionRemote.java:624)
> at org.h2.command.CommandRemote.executeQuery(CommandRemote.java:158)
> at org.h2.jdbc.JdbcPreparedStatement.executeQuery(
> JdbcPreparedStatement.java:110)
>
> What's a bit confusing, is this a really a timeout situation, or something
> different as the 'caused by' exception would indicate?
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] What version to pick for production

2016-06-08 Thread Thomas Mueller Graf
Hi,

What I could do is make H2 version 1.4.192 "non-beta" now. I didn't want to
do that because for some use cases (according to Steve McLeod), performance
was not great with versions up to and including 1.4.191, and I didn't know
about 1.4.192. But now I have confirmation from Steve McLeod that
performance improved almost to the PageStore level. Not quite as good, but
relatively close. As for stability, I didn't see any major problems with
version 1.4.191 and 1.4.192.

What is a bit unexpected is that the jar file of 1.4.192 is compiled with
Java 7, which doesn't match the documentation. This is my mistake.

Or, probably easier, is to release version 1.4.193 soon, and mark that as
stable.

Regards,
Thomas

On Tuesday, June 7, 2016, Dennis Wagelaar 
wrote:

> It's the same for us: we use H2 in production as well, as a client-side
> database that caches part of the server-side database for offline use. If
> there's ever an inquiry into the cause of a particularly painful data loss
> of offline recorded data, using a beta version of a database engine is
> enough to conclude the inquiry. We are currently looking at the following
> timeline:
>
> - 2011: choice of database engine: HSQLDB is inactive since 2010, H2 is
> actively developed: we chose H2
> - 2014: last stable release of H2
> - 2015: HSQLDB development restarted; 2.x release series
> - 2016: still no stable H2 release
>
> We're currently using H2 1.3.168: Upgrading to 1.3.176 has resulted in
> several cases of database file corruption, so we never pushed that to
> production. As a result, we're currently stuck with 1.3.168.
>
> Op maandag 6 juni 2016 10:26:57 UTC+2 schreef Silvio:
>>
>> Thank you for the info. I am still very uncomfortable using something
>> that is marked as beta in production. But this beta status has lasted for a
>> long time already and it is unclear when an actual release version will be
>> available. And in the meantime I have seen multiple remarks about things
>> that have been improved in 1.4 wrt. the PageStore.
>>
>> Personally I would have preferred a release status for 1.4 as soon as the
>> software was reliable enough to warrant use in production, regardless of a
>> possible format change. Why not call that 1.5, 1.6 aso. to mark such
>> backward incompatibility?
>>
>>
>> On Sunday, June 5, 2016 at 9:15:19 AM UTC+2, Noel Grandin wrote:
>>>
>>> We use 1.4 in production with both PageStore and MVStore, both are
>>> pretty stable.
>>>
>>> We currently find PageStore to be slightly more stable when running on
>>> some systems in the field where power outages are extremely common (i.e.
>>> more than once per day), but even there we are thinking of moving to
>>> MVStore with the latest 1.4 builds.
>>>
>>> The only downside with MVStore is that there might be a binary format
>>> change at some point in the future, which will need need a full dump and
>>> restore to upgrade across.
>>> ​
>>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] h2 sql rollback syntax questions

2016-06-08 Thread Thomas Mueller Graf
Hi,

Not sure about version 1.3.153, but with a current version of H2, I get,
depending on autocommit enabled or not:

Autocommit enabled:
rollback to savepoint test_savepoint;
Savepoint is invalid: "TEST_SAVEPOINT"; SQL statement:
rollback to savepoint test_savepoint [90063-192] 90063/90063

Autocommit disabled:
select returns only one row.

Regards,
Thomas



On Wednesday, June 8, 2016, Clint Hyde  wrote:

> i apologize for being ignorant and poor sql skills here...
>
>
> I'm trying to do the following:
>
> DROP TABLE TEST;
>
> CREATE TABLE TEST(ID NUMERIC(15) NOT NULL);
>
> insert into test values (1);
>
> savepoint test_savepoint;
>
> insert into test values (2);
>
> rollback to savepoint test_savepoint;
>
> select * from test;
>
> and it doesn't work.
>
> well, it does, but the "rollback to savepoint" does not. so I permanently
> have two rows.
>
> I am using an old H2 (1.3.153) at the moment, no particular reason except
> that I have a couple of older databases, and I haven't "upgraded" them.
> (one is deployed on the web and is a little harder to upgrade than I'd like)
>
> does this really not work?
>
> I'm trying to do some tests re bulk transactions...
>
>
> related:
>
> rollback transaction 
>
> where does that  come from? I was sort of expecting to see something
> like
>
> begin transaction 
>
> so I could use
>
> rollback transaction 
>
> or
>
> commit transaction 
>
>  -- clint
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Proposal: Change the docs for how to contribute

2016-06-09 Thread Thomas Mueller Graf
Hi,

Yes, it would be great if you could update the documentation, if you have
time!

Regards,
Thomas


On Thursday, June 9, 2016, Steve McLeod  wrote:

> The H2 website has guidelines for contributing patches to H2:
> http://h2database.com/html/build.html#providing_patches
>
> The guidelines include this:
>
> Submit patches as .patch files (compressed if big). To create a patch
>> using Eclipse, use Team / Create Patch.
>
>
> However, ever since H2 moved from Subversion/Google Code to Git/Github,
> what's actually been mostly happening is that people are submitting GitHub
> pull requests. A conversation takes place on the pull request, and, if all
> doubts are resolved, then someone with appropriate authority merges the
> pull request.
>
> I'd like to update H2 "guidelines for contributing" to reflect this
> reality. This will also be helpful for people not familiar with the concept
> of pull requests on GitHub.
>
> Thomas, Noel, anyone else: Does this sound reasonable? If so, I'll go
> ahead and update the docs.
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] SET GLOBAL FOREIGN KEY CHECKS Syntax Error Migrating from 1.3.172 to 1.3.176

2016-06-16 Thread Thomas Mueller Graf
Hi,

I don't think "SET GLOBAL FOREIGN_KEY_CHECKS" was ever supported by H2.
This seems to be a MySQL feature.

Regards,
Thomas


On Thu, Jun 16, 2016 at 3:41 PM, Noel Grandin  wrote:

> or you could use
>
>   SET REFERENTIAL_INTEGRITY FALSE
>   http://h2database.com/html/grammar.html#set_referential_integrity
>
> which it looks like we created to supercede that prior command.
>
> On 16 June 2016 at 15:38, Noel Grandin  wrote:
>
>> Probably the only thing you could do would be to
>> (a) catch that exception
>> (b) spawn a subprocess which invokes a custom program which uses the last
>> version of H2 to support that check to upgrade your DB to current schema,
>> then close the DB
>> (c) then the main program can re-open the DB and proceed with further
>> upgrading
>>
>> ​
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Other way to throw away garbage of not closed transactions?

2016-07-19 Thread Thomas Mueller Graf
Hi,

You could use "shutdown defrag".

Regards,
Thomas

On Tuesday, July 19, 2016, ck  wrote:

> I am facing a similar issue, can you provide all the commands needed to
> restore backup to decent size?
> Script/run script/delete all objects combo and such
>
> [+1] I am as well looking for an automatic solution to this problem
> instead of manually do operations in run time
>
> Thank you
>
> --
> 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 h2-database+unsubscr...@googlegroups.com .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Database size is strangely big, actual data is not so much, dropping/adding rows/tables does not modify file size, Database size after cleaned is anyway very big even if no data is present an

2016-07-19 Thread Thomas Mueller Graf
Hi,

With the MVStore storage engine, which is the default in version 1.4.x, the
file size is typically a few times larger than the "real data". This is
expected. If you run "shutdown defrag", the file size should decrease. Does
it do that?

Reason for the larger file size: to speed up writes without risking to lose
data, old data (younger than a few minutes old) is not overwritten, but
kept. Disk space is eventually released and re-used, but that algorithm is
not yet optimized with the current version. I know this should be improved
in the future.

Regards,
Thomas



On Monday, July 18, 2016, ck  wrote:

> This is my first post on this group,
> Hello to everyone! :)
>
> I have a problem with my H2 DATABASE.
> I am seriously worried by the size it is getting, it is now about 350mb
> (Yeah I know it's not the largest one), but my worries go all to the future
> and how it will scale in the long run.
>
> Issues:
> - Trying to Export data as CSV using DataGrip (or any other Database
> Explorer) I get less than 50mb of real 'data'
> - Database seems filled with tons of 'unknown' data - I know the database
> stores indexes and such, but I tried DROPPING ALL OBJECTS, or DELETING
> TABLES , DELETING INFORMATION_SCHEMA just for test purpose and after all
> was cleaned it was around 250mb anyway.
> - After cleaning the whole DB which is now totally empty but still weights
> 250mb, the size changes after connect/disconnect, lowering abour 4mb each
> time
> - Deleting tables o creating tables and adding 1000 rows does not change
> file size (?) - and many times dropping tables/rows does not lower the DB
> Size (why?)
> - After cleaning the whole DB which is now totally empty, still weights
> 250mb, what is happening?
>
>
> Details:
> - I have INCREMENTAL IDS (with some jumping sequences, eg. from 10->40)
> - I store BLOBs
> - I store VARCHARs, many fixed to 125 chars, some with 250/500 or 2000 in
> a unique case
> - I use a JVM Web App that starts connection at program start and closes
> it at program closing (I used this approach because I thought it could be
> very slow and could waste tons of resources to 'reopen, commit, close'
> connection every single time, considering multiple people send multiple
> requests simultaneously. I am free too critics and I totally encourage
> opinions/advices about this.
> - Every query is immediately turned to a Map of results and the ResultSet
> is closed as soon as possible
>
>
> What is happening? I am mostly concerned about the fact it may get such a
> large db in production to cause slowdowns or crashes of the machine
>
> Might my question have some mistakes, feel free to correct me and
> apologize for my first post
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Recovery tool does not handle LOBs correctly (explanation and fix is proposed)

2016-07-19 Thread Thomas Mueller Graf
Hi,

It would be better if the recovery mechanism does not use an internal
mechanism of H2 (not use the "hidden" INFORMATION_SCHEMA.LOBS tables, and
instead use "real" tables). This is fixed in the MVStore case, where "real"
tables are used (actually just INFORMATION_SCHEMA.LOB_BLOCKS).

So there are two ways to fix this for the PageStore: use a "real" table as
well (INFORMATION_SCHEMA.LOB_BLOCKS just as for the MVStore case), or your
fix. When using your fix, we would need test cases as well.

Regards,
Thomas



On Wednesday, July 13, 2016, Vitali  wrote:

> Hi.
>
> Recently I have observed that recovery tool strangely  breaks LOBs (in
> particular CLOB objects in my case, but same is applicable to BLOB).
> After recovery  CLOB values are not what they were in original H2 file
> before recovery process is run.
>
> More than a day of debugging and some understanding came.
>
> It seems other improvements made for LOB types handling affected recovery
> workflow.  In particular,  functions "READ_CLOB_DB" or "READ_BLOB_DB"  do
> not work as they worked long time ago.
>
>
> In  recovery script  we can see this type of SQL in case when table has
> LOB columns:
>
>
> CREATE TABLE O_1460(C0 CLOB, C1 CLOB);
> INSERT INTO O_1460 VALUES(READ_CLOB_DB(1, 1006), READ_CLOB_DB(2, 3692));
>
> ...
> CREATE TABLE O_1462(C0 CLOB, C1 CLOB);
> INSERT INTO O_1462 VALUES(READ_CLOB_DB(5, 1006), READ_CLOB_DB(6, 4152));
>
>
> These are temporary tables  populated during recovery. In my case the
> table really looks like  (CLOB, CLOB)  - it does not matter, main idea is
> that table has some LOB column.
>
> let's continue.
>
> READ_CLOB_DB(5, 1006) leads to   Recover.readClobDb  which creates
> ValueLobDb  object,  but inserting this object into table O_1462  calls the
> method  LobStorageBackend.copyLob:
>
> long lobId = getNextLobId();
> String sql = "INSERT INTO " + LOB_MAP + "(LOB,
> SEQ, POS, HASH, BLOCK) " +
> "SELECT ?, SEQ, POS, HASH, BLOCK FROM " +
> LOB_MAP + " WHERE LOB = ?";
> PreparedStatement prep = prepare(sql);
> prep.setLong(1, lobId);
> prep.setLong(2, oldLobId);
> prep.executeUpdate();
> reuse(sql, prep);
>
> sql = "INSERT INTO " + LOBS + "(ID, BYTE_COUNT,
> TABLE) " +
> "SELECT ?, BYTE_COUNT, ? FROM " + LOBS + "
> WHERE ID = ?";
> prep = prepare(sql);
> prep.setLong(1, lobId);
> prep.setLong(2, tableId);
> prep.setLong(3, oldLobId);
> prep.executeUpdate();
> reuse(sql, prep);
>
> v = ValueLobDb.create(type, database, tableId,
> lobId, null, length);
>
>
> At this moment tables INFORMATION_SCHEMA.LOBS, LOBS_MAP are completely
> empty.
>
> So, it means "getNextLobId()" returns always 1. So, instead of original
> LOBID which is passed in READ_CLOB_DB(6, 4152)  we get a LOB reference  in
> target table  O_1462  that has LOBID=1.
>
> If there are 400 CLOB values in H2 database then all of them  gets LOBID=1.
>
> When the whole  recovery script is run including also logic below
>
> ...
> DELETE FROM INFORMATION_SCHEMA.LOBS;
> INSERT INTO INFORMATION_SCHEMA.LOBS SELECT * FROM O_2;
> UPDATE INFORMATION_SCHEMA.LOBS SET TABLE = -2;
> DELETE FROM INFORMATION_SCHEMA.LOB_MAP;
> INSERT INTO INFORMATION_SCHEMA.LOB_MAP SELECT * FROM O_6;
> DELETE FROM INFORMATION_SCHEMA.LOB_DATA;
> INSERT INTO INFORMATION_SCHEMA.LOB_DATA SELECT * FROM O_10;
> ...
>
> INSERT INTO SYMDS.SYM_ON_I_FOR_SYM_TRNSFRM_TBL_FLD_CONFIG SELECT * FROM
> O_1460;
> ...
> DROP TABLE O_1460;
> ...
>
>
> we get local database where all CLOB values  instead of referencing to
> correct INFORMATION_SCHEMA.LOB_DATA blocks as in original H2 file they
> reference same  LOB object,  that has had LOBID=1.
>
>
> -
>
> Problem is that  LobStorageBackend.copyLob:  should work differently at
> recovery  case because  system tables with LOB information is empty.
>
> I did a 1 minute fix that solves the problem:
>
>
> ValueLobDb:
>
> private boolean isRecoveryReference = false;
> public void setRecoveryReference(boolean isRecoveryReference) {
> this.isRecoveryReference = isRecoveryReference;
> }
>
> public boolean isRecoveryReference() {
> return isRecoveryReference;
> }
>
> Recover:
>
> /**
>  * INTERNAL
>  */
> public static Value.ValueClob readClobDb(Connection conn, long lobId,
> long precision) {
> DataHandler h = ((JdbcConnection) conn).getSession().
> getDataHandler();
> verifyPageStore(h);
> ValueLobDb lob =  ValueLobDb.create(Value.CLOB, h,
> LobStorageFrontend.TABLE_TEMP,
> lobId, null, precision);
> lob.setRecovery

Re: [h2] Page isn't working

2016-07-19 Thread Thomas Mueller Graf
Hi,

Sometimes, specially if you use Wifi, the IP address of the computer
changes. I suggest to use "localhost" instead of a fixed IP address.

Regards,
Thomas

On Saturday, July 16, 2016, Joshua Abednego 
wrote:

>
> Hi guys,
>
> I've been trying to follow ontoP tutorial (https://github.com/ontop) for
> ontology-based data access. They provide us with pre-bundled H2 server (
> https://sourceforge.net/projects/ontop4obda/files/sample-data/h2-ontop-20160114.zip/download
> ).
> Today I tried to run it (h2.bat) but I can't get it, the page says "The
> 192.168.1.105 page isn't working" and "192.168.1.105 didn't send any data
> whereas it works just fine yesterday.
>
> 
> Can anyone help me with the problem? Every help is much appreciated. Thank
> you very much.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Example for writing Trigger as Source Code

2016-07-19 Thread Thomas Mueller Graf
Hi,

I suggest to ask the question at Stackoverflow.com.

Regards,
Thomas


On Tuesday, July 19, 2016, Yap Choon Hoe 
wrote:

> *Hi Noel:*
>
> *Thxs for the help. I had read thro the information on that link. It is
> too brief for me to understand. It would be kind of you if it is possible
> to provide a more involved written example for say how to create an insert
> trigger on Table1 to insert the new inserted data row into another table
> (say Table2) if the field1 satisfy a certain condition.*
>
> *Thxs U in advance.*
>
> On Saturday, July 9, 2016 at 8:25:06 PM UTC+8, Noel Grandin wrote:
>
>> http://h2database.com/html/grammar.html#create_trigger
>> 
>>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 can't recover database

2016-07-20 Thread Thomas Mueller Graf
Hi,

I suggest to use the Recover tool of the very latest version of H2. You are
using version 1.4.186 (based on the error code). If it still doesn't work,
I'm afraid the data is lost (at least part of it). But I would try first.

Regards,
Thomas

On Wednesday, July 20, 2016, Tatyana Bitencourt  wrote:

> Hello,
>
> I'm trying to connect to database from H2 console and I get the following
> error:
>
> General error: "java.lang.IllegalStateException: Reading from
> cache:nio:C:/db/database.mv.db failed; file length 98693120 read length 512
> at 98707108 [1.4.186/1]" [5-186] HY000/5
>
> So I think the database could be corrupted. When I try to use the recover
> tool, I get the same message error.
>
>
> Can anyone please help me? Thank you.
>
>
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Unable to remove constraint

2016-07-20 Thread Thomas Mueller Graf
Hi,

We would need a simple, reproducible test case.

Regards,
Thomas


On Saturday, July 2, 2016, Meni Hillel > wrote:

> I get the confusion now Apologies. One log was produced from my app,
> which used 191. The other log was produced using interactive SQL program
> (SQuirreL SQL Client) which happens to use 187. Both obviously experienced
> the same issue, suggesting this issue exist in both versions.
>
> On Sat, Jul 2, 2016 at 4:04 AM, Noel Grandin 
> wrote:
>
>>
>> >Error: Constraint "UK_1PT73622HFCLVE5LRHRQTITBK" not found; SQL
>> statement:
>> >alter table subscription drop constraint UK_1pt73622hfclve5lrhrqtitbk
>> [90057-187]
>>
>> the -187 here
>>
>> > ALTER TABLE SUBSCRIPTION DROP CONSTRAINT 
>> > UK_1PT73622HFCLVE5LRHRQTITBK_INDEX_9
>> [90057-191]
>>
>> and the -191 here
>>
>> say that you have two different versions of H2 somehow showing up.
>> ​
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "H2 Database" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/h2-database/Ecvu83pEZC0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> h2-database+unsubscr...@googlegroups.com.
>> To post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Database size is strangely big, actual data is not so much, dropping/adding rows/tables does not modify file size, Database size after cleaned is anyway very big even if no data is present an

2016-07-20 Thread Thomas Mueller Graf
Hi,

The PageStore is a classical storage system with redo and undo log, and
overwrites old data (in a save way). The MVStore doesn't overwrite data
immediately, but wait doing that for at least 1 minute. In theory, the
PageStore needs less (measurable) disk space, but in practise, with solid
state disks, the internal disk space usage is not actually all that
different.

But I understand the MVStore disk space usage still needs to be improved,
that's also a reason why the 1.4 branch is not marked as stable. However it
was improved since version 1.4.185 until now. So I suggest to use the
latest version of H2 and try again. Also with "shutdown defrag".

Regards,
Thomas

On Wednesday, July 20, 2016, ck  wrote:

> Also,
> do you have some performance comparison between MVSTORE and old structure?
>
> I admin that
> 1) MVStore is actually a future-proof way to store data and it is simply
> exciting to write to database using Maps (which I blindly LOVE)  and
> without JDBC o SQL drivers
> 2) The database read/write timings are efficient and fast (But I can't say
> if it actually faster than before, as it was anyway always performant)
>
> The db is anyway in production and quite new, and it simply can't be 10x
> or more bigger than normal. in 1 year it will be several gigs going this
> way and this is simply not possible because it will cause problems in the
> long run and 'sometimes' indefinitely in the future
>
> I think I will immediately jump to the MVS train when it is most stable
> and secure, so please when it will, you should state it in big words in h2
> website as many could be interested
>
> Thank you
>
>
> Il giorno martedì 19 luglio 2016 05:36:05 UTC+2, ck ha scritto:
>>
>> This is my first post on this group,
>> Hello to everyone! :)
>>
>> I have a problem with my H2 DATABASE.
>> I am seriously worried by the size it is getting, it is now about 350mb
>> (Yeah I know it's not the largest one), but my worries go all to the future
>> and how it will scale in the long run.
>>
>> Issues:
>> - Trying to Export data as CSV using DataGrip (or any other Database
>> Explorer) I get less than 50mb of real 'data'
>> - Database seems filled with tons of 'unknown' data - I know the database
>> stores indexes and such, but I tried DROPPING ALL OBJECTS, or DELETING
>> TABLES , DELETING INFORMATION_SCHEMA just for test purpose and after all
>> was cleaned it was around 250mb anyway.
>> - After cleaning the whole DB which is now totally empty but still
>> weights 250mb, the size changes after connect/disconnect, lowering abour
>> 4mb each time
>> - Deleting tables o creating tables and adding 1000 rows does not change
>> file size (?) - and many times dropping tables/rows does not lower the DB
>> Size (why?)
>> - After cleaning the whole DB which is now totally empty, still weights
>> 250mb, what is happening?
>>
>>
>> Details:
>> - I have INCREMENTAL IDS (with some jumping sequences, eg. from 10->40)
>> - I store BLOBs
>> - I store VARCHARs, many fixed to 125 chars, some with 250/500 or 2000 in
>> a unique case
>> - I use a JVM Web App that starts connection at program start and closes
>> it at program closing (I used this approach because I thought it could be
>> very slow and could waste tons of resources to 'reopen, commit, close'
>> connection every single time, considering multiple people send multiple
>> requests simultaneously. I am free too critics and I totally encourage
>> opinions/advices about this.
>> - Every query is immediately turned to a Map of results and the ResultSet
>> is closed as soon as possible
>>
>>
>> What is happening? I am mostly concerned about the fact it may get such a
>> large db in production to cause slowdowns or crashes of the machine
>>
>> Might my question have some mistakes, feel free to correct me and
>> apologize for my first post
>>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] File corrupted in chunk 1550574, expected page length 4..1024, got 1852517937 [1.4.191/6]

2016-07-20 Thread Thomas Mueller Graf
Hi,

I would be interested to analyze the database file if you still have them.

Regards,
Thomas

On Tuesday, July 12, 2016, Zheng Wang  wrote:

> I met the same problem. H2 database 1.4.191 was corrupted after a Windows
> 7 crash.
> When connecting to the database via Squirrel using URL
> jdbc:h2:C:/Temp/database_corrupted/database/test;AUTO_SERVER=TRUE, I got
> below error
>
> java.util.concurrent.ExecutionException: java.lang.RuntimeException:
> org.h2.jdbc.JdbcSQLException: File corrupted while reading record: null.
> Possible solution: use the recovery tool [90030-191]
> at java.util.concurrent.FutureTask.report(Unknown Source)
> at java.util.concurrent.FutureTask.get(Unknown Source)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.RuntimeException: org.h2.jdbc.JdbcSQLException: File
> corrupted while reading record: null. Possible solution: use the recovery
> tool [90030-191]
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
> ... 5 more
> Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading
> record: null. Possible solution: use the recovery tool [90030-191]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
> at org.h2.message.DbException.get(DbException.java:168)
> at
> org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:195)
> at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:167)
> at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:99)
> at org.h2.engine.Database.getPageStore(Database.java:2460)
> at org.h2.engine.Database.open(Database.java:692)
> at org.h2.engine.Database.openDatabase(Database.java:270)
> at org.h2.engine.Database.(Database.java:264)
> at org.h2.engine.Engine.openSession(Engine.java:65)
> at org.h2.engine.Engine.openSession(Engine.java:175)
> at org.h2.engine.Engine.createSessionAndValidate(Engine.java:153)
> at org.h2.engine.Engine.createSession(Engine.java:136)
> at org.h2.engine.Engine.createSession(Engine.java:28)
> at
> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349)
> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:107)
> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:91)
> at org.h2.Driver.connect(Driver.java:72)
> at
> net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
> at
> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
> ... 7 more
> Caused by: java.lang.IllegalStateException: File corrupted in chunk 19309,
> expected page length 4..1024, got 745365880 [1.4.191/6]
> at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
> at org.h2.mvstore.Page.read(Page.java:649)
> at org.h2.mvstore.Page.read(Page.java:195)
> at org.h2.mvstore.MVStore.readPage(MVStore.java:1939)
> at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
> at org.h2.mvstore.Page.getChildPage(Page.java:217)
> at org.h2.mvstore.Cursor.fetchNext(Cursor.java:150)
> at org.h2.mvstore.Cursor.next(Cursor.java:50)
> at org.h2.mvstore.MVStore.loadChunkMeta(MVStore.java:690)
> at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:670)
> at org.h2.mvstore.MVStore.(MVStore.java:353)
> at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2888)
> at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:154)
> ... 23 more
>
>
> When running the Recover command 'java -cp h2-1.4.191.jar
> org.h2.tools.Recover', I got below error
>
> Exception in thread "main" java.lang.IllegalStateException: File corrupted
> in chunk 19309, expected page length 4..1024, got 745365880 [1.4.191/6]
> at
> org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
>
> at org.h2.mvstore.Page.read(Page.java:649)
> at org.h2.mvstore.Page.read(Page.java:195)
> at org.h2.mvstore.MVStore.readPage(MVStore.java:1939)
> at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
> at org.h2.mvstore.Page.getChildPage(Page.java:217)
> at org.h2.mvstore.Cursor.fet

Re: [h2] H2 can't recover database

2016-07-20 Thread Thomas Mueller Graf
Hi,

If you can send me the database file, I can try to recover the data, and
improve the Recover tool.

Regards,
Thomas

On Wednesday, July 20, 2016, Tatyana Bitencourt  wrote:

> I've tried to recover with the latest version, but I've got the same error.
>
> The worst part is that I've lost all the data, not only part of it...
>
>
> Tatyana
>
> On Wednesday, July 20, 2016 at 12:33:00 PM UTC-3, Thomas Mueller Graf
> wrote:
>>
>> Hi,
>>
>> I suggest to use the Recover tool of the very latest version of H2. You
>> are using version 1.4.186 (based on the error code). If it still doesn't
>> work, I'm afraid the data is lost (at least part of it). But I would try
>> first.
>>
>> Regards,
>> Thomas
>>
>> On Wednesday, July 20, 2016, Tatyana Bitencourt 
>> wrote:
>>
>>> Hello,
>>>
>>> I'm trying to connect to database from H2 console and I get the
>>> following error:
>>>
>>> General error: "java.lang.IllegalStateException: Reading from
>>> cache:nio:C:/db/database.mv.db failed; file length 98693120 read length 512
>>> at 98707108 [1.4.186/1]" [5-186] HY000/5
>>>
>>> So I think the database could be corrupted. When I try to use the
>>> recover tool, I get the same message error.
>>>
>>>
>>> Can anyone please help me? Thank you.
>>>
>>>
>>>
>>>
>>>
>>> --
>>> 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 h2-database+unsubscr...@googlegroups.com.
>>> To post to this group, send email to h2-database@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/h2-database.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Shall I add H2 to Travis CI?

2016-08-12 Thread Thomas Mueller Graf
Hi,

I agree, it would be great!

Regards,
Thomas

On Thu, Aug 11, 2016 at 12:40 PM, Sergi Vladykin 
wrote:

> Very good idea! I wanted to do exactly that, but never got time. It will
> be a great contribution!
>
> Sergi
>
> 2016-08-11 13:18 GMT+03:00 Steve McLeod :
>
>> Travis CI is web-based continuous integration that works well with GitHub
>> and is free for open source.
>>
>> I propose adding H2 to Travis. This will make it clear almost immediately
>> after a commit to master that the build is broken. I think it can also do
>> the same to pull requests, before they get accepted.
>>
>> I volunteer to do the necessary work.
>>
>> A good idea? Or an unnecessary extra burden?
>>
>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com.
>> To post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Support for large lists in memory

2016-08-17 Thread Thomas Mueller Graf
Hi,

I suggest to use StackOverflow.com for such questions.

Regards,
Thomas


On Mon, Aug 15, 2016 at 8:25 PM, anaderi  wrote:

> I am currently building out custom forum software for my project, and I
> would like for a Forum to contain a List, and a Thread to contain a
> List. However, doing so would require loading ALL the posts and
> threads into memory, which can be quite expensive.
>
> Is there a way to 'stream' the objects into memory, loading them as they
> are required? I already have lazy loading in place, however it loads the
> entire List once only one object has been requested. I need a lazy load
> that only loads a portion of the required List into memory.
>
> Any tips for doing this? Thank you for reading.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] why it is? This map is closed [1.4.188/4] / Last block not stored, possibly due to out-of-memory

2016-08-17 Thread Thomas Mueller Graf
Hi,

As the error message says, possibly there was an out-of-memory problem
before this.

Regards,
Thomas



On Fri, Aug 12, 2016 at 11:17 AM, test love  wrote:

> h2-1.4.188.jar
>
> java.lang.IllegalStateException: This map is closed [1.4.188/4]
> at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
> at org.h2.mvstore.MVMap.beforeWrite(MVMap.java:1039)
> at org.h2.mvstore.MVMap.put(MVMap.java:117)
> ...
> Caused by: java.lang.IllegalStateException: Last block not stored,
> possibly due to out-of-memory [1.4.188/3]
> at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
> at org.h2.mvstore.MVStore.storeNowTry(MVStore.java:1084)
> at org.h2.mvstore.MVStore.storeNow(MVStore.java:1046)
> at org.h2.mvstore.MVStore.commitAndSave(MVStore.java:1035)
> at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2476)
> at org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:2689)
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: The date of next 1.4 release

2016-10-21 Thread Thomas Mueller Graf
Hi,

Yes, I would like to make a new official release as well. I can wait a week.

Regards,
Thomas


On Fri, Oct 21, 2016 at 4:29 PM, Sergi Vladykin 
wrote:

> Guys,
>
> I'm going to merge few more improvements this week and after that I will
> be asking Thomas Mueller to make an official release. If nothing will go
> wrong I expect to have it in a week or two.
>
> Sergi
>
> 2016-10-21 12:00 GMT+03:00 Steve McLeod :
>
>> While waiting for a release, it is surprisingly straightforward to make
>> your own build, assuming you are familiar Git, GitHub, and running shell
>> scripts.
>>
>> 1. Clone locally the H2 GitHub repo
>> 2. In the local clone of the repo, do the following (assuming bash on
>> Linux or macOS, on Windows, it is similar but I don't know the exact
>> syntax):
>> cd h2
>> ./build.sh download
>> ./build.sh jar
>>
>> You'll now have an up-to-date H2 jar file in the ~/bin folder with all
>> the latest commits.
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thursday, 20 October 2016 05:34:30 UTC+2, vraim...@gmail.com wrote:
>>>
>>> Branch 'master' has important bug fixes and improvements but they are
>>> not released. What is the date of next 1.4 release?
>>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com.
>> To post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Errors in the DBMS comparison

2016-10-22 Thread Thomas Mueller Graf
Hi,

Thanks, and sorry for the delay! This is now fixed in the documentation (in
trunk; the website will be updated next week).

By the way, if you would like us to update the documentation, feel free to
send a pull request.

Regards,
Thomas

On Tue, Aug 30, 2016 at 11:56 PM, Thomas Kellerer <
google-gro...@sql-workbench.net> wrote:

> I think there are some errors in the DBMS comparison at:
> http://www.h2database.com/html/features.html#comparison
>
> Postgres has "Linked tables" through Foreign Data Wrappers:
> https://wiki.postgresql.org/wiki/FDW  (which is available since V9.0
> which that comparison is based upon)
>
> Neither Postgres nor MySQL do "Multi-Threaded Statement Processing" if
> that refers to a *single *statement being executed by multiple threads on
> the server (that will however change with Postgres 9.6). If that refers to
> "multiple statements from different connections are executed at the same
> time" then this is of course true for both.
>
> MySQL 5.7 introduced computed columns but Postgres still doesn't have them
>
> MySQL neither has domains nor custom aggregate functions.
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: The date of next 1.4 release

2016-10-30 Thread Thomas Mueller Graf
Hi,

Sounds good to me, I will try to do the release today or tomorrow (not sure
what time exactly).

Regards,
Thomas

On Sun, Oct 30, 2016 at 12:50 PM, Sergi Vladykin 
wrote:

> Hi,
>
> I think we can try to make a release now.
>
> We have 2 PR's which look abandoned, also I wanted to fix the issue #375
> but the fix becomes a bit complicated and risky, it is better to postpone
> it.
>
> Sergi
>
>
>
> 2016-10-21 17:42 GMT+03:00 Thomas Mueller Graf <
> thomas.tom.muel...@gmail.com>:
>
>> Hi,
>>
>> Yes, I would like to make a new official release as well. I can wait a
>> week.
>>
>> Regards,
>> Thomas
>>
>>
>> On Fri, Oct 21, 2016 at 4:29 PM, Sergi Vladykin > > wrote:
>>
>>> Guys,
>>>
>>> I'm going to merge few more improvements this week and after that I will
>>> be asking Thomas Mueller to make an official release. If nothing will go
>>> wrong I expect to have it in a week or two.
>>>
>>> Sergi
>>>
>>> 2016-10-21 12:00 GMT+03:00 Steve McLeod :
>>>
>>>> While waiting for a release, it is surprisingly straightforward to make
>>>> your own build, assuming you are familiar Git, GitHub, and running shell
>>>> scripts.
>>>>
>>>> 1. Clone locally the H2 GitHub repo
>>>> 2. In the local clone of the repo, do the following (assuming bash on
>>>> Linux or macOS, on Windows, it is similar but I don't know the exact
>>>> syntax):
>>>> cd h2
>>>> ./build.sh download
>>>> ./build.sh jar
>>>>
>>>> You'll now have an up-to-date H2 jar file in the ~/bin folder with all
>>>> the latest commits.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thursday, 20 October 2016 05:34:30 UTC+2, vraim...@gmail.com wrote:
>>>>>
>>>>> Branch 'master' has important bug fixes and improvements but they are
>>>>> not released. What is the date of next 1.4 release?
>>>>>
>>>> --
>>>> 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 h2-database+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to h2-database@googlegroups.com.
>>>> Visit this group at https://groups.google.com/group/h2-database.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> 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 h2-database+unsubscr...@googlegroups.com.
>>> To post to this group, send email to h2-database@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/h2-database.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com.
>> To post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] H2 Database Engine: New version 1.4.193 available

2016-10-31 Thread Thomas Mueller Graf
Hello,

A new version of H2 is available at http://www.h2database.com
(you may have to click 'Refresh').

For details, see the 'Change Log' at
http://www.h2database.com/html/changelog.html

For future plans, see the 'Roadmap' page at
http://www.h2database.com/html/roadmap.html

Please note the jar file may not yet be available in the
Maven central repository (synchronizing usually takes a few hours).

P.S. If you reply to this message please use a different subject.

Have fun,
Thomas

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Serious bug : Urgent solution : Wrong records show when date filter in where query.

2016-11-23 Thread Thomas Mueller Graf
Hi,

Did you run this with the H2 Console tool?

select "date1" from "paymentList" where "date1">='2017-01-01'

date1
8016-08-31 00:00:00.0
9016-09-30 00:00:00.0

So the result seems to be correct. Openoffice trucates the century.

Regards,
Thomas



On Wed, Nov 23, 2016 at 12:20 PM, Mayur Bhatt 
wrote:

> When I Execute following query it's out is below
>
> Query : select * from paymentList where date1>='2017-01-01'
>
> Below screen shoots prove that the result is completely wrong. the all
> records are < '2017-01-01' but query will show the result. I think this is
> very serious bug in h2 database. I am using latest h2 database version. 
> 1.4.193
> (latest)
>
> I attached the database file with this. mail. Please check it and give me
> reply as soon as possible thanks in advance.
>
> Note that the if rewrite the date value then problem solved automatically.
> Please refer that.
>
> User Name : Admin
> Password : qs&softwareabcdef
>
>
>
>
> 
>
> Av
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Wait for getting connection infinitely

2016-11-24 Thread Thomas Mueller Graf
I'm sorry there is not enough data to reproduce or analyze this.
What I would check is that you use the same version of H2 on the client and
on the server.

> UnfortunaIy my system was stoped 3 times recently.

I don't know what "stoped" means.


On Monday, November 21, 2016, yone  wrote:

> Hi.
>
> UnfortunaIy my system was stoped 3 times recently.
> The cause looks all threads waited for getting H2 tcp connection
> infinitely.
>
> I want to know
> 1. Is there any workaround?
> 2. Is it possible to change SocketInputStream to some other compoenent?
> It looks there are some hangup issue in SocketInputStream...
>
> Our system environment are following
>  - windows:7 Pro 64bit
>  - java :1.8.0_45
>  - h2 : 1.3.176
>
>
> - Stack trace
>   at java.net.SocketInputStream.socketRead0(Native Method)   <- wait for
> inifinitely in here
>   at java.net.SocketInputStream.socketRead(Unknown Source)
>   at java.net.SocketInputStream.read(Unknown Source)
>   at java.net.SocketInputStream.read(Unknown Source)
>   at java.io.BufferedInputStream.fill(Unknown Source)
>   at java.io.BufferedInputStream.read(Unknown Source)
>   - locked <3185fb39> (a java.io.BufferedInputStream)
>   at java.io.DataInputStream.readInt(Unknown Source)
>   at org.h2.value.Transfer.readInt(Transfer.java:157)
>   at org.h2.engine.SessionRemote.done(SessionRemote.java:599)
>   at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:129)
>   at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:430)
>   at org.h2.engine.SessionRemote.connectEmbeddedOrServer(
> SessionRemote.java:311)
>   at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:107)
>   at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:91)
>   at org.h2.Driver.connect(Driver.java:74)
>   at org.h2.jdbcx.JdbcD  ataSource.getJdbcConnection(
> JdbcDataSource.java:191)
>   at org.h2.jdbcx.JdbcD  ataSource.getXAConnection(
> JdbcDataSource.java:354)
>   at org.h2.jdbcx.JdbcD  ataSource.getPooledConnection(
> JdbcDataSource.java:386)
>   at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(
> JdbcConnectionPool.java:228)
>   at org.h2.jdbcx.JdbcConnectionPool.getConnection(
> JdbcConnectionPool.java:200)
>
> Best Regards
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] SHUTDOWN COMPACT does not recover space SHUTDOWN DEFRAG take insanely long Opening DB takes 500Mb of space

2016-11-24 Thread Thomas Mueller Graf
Hi,

It could be due to LOG data (BLOB, CLOB) that are not referenced, and not
correctly garbage collected. To analyze that, we would need a reproducible
test case.

To find out, you could use the Recover tool on the large database.

Regards,
Thomas



On Tuesday, November 22, 2016, Petr Holík  wrote:

> Hello,
>
>  1.4.192 db, Page Store  1.7GB -> SHUTDOWN COMPACT -> 1.4GB -> open ->
> 1.9GB -> SHUTDOWN DEFRAG -> takes on cpu thread(3.5Ghz for maybe two three
> minutes) -> SHUTDOWN COMPACT -> 1.4GB
>
> -> export to SQL ~60MB sql -> import -> ~60MB DB file
>
> Why compact does almost not compact and why opening db takes 500Mb of
> space? I have not investigated ho much data process realy writes to db when
> opening it.(on SSD it looks fast but on rotation disk it takes ages to open
> DB)
>
> Sincerely Petr Holik
>
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 Database running really slow on mac OS sierra

2016-11-24 Thread Thomas Mueller Graf
Hi,

Yes, I guess the problem is that somehow it's trying to resolve "localhost".
I'm hoping there is a simple workaround for H2, but I'm not sure.

Regards,
Thomas



On Saturday, November 19, 2016,  wrote:

> Update: I downloaded the tester from thoeni.io and ran the test before
> and after applying the /etc/hosts change.
> The tester did not show any improvement at all: still about 5ms to execute.
>
> However, my real app (a Spring Boot web-app running in Tomcat 8 accessing
> H2 in server mode) now appears to start and stop as quickly as it did
> before I installed MacOS Sierra.
> So I call that a win!
>
> Bob
>
>
> On Saturday, November 19, 2016 at 2:32:14 PM UTC-5, res...@gmail.com
>  wrote:
>>
>> Some further testing in my case shows the issue is related to Java 8,
>> because Java 7 does not show the slowdown.
>> I am still seeing the issue with Java 8u112 (which has several
>> Sierra-related fixes in it).
>> Using h2 version 1.4.193 with url:
>> jdbc:h2:ssl://localhost:8955///Users/bob/path-to-my/db;MVCC=
>> TRUE;MAX_COMPACT_TIME=5000;MV_STORE=FALSE
>>
>> Bob
>>
>>
>> On Tuesday, November 15, 2016 at 5:29:56 PM UTC-5, Tomas Pospichal wrote:
>>>
>>> One possibility for slowdowns when opening a connection: sometimes even
>>> innocent looking net calls from Java produce reverse DNS attempts, which
>>> could cause visible slowdowns on a local network. In this situation, using
>>> an IP address might be paradoxically slower than using a host name.
>>>
>>> This behavior might be very system dependent, so it is better to state
>>> what version of system and Java you have, and what URL string you used (was
>>> it SSL?).
>>>
>>> For illustration, see
>>> http://stackoverflow.com/questions/3193936/how-to-disable-
>>> javas-ssl-reverse-dns-lookup?rq=1
>>> or
>>> https://github.com/spray/spray/issues/993
>>>
>>> Regards,
>>> Tomas
>>>
>>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Confused with the usage difference of org.h2.mvstore.type.XXXType and org.h2.value.DataType

2016-11-24 Thread Thomas Mueller Graf
Hi,

The MVStore is a key-value storage engine that knows nothing about SQL, and
can be used without the relational database engine. So the MVStore data
type is used for that.

The org.h2.value.DataType is the data type used for SQL (relational
database) stuff.

Regards,
Thomas


On Wednesday, November 23, 2016, Ziming Zhao  wrote:

> Hello,
>
> we are now doing some research on h2-1.4.192. However, during code
> reading, I'm confused about the difference between
> org.h2.mvstore.type.DataType and org.h2.value.DataType.
>
> Is there anyone who is familiar with why there are two classes
> representing Type of data in h2? What's the main difference between these
> two kind of classes?
>
> Thanks a lot!
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Wait for getting connection infinitely

2016-11-24 Thread Thomas Mueller Graf
I'm sorry there is not enough data to reproduce or analyze this.
What I would check is that you use the same version of H2 on the client and
on the server.

> UnfortunaIy my system was stoped 3 times recently.

I don't know what "stoped" means.


On Monday, November 21, 2016, yone  wrote:

> Hi.
>
> UnfortunaIy my system was stoped 3 times recently.
> The cause looks all threads waited for getting H2 tcp connection
> infinitely.
>
> I want to know
> 1. Is there any workaround?
> 2. Is it possible to change SocketInputStream to some other compoenent?
> It looks there are some hangup issue in SocketInputStream...
>
> Our system environment are following
>  - windows:7 Pro 64bit
>  - java :1.8.0_45
>  - h2 : 1.3.176
>
>
> - Stack trace
>   at java.net.SocketInputStream.socketRead0(Native Method)   <- wait for
> inifinitely in here
>   at java.net.SocketInputStream.socketRead(Unknown Source)
>   at java.net.SocketInputStream.read(Unknown Source)
>   at java.net.SocketInputStream.read(Unknown Source)
>   at java.io.BufferedInputStream.fill(Unknown Source)
>   at java.io.BufferedInputStream.read(Unknown Source)
>   - locked <3185fb39> (a java.io.BufferedInputStream)
>   at java.io.DataInputStream.readInt(Unknown Source)
>   at org.h2.value.Transfer.readInt(Transfer.java:157)
>   at org.h2.engine.SessionRemote.done(SessionRemote.java:599)
>   at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:129)
>   at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:430)
>   at org.h2.engine.SessionRemote.connectEmbeddedOrServer(
> SessionRemote.java:311)
>   at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:107)
>   at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:91)
>   at org.h2.Driver.connect(Driver.java:74)
>   at org.h2.jdbcx.JdbcD  ataSource.getJdbcConnection(
> JdbcDataSource.java:191)
>   at org.h2.jdbcx.JdbcD  ataSource.getXAConnection(
> JdbcDataSource.java:354)
>   at org.h2.jdbcx.JdbcD  ataSource.getPooledConnection(
> JdbcDataSource.java:386)
>   at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(
> JdbcConnectionPool.java:228)
>   at org.h2.jdbcx.JdbcConnectionPool.getConnection(
> JdbcConnectionPool.java:200)
>
> Best Regards
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 Database running really slow on mac OS sierra

2016-11-24 Thread Thomas Mueller Graf
Hi,

Yes, I guess the problem is that somehow it's trying to resolve "localhost".
I'm hoping there is a simple workaround for H2, but I'm not sure.

Regards,
Thomas



On Saturday, November 19, 2016,  wrote:

> Update: I downloaded the tester from thoeni.io and ran the test before
> and after applying the /etc/hosts change.
> The tester did not show any improvement at all: still about 5ms to execute.
>
> However, my real app (a Spring Boot web-app running in Tomcat 8 accessing
> H2 in server mode) now appears to start and stop as quickly as it did
> before I installed MacOS Sierra.
> So I call that a win!
>
> Bob
>
>
> On Saturday, November 19, 2016 at 2:32:14 PM UTC-5, res...@gmail.com
>  wrote:
>>
>> Some further testing in my case shows the issue is related to Java 8,
>> because Java 7 does not show the slowdown.
>> I am still seeing the issue with Java 8u112 (which has several
>> Sierra-related fixes in it).
>> Using h2 version 1.4.193 with url:
>> jdbc:h2:ssl://localhost:8955///Users/bob/path-to-my/db;MVCC=
>> TRUE;MAX_COMPACT_TIME=5000;MV_STORE=FALSE
>>
>> Bob
>>
>>
>> On Tuesday, November 15, 2016 at 5:29:56 PM UTC-5, Tomas Pospichal wrote:
>>>
>>> One possibility for slowdowns when opening a connection: sometimes even
>>> innocent looking net calls from Java produce reverse DNS attempts, which
>>> could cause visible slowdowns on a local network. In this situation, using
>>> an IP address might be paradoxically slower than using a host name.
>>>
>>> This behavior might be very system dependent, so it is better to state
>>> what version of system and Java you have, and what URL string you used (was
>>> it SSL?).
>>>
>>> For illustration, see
>>> http://stackoverflow.com/questions/3193936/how-to-disable-
>>> javas-ssl-reverse-dns-lookup?rq=1
>>> or
>>> https://github.com/spray/spray/issues/993
>>>
>>> Regards,
>>> Tomas
>>>
>>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] SHUTDOWN COMPACT does not recover space SHUTDOWN DEFRAG take insanely long Opening DB takes 500Mb of space

2016-11-24 Thread Thomas Mueller Graf
Hi,

It could be due to LOG data (BLOB, CLOB) that are not referenced, and not
correctly garbage collected. To analyze that, we would need a reproducible
test case.

To find out, you could use the Recover tool on the large database.

Regards,
Thomas



On Tuesday, November 22, 2016, Petr Holík  wrote:

> Hello,
>
>  1.4.192 db, Page Store  1.7GB -> SHUTDOWN COMPACT -> 1.4GB -> open ->
> 1.9GB -> SHUTDOWN DEFRAG -> takes on cpu thread(3.5Ghz for maybe two three
> minutes) -> SHUTDOWN COMPACT -> 1.4GB
>
> -> export to SQL ~60MB sql -> import -> ~60MB DB file
>
> Why compact does almost not compact and why opening db takes 500Mb of
> space? I have not investigated ho much data process realy writes to db when
> opening it.(on SSD it looks fast but on rotation disk it takes ages to open
> DB)
>
> Sincerely Petr Holik
>
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Confused with the usage difference of org.h2.mvstore.type.XXXType and org.h2.value.DataType

2016-11-24 Thread Thomas Mueller Graf
Hi,

The MVStore is a key-value storage engine that knows nothing about SQL, and
can be used without the relational database engine. So the MVStore data
type is used for that.

The org.h2.value.DataType is the data type used for SQL (relational
database) stuff.

Regards,
Thomas


On Wednesday, November 23, 2016, Ziming Zhao  wrote:

> Hello,
>
> we are now doing some research on h2-1.4.192. However, during code
> reading, I'm confused about the difference between
> org.h2.mvstore.type.DataType and org.h2.value.DataType.
>
> Is there anyone who is familiar with why there are two classes
> representing Type of data in h2? What's the main difference between these
> two kind of classes?
>
> Thanks a lot!
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Investigating large DBs

2016-11-24 Thread Thomas Mueller Graf
Hi,

This last time there was also an index corruption, so we could not do a
> dump and restore.
>

Hm, you should still be able to use "script to...". Did this not work?

>
> Do you have any suggestions on how to investigate the cause of this? E.g.
> I have seen some threads mentioning the Recover script? If so, what should
> we look for after running this script?
>

The Recover script should generate a very large file, I would investigate
what is in that file, in addition to the "real" data you expect.

My guess it that it's LOB data (CLOB, BLOB).

Regards,
Thomas

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] SELECT * FROM (SELECT ? FROM DUAL) fails

2016-11-28 Thread Thomas Mueller Graf
Hi,

You could use "cast":

SELECT * FROM (SELECT CAST(? AS VARCHAR) FROM DUAL)

On Thursday, November 17, 2016, Boris Granveaud  wrote:

> Hello,
>
> I have a problem with the following statement:
>
> SELECT * FROM (SELECT ? FROM DUAL)
>
> it gives this error with H2 1.4.191:
>
> org.h2.jdbc.JdbcSQLException: Unknown data type: """?1"""; SQL statement:
> SELECT * FROM (SELECT ? FROM DUAL) [50004-192]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
> at org.h2.message.DbException.get(DbException.java:179)
> at org.h2.message.DbException.get(DbException.java:155)
> at org.h2.table.Table.setColumns(Table.java:425)
> at org.h2.table.TableView.initColumnsAndTables(TableView.java:220)
> at org.h2.table.TableView.init(TableView.java:98)
> at org.h2.table.TableView.(TableView.java:65)
> at org.h2.table.TableView.createTempView(TableView.java:535)
> at org.h2.command.Parser.readTableFilter(Parser.java:1168)
>
> Code to reproduce:
>
> PreparedStatement st = cnx.prepareStatement("SELECT * FROM (SELECT ? FROM
> DUAL)");
> st.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
> rs = st.executeQuery();
> rs.next();
> System.out.println(rs.getObject(1));
> rs.close();
> st.close();
>
> "SELECT ? FROM DUAL" works fine.
>
> The problems is that the type of the parameter cannot be known when the
> statement is prepared so I'm not sure how the parser should deal with that.
>
> Boris.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-21 Thread Thomas Mueller Graf
Hi,

I guess that bug would be on my plate... I recently made changes there
(trying to improve concurrency). I'm sorry about that. Having a test case
would be great!

Regards,
Thomas



On Wed, Dec 21, 2016 at 3:56 PM, Noel Grandin  wrote:

> Can we get a full stack trace for that failure.​
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Concurrency at org.h2.store.fs.FileBase.read()

2016-12-22 Thread Thomas Mueller Graf
Hi,

I didn't see a failure either.

Regards,
Thomas


On Thu, Dec 22, 2016 at 10:13 AM, Noel Grandin 
wrote:

>
>
> On 2016/12/21 7:24 PM, Anatolii K wrote:
>
>> Test attached
>>
>>
> Are you definitely testing with the latest HEAD? Because I ran your test
> for 10 minutes without problems.
>
> On 64-bit JDK 1.8.0_111
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: full join alternative for h2

2017-01-01 Thread Thomas Mueller Graf
Hi,

See also
http://stackoverflow.com/questions/406294/left-join-vs-left-outer-join-in-sql-server

Regards,
Thomas

On Tue, Dec 27, 2016 at 11:13 PM, Christian Master  wrote:

> OUTER JOIN doesn not work.
> But LEFT OUTER JOIN does.
> So LEFT OUTER JOIN seems to be like FULL Join, or am i missing something?
> thx
>
>
> Am Montag, 26. Dezember 2016 10:56:50 UTC+1 schrieb Steve McLeod:
>>
>> I guess this is what you want:
>>
>> SELECT ... FROM tableA a OUTER JOIN tableB b on a.date = b.date
>>
>>
>>
>> On Saturday, 24 December 2016 13:11:22 UTC+1, Christian Master wrote:
>>>
>>> Hi,
>>> i have
>>> tableA (date, moneyIn)
>>>
>>> tabelB (date, moneyOut)
>>>
>>> i need
>>> select a.date, a.moneyIn, b.moneyOut
>>> from
>>> tableA a
>>> full join
>>> tableB b
>>> a.date=b.date
>>>
>>> How to do it in H2, i think full join is not supported?
>>> thx
>>> chris
>>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Index hints

2017-01-04 Thread Thomas Mueller Graf
Hi,

The MySQL syntax sounds good to me. As an alternative, the MS SQL Server
syntax, see also https://msdn.microsoft.com/en-us/library/ms190322.aspx and
maybe
http://blog.sqlauthority.com/2009/02/08/sql-server-introduction-to-force-index-query-hints-index-hint-part2/

A related feature is to fail queries if no index is available. This is what
SQLite is doing: https://sqlite.org/lang_indexedby.html . Apache Jackrabbit
Oak has a similar feature: https://issues.apache.org/jira/browse/OAK-4888

I'm not sure which feature is more important.

Regards,
Thomas

On Wednesday, January 4, 2017, Sergi Vladykin 
wrote:

> I'd prefer to just go with MySQL syntax and not reinvent the wheel.
>
> Sergi
>
> 2017-01-04 16:14 GMT+03:00 Noel Grandin  >:
>
>> I'm ok with that. I think MySQL' s index syntax looks ok to me, although
>> I'd prefer an index name instead of a key list.
>> On Wed, 04 Jan 2017 at 14:13, Steve McLeod > > wrote:
>>
>>> I'm considering attempting to add index hints to H2.
>>>
>>> Questions:
>>> * Is this a good idea? Or is it  better to work on making the query
>>> optimizer smarter at choosing the correct index?
>>> * Is Oracle's syntax preferable? Or MySQL's syntax? Or is there a better
>>> syntax altogether?
>>>
>>> Oracle:
>>> SELECT /*+ INDEX (employees emp_department_ix)*/
>>>employee_id, department_id
>>>   FROM employees
>>>   WHERE department_id > 50;
>>>
>>> MySQL:
>>> SELECT * FROM table1 USE INDEX (col1_index,col2_index)
>>>   WHERE col1=1 AND col2=2 AND col3=3;
>>>
>>>
>>> --
>>> 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 h2-database+unsubscr...@googlegroups.com
>>> 
>>> .
>>> To post to this group, send email to h2-database@googlegroups.com
>>> .
>>> Visit this group at https://groups.google.com/group/h2-database.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com
>> 
>> .
>> To post to this group, send email to h2-database@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Performance drawback of automatic analyze?

2017-01-04 Thread Thomas Mueller Graf
Hi,

Your analysis is not correct. 2000 is the initial wait time (in number of
changes), since starting the database. As documented, "The time between
running ANALYZE doubles each time since starting the database". So it's
2000, 4000, 8000, 16000,...

Regards,
Thomas


On Wed, Jan 4, 2017 at 7:42 PM, Noel Grandin  wrote:

> thats a good point, please log an issue for that
>
> On 4 January 2017 at 19:15, Uli  wrote:
>
>> Today I made a stacktrace while a very long operation was running in my
>> H2 db. The operation is a big delete (several million rows).
>>
>> I wondered about the following parts of the stacktrace (H2 1.4.191):
>> ...
>> at org.h2.table.RegularTable.analyzeIfRequired(RegularTable.java:433)
>>
>> at org.h2.table.RegularTable.removeRow(RegularTable.java:409)
>> at org.h2.command.dml.Delete.update(Delete.java:94)
>> at org.h2.command.CommandContainer.update(CommandContainer.java:98)
>> at org.h2.command.Command.executeUpdate(Command.java:258)
>> ...
>>
>> As far as I understand: On a delete statement H2 performs an analyze of
>> the table each time after N rows have been removed.
>> So when deleting 1 million rows and the analyze threshold (ANALYZE_AUTO)
>> is 2000, H2 will run 1 mio / 2000 = 500 analyze runs while executing the
>> delete statement.
>>
>> Is that correct? Wouldn't it be better to run analyze only once after the
>> full statement has been executed?
>>
>> Uli
>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com.
>> To post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: Index hints

2017-01-05 Thread Thomas Mueller Graf
Hi,

> With this enhancement I'm trying to solve one of my own performance
issues.

Sure, it sounds good to me. The "fail query" is a different feature, the
links were just FYI.

> It is possible that no index in the list is chosen, in which case a full
table scan will be used.

It looks like this is what MySQL is doing, so that's fine.

Regards,
Thomas


On Thu, Jan 5, 2017 at 9:48 AM, Steve McLeod  wrote:

> MySQL syntax seems to be the popular option. I'll use that.
>
> Proposed Solution
> ==
>
> I'll add this to the H2 SQL syntax:
>
> SELECT [TOP term] [DISTINCT | ALL] selectExpression FROM tableExpression
> [USE INDEX (indexList)] ...
>
> where indexList is defined as :
> indexName [, indexName]*
>
> Each index in the list must exist, otherwise an INDEX_NOT_FOUND_1 (error
> code 42112) exception is thrown.
>
> Only indexes in the list will be used when choosing an index to use on the
> given tableExpression. There is no significance to order in this list.
>
> It is possible that no index in the list is chosen, in which case a full
> table scan will be used.
>
> To test this, I'll add test cases that check that the result of EXPLAIN
> ANALYZE indicates that a specified index is used (or is not used).
>
> > A related feature is to fail queries if no index is available.
>
> This sounds like a great idea, but I won't do this as part of this change.
> With this enhancement I'm trying to solve one of my own performance issues.
>
> Any feedback on this proposed solution?
>
>
>
> On Wednesday, 4 January 2017 13:13:15 UTC+1, Steve McLeod wrote:
>>
>> I'm considering attempting to add index hints to H2.
>>
>> Questions:
>> * Is this a good idea? Or is it  better to work on making the query
>> optimizer smarter at choosing the correct index?
>> * Is Oracle's syntax preferable? Or MySQL's syntax? Or is there a better
>> syntax altogether?
>>
>> Oracle:
>> SELECT /*+ INDEX (employees emp_department_ix)*/
>>employee_id, department_id
>>   FROM employees
>>   WHERE department_id > 50;
>>
>> MySQL:
>> SELECT * FROM table1 USE INDEX (col1_index,col2_index)
>>   WHERE col1=1 AND col2=2 AND col3=3;
>>
>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] MySQL mode

2017-01-06 Thread Thomas Mueller Graf
Hi,

Actually, it is in the src/tools directory of H2. It was an attempt to
modularize the code. It was probably not a good idea. It is not included in
the H2 jar file, so you would need to manually add it to the classpath or
possibly your code.

Regards,
Thomas

On Fri, Jan 6, 2017 at 7:18 AM, Noel Grandin  wrote:

> Sorry, but org.h2.mode.FunctionsMySQL is not part of the H2 source code,
> you must have been looking at something else.
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Question about the wording of the tutorial info on timestamp values with time zone

2017-02-09 Thread Thomas Mueller Graf
Hi,

I think the current documentation is correct, and I don't see how it could
be written to be more clear.

> It appears that timestamp values _without_ a time zone are parsed
> _without_ using the current time zone setting of the system.

If that would be true, which timezone would be used then, if the timezone
is not specified?

Regards,
Thomas


On Tue, Feb 7, 2017 at 3:14 AM, Richard Walker <
richard.walker.a...@gmail.com> wrote:

> I thought I understood the behaviour of timestamp values, but now I've
> just been reading the tutorial:
> http://www.h2database.com/html/tutorial.html#date_time
> and I got confused. It says:
>
> "Date, time and timestamp values support ISO 8601 formatting, including
> time zone:
>
> CALL TIMESTAMP '2008-01-01 12:00:00+01:00';
>
> If the time zone is not set, the value is parsed using the current time
> zone setting of the system '"
>
> I took "if the time zone is not set" to mean "if a time zone is not
> included with the timestamp value".
>
> But then, given the actual behaviour, I can only make sense of this if I
> change it to the _opposite_, i.e. to read something like:
> "If a time zone is included with the timestamp value, the value is parsed
> using the current time zone setting of the system".
>
> It appears that timestamp values _without_ a time zone are parsed
> _without_ using the current time zone setting of the system.
>
> (The actual behaviour seems to be all fine; it's the wording of this
> tutorial text that
> I don't get ... at least, I think it's that way around!)
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] MVStore transaction concurrency

2017-02-09 Thread Thomas Mueller Graf
Hi,

Using multiple threads against the same transaction is not supported or
tested, I'm sorry.

Regards,
Thomas

On Wed, Feb 8, 2017 at 3:55 PM, Roland Lohner  wrote:

> Dear MVStore developers,
>
> I have a question regarding concurrent access of a TransactionMap in one
> transaction.
>
> I create a Transaction and a TransactionMap.
>
> transaction = transactionStore.begin();
> map = transaction.openMap(name);
>
> When multiple threads access this map and do a put operation concurrently
> the following exception occurs:
>
> java.lang.IllegalStateException: An old transaction with the same id is
> still open: 1 [1.4.193/102]
> at org.h2.mvstore.DataUtils.newIllegalStateException(
> DataUtils.java:765)
> at org.h2.mvstore.db.TransactionStore.log(TransactionStore.java:275)
> at org.h2.mvstore.db.TransactionStore$Transaction.
> log(TransactionStore.java:706)
> at org.h2.mvstore.db.TransactionStore$TransactionMap.trySet(
> TransactionStore.java:1104)
> at org.h2.mvstore.db.TransactionStore$TransactionMap.set(
> TransactionStore.java:1027)
> at org.h2.mvstore.db.TransactionStore$TransactionMap.put(
> TransactionStore.java:1005)
>
> Synchronizing org.h2.mvstore.db.TransactionStore.TransactionMap.put(K, V)
> using the TransactionMap itself solves the problem.
>   synchronized(map) {
>   map.put(key, value);
>   }
>
>
> My question is whether this behavior is intentional as MVStore supports
> only 'one transaction - one thread model'?
> Or did I find a bug around 
> org.h2.mvstore.db.TransactionStore.Transaction.log(int,
> Object, Object)?
> (As concurrent threads can log in same transaction with same logId=0)
>
> Thanks in advance,
> Roland
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Database updates

2017-02-12 Thread Thomas Mueller Graf
Hi,

One option might be to have a background thread updating the database once
every few seconds or so, if the dirty flag is set.

Regards,
Thomas

On Sat, Feb 4, 2017 at 12:48 PM, vicenrico  wrote:

> Hello. I don't know how h2 database works internally, so I would like to
> ask a question:
>
> In my code I have this:
>
> ud3Text.addModifyListener(new ModifyListener() {
> @Override
> public void modifyText(ModifyEvent arg0) {
> if (!ud3Text.isFocusControl())
> return;
> model.setUserDataValue3(ud3Text.getText().trim());
> model.update();
> }
> });
>
> With this code, every time the user press a key into the userdata field (a
> text field), is database updated?. I mean, it would be better, instead
> doing update every keypress, use a model.setdirty(true) flag and doing
> update before the program closes?
> I say that because I think that with the update as above, the program is
> writing to disk every keypress and that's not good. But I suppose perhaps
> h2 database is optimized not to write all the time but only from time to
> time.
> Can anyone explain to me that? Thanks!
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Recovery tool does not handle LOBs correctly (explanation and fix is proposed)

2017-02-12 Thread Thomas Mueller Graf
Hi,

I agree, but releasing H2 will take a few weeks I'm afraid.

Regards,
Thomas

On Thu, Feb 2, 2017 at 12:25 PM, LRichard  wrote:

> Hi,
>
> It would be great if version 1.4.194 could be released in order to
> integrate the patch.
> (We have corrupted customer databases and cannot use the latest official
> h2 jar to recover these databases)
>
> Thanks
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: Strange long INSER : One INSERT out of 18889 is very long

2017-02-12 Thread Thomas Mueller Graf
Hi,

collectReferencedChunks used to be a problem in the past, but recent
version of H2 should be better. Which version do you use? If the latest
version, could you create a simple test case?

Regards,
Thomas


On Fri, Jan 27, 2017 at 12:48 PM, Noel Grandin 
wrote:

> yeah, that would be the MVStore compacting process.
>
> Not much that you can do about that, short of running in MULTITHREADED
> mode, which is still a little experimental, even I won't deploy that in
> production yet.
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: Errors in the DBMS comparison

2017-02-12 Thread Thomas Mueller Graf
Hi,

Sorry, it's an old mail...

The footprint is the size of the database engine itself, not just the
driver.

Regards,
Thomas


On Sun, Oct 23, 2016 at 1:13 PM, Philippe Marschall <
philippe.marsch...@gmail.com> wrote:

>
>
> On Tuesday, August 30, 2016 at 11:56:31 PM UTC+2, Thomas Kellerer wrote:
>>
>> I think there are some errors in the DBMS comparison at:
>> http://www.h2database.com/html/features.html#comparison
>>
>> Postgres has "Linked tables" through Foreign Data Wrappers:
>> https://wiki.postgresql.org/wiki/FDW  (which is available since V9.0
>> which that comparison is based upon)
>>
>> Neither Postgres nor MySQL do "Multi-Threaded Statement Processing" if
>> that refers to a *single *statement being executed by multiple threads
>> on the server (that will however change with Postgres 9.6). If that refers
>> to "multiple statements from different connections are executed at the same
>> time" then this is of course true for both.
>>
>> MySQL 5.7 introduced computed columns but Postgres still doesn't have
>> them
>>
>> MySQL neither has domains nor custom aggregate functions.
>>
>
> While we're at it, the MySQL JDBC driver is 1.8 MB [1] and the PostgreS
> JDBC driver is 660 KB [2]
>
>  [1] http://search.maven.org/#artifactdetails%7Cmysql%7Cmysql-
> connector-java%7C6.0.5%7Cjar
>  [2] http://search.maven.org/#artifactdetails%7Corg.postgres
> ql%7Cpgjdbc-aggregate%7C9.4.1211%7Cpom
>
> Cheers
> Philippe
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 - Buy Support / Buy Formal Training

2017-02-14 Thread Thomas Mueller Graf
Hi,

> In this case the multiple indexes should help to get reasonable response
time for complex queries

It depends on the data and the queries. In some cases, a multi-column index
is needed.

> Do you have any idea how to do it?

It depends on the data and the queries.

This is not just for the H2 database, it is true for most relational
databases.

Regards,
Thomas



On Tue, Feb 14, 2017 at 5:40 PM, Elad Wertzberger 
wrote:

> thanks for your response...
>
> We try to understand how to use multiple indexes because we don't want to
> run a full scan...
> We plan to use the H2 as Embedded , while the jvm heap with 32GB memory.
> We'll have many entries
> In this case the multiple indexes should help to get reasonable response
> time for complex queries
>
> Do you have any idea how to do it?
> Does the SQL supports hints for which views to use?
> how other users handling this kind of cases?
> Is there other mechanism I'm missing?
>
> I'll really appreciate your help.
>
> thx
>
> Elad W
>
> On Wednesday, February 8, 2017 at 10:13:19 AM UTC+2, Noel Grandin wrote:
>>
>> Nobody I know of is supplying that service at the moment. But our
>> documentation is reasonable and our source code fairly well structured :-)
>>
>> On 8 February 2017 at 09:26, Elad Wertzberger 
>> wrote:
>>
>>> Hi,
>>>
>>> Can A company buy  a support bundle ? or formal training?
>>>
>>> Best Regards
>>>
>>> Elad W
>>>
>>>
>>> This message may contain confidential and/or privileged information.
>>> If you are not the addressee or authorized to receive this on behalf of
>>> the addressee you must not use, copy, disclose or take action based on this
>>> message or any information herein.
>>> If you have received this message in error, please advise the sender
>>> immediately by reply email and delete this message. Thank you.
>>>
>>> --
>>> 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 h2-database...@googlegroups.com.
>>> To post to this group, send email to h2-da...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/h2-database.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] connecting to h2 from non-java languages

2017-02-22 Thread Thomas Mueller Graf
Hi,

[1] I'm afraid the web-console doesn't use JSON or any other "standard"
format (it would be nice thought).

[2] This I can't say.

Regards,
Thomas



On Thu, Feb 23, 2017 at 3:47 AM, Adam McMahon  wrote:

> Hi Group,
>
> i am considering a project that may require me to connect to an H2
> database froma non-JVM language (in this case php). I know the postgres
> driver might work and querus is an option, but I would like to consider a
> more general option: an http connector.
>
> It should be pretty easy to create a HTTP-JDBC bridge (perhaps an
> afternoon of work) that accepts a a post request (with a json payload
> describing the query) and return a json array of the results.  A simple
> servlet would do the trick that acts as a type of proxy to an underlying
> JDBC connection.
>
> My question is:
>
> [1] Perhaps this is already done in the web-console?  Is there
> documentation for how the server of the web-console could be used as a more
> general API over HTTP for H2?
>
> [2] Do you think anyone else would have use for this outside of my private
> projects?  I could fairly easily create a standalone sever (perhaps using
> embedded jetty) that would allow someone to  extend an H2 database over
> http. A few security things would need to be worked out, but it seems
> straight-forward.  This may be nice as it would open H2 to a variety of non
> JDBC languages (node.js, perl, php), using simple REST-like http
> requests...thoughts?
>
> -Adam
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Table function not case insensitive

2017-02-23 Thread Thomas Mueller Graf
Hi,

> DATABASE_TO_UPPER=FALSE

This is for identifiers, not for values.

You will have to check that the jobstatus column is case insensitive.

Regards,
Thomas

On Tue, Feb 21, 2017 at 8:34 PM, Chris Sunderland 
wrote:

> I'm having an issue when using the TABLE function that comparison is case
> sensitive.
>
> http://www.h2database.com/html/functions.html#table
>
> Here is the query I'm using:
> SET @jobstatus = ?;
> SELECT * FROM mytable WHERE jobstatus IN (SELECT jobstatus FROM
> table(jobstatus VARCHAR_IGNORECASE = @jobstatus);
>
> In code, I'm setting the @jobstatus variable with a String array.
>
> The result is only values inside the jobstatus column that exactly match
> the case of the values I put inside the String array @jobstatus.
>
> Using the LOWER or UPPER function as
> SELECT * FROM mytable WHERE jobstatus IN (SELECT LOWER(jobstatus) FROM
> table(LOWER(jobstatus) VARCHAR_IGNORECASE = @jobstatus);
> does resolve the issue but in my situation would require the user to enter
> this function in our UI so it's really practical.
>
> Is there some setting or connection parameter that will allow this to be
> case insensitive?  I'm currently have to use DATABASE_TO_UPPER=FALSE in my
> connection string.
>
> Thanks,
> Chris
>
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2

2017-02-23 Thread Thomas Mueller Graf
Hi,

I'm sorry to say this, but it's unlikely that someone will read such a long
mail. I suggest to try to answer the question instead.

Regards,
Thomas

On Monday, January 23, 2017, Cory Nichols  wrote:

> Thank you for the advice. I also found the limitations section i did not
> see earlier. Ok i have come in to 6 6u dell server machines. I will use one
> to create a system that will relegate commands to the others. 1 master unit
> coordinating 5 slaves. And i have at least 20T storage space combined by
> various raided drives. Each server will have only enough space to carry its
> workload. The rest of my drives will be raided in a system that will be
> used as network storage for all systems. This system will use MASSIVE
> databases of permutations to build an encryption system that will truly
> have every possible out come possible of every cipher i know. Now This is
> really an experiment in learning servers but also using the means i have to
> properly accomplish what i want to accomplish. For instance a 16 byte
> rail/column cipher only creates 2 of the possible 20922789888000 by
> supplanting rail column infrastructure i can make from any 16 chars
> 20922789888000 different ciphertexts. And that is only 1 cipher i end the
> end will use more than 20. Each being build upon by permutes to maximize
> their functionality. What i wanted to know is this a feasible solution to
> my need. Now that said the end project will not need to contain the full
> databases. I will sell one encryption solution and by basing the outcome of
> the ciphers on db's of permutations that i can change the index of the
> record i can sell the same software multiple times and no sold compiled
> unit will create the same cipher text with the same given key. In the end i
> need to only include in the compiled app a VERY small subset of the total
> EVERY possible but first i need it all. then as i sell units i can pick say
> 10-100k records to put as an EMBEDED db that will allow that unit to make
> enough keys that the company could never possible run out all i have to to
> is document what i have used b4 and never use exactly what i did use
> before. then i can sell this over and over with 1 set of code able to be
> implemented over and over. So my real question this is evidently not
> realistic for my main need and i will look further. But from what i have
> read this solution has worked for a project that held 2 billion records
> embedded and that is about exactly what i want to give a sold unit. So is
> this a good solution for an embedded db containing 2b records. i questioned
> the top of my needs first to get feed back of my large problem, now i ask
> about my small problem.  Ty for the response and insight and further
> advice.
> On Monday, January 23, 2017 at 2:51:25 PM UTC-6, Christian MICHON wrote:
>>
>> Let's say best case you would have enough disk space and you could
>> achieve 10k inserts per second continuously in embedded mode.
>>
>> Then please calculate how many years would be needed to initiate your
>> database...
>>
>> Christian
>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 1.4.190 NPE after forced kill or poweroff

2017-02-23 Thread Thomas Mueller Graf
Hi,

Did you try with the latest version?

Regards,
Thomas


On Tuesday, February 21, 2017, Дмитрий Моряков  wrote:

> Hi.
> Faced to the common problem of NullPointerException on opening database
> after a forced stop.
>
> Configuration:
> 1)Win 7 x64
> 2) Java 7
> 3) EclipseLink 2.6
> 4) H2 1.4.190 via Maven
> 5) Program that writes and reads fro/from db about 1 times per minute
>
> Steps to reproduce:
> 1) try to kill all javaw processes OR try to reboot or poweroff the machine
> 2) try to run programm normally
>
> In the very beginning the program on the common SELECT fails with
>
> 2017-02-21 10:01:51,262 ERROR - general error
> javax.persistence.PersistenceException: Exception [EclipseLink-4002] (
> Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.
> persistence.exceptions.DatabaseException
> Internal Exception: org.h2.jdbc.JdbcSQLException: ?? ??:
> "java.lang.NullPointerException"
> General error: "java.lang.NullPointerException"; SQL statement:
> SELECT DISTINCT t1.ID, t1.PROBEDATETIME, t1.STATUS, t1.TYPE, t1.
> CONTROLPOINT_ID, t1.USER_ID, t0.ID, t0.ACTIVE, t0.ALARM, t0.CALL, t0.
> CURRENTNORMATIVELOWERBOUND, t0.CURRENTNORMATIVEUPPERBOUND, t0.DECIMALVALUE
> , t0.STATUSVALUE, t0.STRINGVALUE, t0.PROBE_ID, t0.PARAMETER_ID FROM
> PROBE t1 LEFT OUTER JOIN PROBEPARAMETERRESULT t0 ON (t0.PROBE_ID = t1.ID)
>  WHERE ((t1.PROBEDATETIME >= ?) AND (t1.PROBEDATETIME < ?)) ORDER BY 
> t1.PROBEDATETIME
> DESC [5-190]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:345
> )
> at org.h2.message.DbException.get(DbException.java:168)
> at org.h2.message.DbException.convert(DbException.java:295)
> at org.h2.command.Command.executeQuery(Command.java:208)
> at org.h2.server.TcpServerThread.process(TcpServerThread.java:320)
> at org.h2.server.TcpServerThread.run(TcpServerThread.java:159)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> at org.h2.value.Value.compareTo(Value.java:945)
> at org.h2.engine.Database.areEqual(Database.java:333)
> at org.h2.result.ResultTempTable.find(ResultTempTable.java:307)
> at org.h2.result.ResultTempTable.addRow(ResultTempTable.java:151)
> at org.h2.result.ResultTempTable.addRows(ResultTempTable.java:170)
> at org.h2.result.LocalResult.addRow(LocalResult.java:289)
> at org.h2.command.dml.Select.queryFlat(Select.java:543)
> at org.h2.command.dml.Select.queryWithoutCache(Select.java:643)
> at org.h2.command.dml.Query.query(Query.java:322)
> at org.h2.command.dml.Query.query(Query.java:290)
> at org.h2.command.dml.Query.query(Query.java:36)
> at org.h2.command.CommandContainer.query(CommandContainer.java:90)
> at org.h2.command.Command.executeQuery(Command.java:196)
> ... 3 more
>
> Error Code: 5
>
> If we try to open the DB in DBeaver or Squirrel it opens, but fails on the
> same query with the same error.
> So I belive it's not a problem with JPA or Java code,
>
> We tried different configs: TCP, embedded mode, RETENTION_TIME=0,
> WRITE_DELAY=0 - still the same
>
> The issue raises only after forced shutdown or when db process was killed.
> On clean database and clean exit everything works as expected.
>
> The solution to clear 'undoLog', provided here, does not work for us (
>
> Any thoughts will be highly appreciated.
> Thanks in advance.
> --
> Dmitry
>
>
>
>
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Strange long INSER : One INSERT out of 18889 is very long

2017-02-23 Thread Thomas Mueller Graf
Hi,

Well I can't reproduce the problem. I understand creating a unit test might
be complicated.

Could you provide the following info?

* File size
* Run the MVStore tool with "-info " (java -jar
... org.h2.mvstore.MVStoreTool -info <...>) and provide the output
(possibly attached if it's large)

Regards,
Thomas



On Thursday, February 23, 2017, Nicolas Humeau 
wrote:

> Hi,
>
> I'm using version 1.4.193.
>
> What do you mean by create a test case? I'm not sure I understand.
>
> By the way I ran several test on linux rather than windows but on the same
> computer and it went better.
>
> Thx,
> Nicolas
>
> Le dimanche 12 février 2017 14:00:51 UTC+1, Thomas Mueller Graf a écrit :
>>
>> Hi,
>>
>> collectReferencedChunks used to be a problem in the past, but recent
>> version of H2 should be better. Which version do you use? If the latest
>> version, could you create a simple test case?
>>
>> Regards,
>> Thomas
>>
>>
>> On Fri, Jan 27, 2017 at 12:48 PM, Noel Grandin 
>> wrote:
>>
>>> yeah, that would be the MVStore compacting process.
>>>
>>> Not much that you can do about that, short of running in MULTITHREADED
>>> mode, which is still a little experimental, even I won't deploy that in
>>> production yet.
>>>
>>>
>>> --
>>> 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 h2-database...@googlegroups.com.
>>> To post to this group, send email to h2-da...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/h2-database.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: Connection Properties

2017-02-23 Thread Thomas Mueller Graf
Hi,

If you have a patch (with test case) then we can have a look at it.

Regards,
Thomas

On Monday, January 23, 2017, Jon Freedman  wrote:

> A few years later, but more details:
>
> My property is passed into org.h2.Driver#connect inside the info
> Properties object.
> org.h2.engine.ConnectionInfo#readProperties ignores this.
> org.h2.engine.Engine#openSession could be modified to handle these and
> set them as properties
>
> Cheers
>
> Jon
>
> On Friday, 20 July 2012 16:58:35 UTC+1, Thomas Mueller Graf wrote:
>>
>> Hi,
>>
>> I don't know how commons-dbcp works internally. Maybe it ignores it,
>> because H2 doesn't support it, or H2 ignores it? If that's the case I guess
>> there is no way to exact the setting as it never arrieved in H2. But you
>> could set a session variable in the database URL, as follows:
>>
>> jdbc:h2:~/test;init=set @abc='123'
>>
>> and then query the setting using
>>
>> select @abc;
>>
>> Regards,
>> Thomas
>>
>>
>>
>>
>>
>>
>> "BasicDataSource and calling #addConnectionProperty to see appName which
>> SqlServer displays as ProgramName when running sp_who2
>>>
>>>
>>> Ideally I'd like to be able to query that value using SELECT VALUE FROM
>>> INFORMATION_SCHEMA.SETTINGS WHERE NAME = 'appName' rather than using
>>> reflection to access connectionProperties within BasicDataSource
>>>
>>>
>>> On Friday, 13 July 2012 18:32:04 UTC+1, Thomas Mueller wrote:
>>>>
>>>> Hi,
>>>>
>>>> > In this case I'm trying to access a property I've passed through
>>>>
>>>> Sorry I don't understand.
>>>>
>>>> Regards,
>>>> Thomas
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "H2 Database" group.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> g/h2-database/-/Sxa6ZKiIfwYJ.
>>> To post to this group, send email to h2-database@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> h2-database+unsubscr...@googlegroups.com.
>>> For more options, visit this group at http://groups.google.com/group
>>> /h2-database?hl=en.
>>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] cross-transactional specifics of 'merge'

2017-02-23 Thread Thomas Mueller Graf
Hi,

I think you are right, but it also depends on the storage engine and
settings.

Regards,
Thomas


On Tuesday, February 14, 2017,  wrote:

> Hi!
>
> I investigated SQL command "merge" in multi-transactional environment. It
> seems to me that invocation of merge in one READ_COMMITTED transaction
> blocks other transactions that try to execute 'merge' for the same row till
> the first transaction is committed. Is it correct?
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] underscore in table name and czech collation

2017-02-27 Thread Thomas Mueller Graf
Hi,

I can't reproduce it either.

Regards,
Thomas

On Monday, February 27, 2017, Steve McLeod  wrote:

> Hi Ivo,
>
> This problem caught my eye, because I'm fascinated by code problems that
> occur with obscure causes.
>
> However I've been unable to reproduce the problem. I've tried in the H2
> web console and I've tried using Java code.
>
> Can you please post a self-contained source code example that I reproduces
> the problem?
>
> (I'm using macOS, Java 1.8.0_111, and a slighter newer build of H2).
>
> On Sunday, 26 February 2017 18:33:33 UTC+1, Ivo Panáček wrote:
>>
>> Hi,
>>
>> I have a problem. I am using recent H2 (via maven):
>>
>> 
>>
>> com.h2database
>>
>> h2
>>
>> 1.4.193
>>
>> 
>>
>>
>> Following simple command did work as expected:
>>
>> CREATE TABLE "search_tree" (
>>>
>>> "code"  BIGINT NOT NULL
>>>
>>> )
>>>
>>
>> now it creates table and the column is not visible ... tested also from
>> embedded web console.
>>
>> Similar command work normally:
>>
>> CREATE TABLE "searchtree" (
>>>
>>> "code"  BIGINT NOT NULL
>>>
>>> )
>>>
>>
>> There is the only one difference, now I create the database with* Czech
>> collation*,
>> so after creating database, before creating tables I run command:
>>
>> SET COLLATION CZECH STRENGTH SECONDARY
>>>
>>
>> Without it everything works as before.
>>
>> *BUT* following command works normally even *with* Czech collation:
>>
>> CREATE TABLE "key_entries" (
>>>
>>> "code"  BIGINT NOT NULL
>>>
>>> )
>>>
>>
>> *so it depends on the table name !*
>>
>> Nevertheless columns seem to exist:
>>
>> command:
>>
>>> SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'PUBLIC'
>>
>>
>> gives:
>> SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'PUBLIC';
>> TABLE_CATALOG ▼
>> 
>> TABLE_SCHEMA
>> 
>> TABLE_NAME
>> 
>> COLUMN_NAME
>> 
>> ORDINAL_POSITION
>> 
>> COLUMN_DEFAULT
>> 
>> IS_NULLABLE
>> 
>> DATA_TYPE
>> 
>> CHARACTER_MAXIMUM_LENGTH
>> 
>> CHARACTER_OCTET_LENGTH
>> 
>> NUMERIC_PRECISION
>> 
>> NUMERIC_PRECISION_RADIX
>> 
>> NUMERIC_SCALE
>> 
>> CHARACTER_SET_NAME
>> 
>> COLLATION_NAME
>> 
>> TYPE_NAME
>> 
>> NULLABLE
>> 
>> IS_COMPUTED
>> 
>> SELECTIVITY
>> 
>> CHECK_CONSTRAINT
>> 
>> SEQUENCE_NAME
>> 
>> REMARKS
>> 
>> SOURCE_DATA_TYPE
>> 
>> IDC PUBLIC key_entries code 1 *null* NO -5 19 19 19 10 0 Unicode CZECH
>> BIGINT 0 FALSE 50 *null* *null*
>> IDC PUBLIC search_tree code 1 *null* NO -5 19 19 19 10 0 Unicode CZECH
>> BIGINT 0 FALSE 50 *null* *null*
>>
>>
>> Just they are not shown in web console.
>>
>> My real problem is, that my java code cannot read table columns.
>> Following call:
>>
>> ResultSet r = m.getColumns(null, null, table, null);
>>>
>>
>> returns proper result set with normal metadata, but the result set *is
>> empty.*
>> So my code cannot parse schema and create proper sql commands.
>> I guess that the same reason causes that columns are not visible in
>> embedded web console.
>>
>> Java is:
>>
>> java version "1.8.0_121"
>>>
>>> Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
>>>
>>> Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
>>>
>>
>> on recent macOS, tomorrow I'll test it

Re: [h2] H2 1.4.190 NPE after forced kill or poweroff

2017-02-27 Thread Thomas Mueller Graf
Hi,

I don't know what it could be, but possibly it's fixed in a newer version
of H2.

I suggest to re-create the database, using "script to ..." and then
"runscript from ...".

Regards,
Thomas



On Monday, February 27, 2017, Дмитрий Моряков  wrote:

> And just to draw your attention to bold lines of error log:
>
>
>
>
>
>
> *Caused by: java.lang.NullPointerExceptionat
> org.h2.value.Value.compareTo(Value.java:945)at
> org.h2.engine.Database.areEqual(Database.java:333)at
> org.h2.result.ResultTempTable.find(ResultTempTable.java:307)at
> org.h2.result.ResultTempTable.addRow(ResultTempTable.java:151)at
> org.h2.result.ResultTempTable.addRows(ResultTempTable.java:170)*
> at org.h2.result.LocalResult.addRow(LocalResult.java:289)
> at org.h2.command.dml.Select.queryFlat(Select.java:543)
> at org.h2.command.dml.Select.queryWithoutCache(Select.java:643)
> at org.h2.command.dml.Query.query(Query.java:322)
> at org.h2.command.dml.Query.query(Query.java:290)
> at org.h2.command.dml.Query.query(Query.java:36)
> at org.h2.command.CommandContainer.query(CommandContainer.java:90)
> at org.h2.command.Command.executeQuery(Command.java:196)
>
> HTH,
> --
> Dmitry
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: Voting up for SQL Trigger

2017-02-27 Thread Thomas Mueller Graf
Hi,

One problem is that there is no "standard" SQL mini language. As soon as we
support something, people would complain it doesn't support their use case.

Regards,
Thomas

On Thursday, January 19, 2017, Noel Grandin  wrote:

> No, I meant that I'd be happy to accept a patch that implemented such a
> thing, not that I intended to do it myself
> On Thu, 19 Jan 2017 at 16:35, Yan  > wrote:
>
>> Thanks Noel - any target release and ETA for it ?
>>
>>
>> On Wednesday, January 18, 2017 at 11:29:38 PM UTC-5, Noel Grandin wrote:
>>
>>> I'd be happy with a patch that did that
>>>
>> On Tue, 17 Jan 2017 at 22:47, Yan  wrote:
>>>
>> Fair enough Noel.

 What about opening up inline java coding like alias/functions ?
 Currently triggers must refer to an existing compiled class - the
 alternative to provide the java code in the trigger creation statement
 would really be a plus.

 As an alias gets implicitly the connection, a trigger method would in
 addition receive the old and new rows.


 On Monday, January 16, 2017 at 1:56:20 PM UTC-5, Noel Grandin wrote:
>
> we have triggers, we just don't have triggers implemented in some
> embedded SQL mini-language.
>
> http://h2database.com/html/grammar.html#create_trigger
>
> I don't think this is likely to happen any time soon, since I consider
> the current solution adequate, and I don't see the point in creating a
> half-baked trigger language when we can already use a full-featured
> language like Java.
> ​
>
 --
 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 h2-database...@googlegroups.com.
 To post to this group, send email to h2-da...@googlegroups.com.
>>>
>>>
 Visit this group at https://groups.google.com/group/h2-database.
 For more options, visit https://groups.google.com/d/optout.

>>> --
>> 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 h2-database+unsubscr...@googlegroups.com
>> 
>> .
>> To post to this group, send email to h2-database@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 lucene

2017-02-28 Thread Thomas Mueller Graf
Hi,

Patches to upgrade Lucene are welcome.

Regards,
Thomas


On Tuesday, February 28, 2017, Sylvain Pointeau 
wrote:

> Hello,
>
> I tried using the native full text search on my db but from 2 GB, it grew
> up to +12GB, I had to stop the index creation.
> So I tried Lucene and the database grew up to almost 6GB. Advantage of
> Lucene is that we can query with wildcards.
>
> now my question: why are you still using version 3.6.2? they are now up to
> the version 6.
> Is it possible to upgrade somehow?
>
> Best regards,
> Sylvain
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Aggregating multiple H2 databases?

2017-02-28 Thread Thomas Mueller Graf
Hi,

You may want to look at
http://h2database.com/html/functions.html#link_schema and "create linked
table".

Regards,
Thomas


On Wednesday, March 1, 2017, Laird Nelson  wrote:

> Suppose I have some jar files that contain read-only H2 databases in the
> manner described here: http://www.h2database.com/html/features.html?
> highlight=zip&search=zip#database_in_zip
>
> Suppose further those databases all consist of one schema with the same
> tables with the same structure in them.
>
> Is there some way to "silently" unite these databases under a single
> SELECT query (sort of a sharding case), without having to do a bulk data
> load into an aggregated "master" database first?  This is sort of a
> specialized hack of a generic sharding case, I guess.
>
> I am not particularly concerned about performance.
>
> Best,
> Laird
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] "Hexadecimal string contains non-hex character" when opening db

2017-03-01 Thread Thomas Mueller Graf
Hi,

Could you post the exception stack trace please?

Regards,
Thomas

On Wed, Mar 1, 2017 at 11:27 AM, JohanBerg  wrote:

> A user with H2 in an application gets this error code:
> "org.h2.jdbc.JdbcSQLException: Hexadecimal string contains non-hex
> character: "-psn_0_57358" [90004-176]". The application is written in Java
> 8 and runs on macOS sierra (10.12.1).
>
> The error code appears directly after opening the database with the
> following argument: "jdbc:h2:file:" + database +
> ";CIPHER=XTEA;PASSWORD_HASH=TRUE;IFEXISTS=TRUE".
>
> Has anyone seen something similar? Could meta-data get corrupted and cause
> this?
>
> Best regards,
> Johan Berg
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] How to delete duplicate rows?

2017-03-01 Thread Thomas Mueller Graf
Hi,

This is a generic SQL question, not related to H2, best asked at
StackOverflow.com.

Regards,
Thomas


On Wednesday, March 1, 2017, Imran Ahmed  wrote:

> Greetings,
>
> How do I go about deleting duplicate rows? In other words, if multiple
> rows have a same value for a specific column, how do I go about deleting
> all but one rows?
>
> Thanks,
> Imran.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 lucene

2017-03-01 Thread Thomas Mueller Graf
Hi,

This is exception is not from Lucene, it is from H2. If you have a
reproducible test case where such a corrupt database can be created, that
would be great. At least I would need to know the database URL, the size of
the database file, the Java version, and the stack trace.

Regards,
Thomas

On Wednesday, March 1, 2017, Sylvain Pointeau 
wrote:

> Hi Dmitry,
>
> Yes thank you it works :-)
>
> Do you know if this is reliable to use Lucene in H2? I just had an
> exception this morning. (from a database created yesterday)
>
> [2017-03-01 10:10:41] [HY000][5] General error:
> "java.lang.IllegalStateException: Chunk 5451 no longer exists
> [1.4.193/9]" [5-193]
> [2017-03-01 10:10:41] java.lang.IllegalStateException: Chunk 5451 no
> longer exists [1.4.193/9]
> [2017-03-01 10:10:41] at org.h2.mvstore.DataUtils.newIl
> legalStateException(DataUtils.java:765)
>
> Best regards,
> Sylvain
>
>
>
>
> On Wed, Mar 1, 2017 at 12:37 PM, Дмитрий Моряков  > wrote:
>
>> Sylvain, if you are using direct SQL query, you may try smth like that:
>> SELECT QUERY, SCORE FROM FTL_SEARCH('search string', 1000, 0) ORDER BY
>> SCORE DESC
>> where 1000 - number of rows to fetch, 0 - offset
>>
>> HTH
>>
>> Regards,
>> --
>> Dmitry
>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com
>> 
>> .
>> To post to this group, send email to h2-database@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] High processor usage when no transactions taking place - revisited

2017-03-01 Thread Thomas Mueller Graf
Hi,

Yes, this is the background thread trying to compact (garbage collect) the
database file. It should only occur if there is no other write activity,
and should not affect write performance.

Regards,
Thomas



On Tuesday, February 28, 2017, andreas fw  wrote:

> Hi,
>
> I am having an issue, which may be related to the post by Stephen 3/12/14
> titled "High processor usage when no transactions taking place".
>
> I have a Linux box that has been running fine for 3 weeks with a Java app
> that uses an embedded H2 file database. Suddenly at 3am without any real
> activity within a minute the average CPU load went from 8% to 25-30%, where
> a single Java thread "MVStore background writer" takes up 100% when no
> reads or writes are taking place. Some details about the system:
>
> 1 proc box with 1 SSD
> 1 Java app with an embedded H2 file database (1.4.192). The size of
> the db file is ~500 MB.
> The usage profile:
> Writes 10-100 rows every minute and few random smaller reads (only
> a few users connected)
> The Java app connection parameter:
> jdbc:h2:file:/mnt/data/x/x-db
> (i.e. no special H2 config)
> Hardware
>  1 x Intel Celeron 1900 quad core
> OS
>   Ubuntu 16.04 Server edition
>   Linux kernel 4.4.64
>
>
> Running jstack and jvmtop showed that 100% of a thread is spent in the
> MVStore :
>
> org.h2.store.fs.FileNio.read(FilePathNio.java:74)
>
>
> (no other threads are taking up time or have to do with H2)
>
> "MVStore background writer nio:/mnt/data/x/x-db.mv.db" #104 daemon prio=5 
> os_prio=0 tid=0x7ff09c299000 nid=0x7208 runnable [0x7ff0832f3000]
>java.lang.Thread.State: RUNNABLE
> at sun.nio.ch.NativeThread.current(Native Method)
> at sun.nio.ch.NativeThreadSet.add(NativeThreadSet.java:46)
> at sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:737)
> at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:727)
> at org.h2.store.fs.FileNio.read(FilePathNio.java:74)
> at 
> org.h2.mvstore.cache.FilePathCache$FileCache.read(FilePathCache.java:87)
> at org.h2.mvstore.DataUtils.readFully(DataUtils.java:429)
> at org.h2.mvstore.FileStore.readFully(FileStore.java:98)
> at org.h2.mvstore.Page.read(Page.java:190)
> at org.h2.mvstore.MVStore.readPage(MVStore.java:1944)
> at org.h2.mvstore.MVMap.readPage(MVMap.java:736)
> at org.h2.mvstore.Page.getChildPage(Page.java:217)
> at org.h2.mvstore.MVMap.rewrite(MVMap.java:823)
> at org.h2.mvstore.MVMap.rewrite(MVMap.java:823)
> at org.h2.mvstore.MVMap.rewrite(MVMap.java:823)
> at org.h2.mvstore.MVMap.rewrite(MVMap.java:823)
> at org.h2.mvstore.MVMap.rewrite(MVMap.java:782)
> at org.h2.mvstore.MVStore.compactRewrite(MVStore.java:1910)
> at org.h2.mvstore.MVStore.compact(MVStore.java:1802)
> - locked <0x87734c88> (a java.lang.Object)
> at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2504)
>
>
> This couldn't be normal, I think..? Does this have to do with the MVStore
> compaction?
> Thanks in advance for your assistance!
>
> Kind Regards
>
> Andreas W
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] BUG? odd behavior involving automatic foreign key indices and multiple-column primary keys

2017-03-03 Thread Thomas Mueller Graf
Hi,

Yes, H2 creates unique indexes for constraints. If you have a complete,
standalone, simple reproducible test case, we can have a look. But please
remove all columns that are not needed to analyze this.

Regards,
Thomas


On Fri, Mar 3, 2017 at 8:58 PM, Laird Nelson  wrote:

> I have a table with multiple columns in its primary key.
>
> CREATE TABLE GAV (
>   GROUP_ID VARCHAR(255) NOT NULL,
>   ARTIFACT_ID VARCHAR(255) NOT NULL,
>   VERSION_ID VARCHAR(20) NOT NULL,
>   CLASSIFIER VARCHAR(20) DEFAULT 'jar' NOT NULL
>   PRIMARY KEY (GROUP_ID, ARTIFACT_ID, VERSION_ID, CLASSIFIER)
> )
>
>
> I'm seeing some very odd behavior where an attempt to MERGE INTO this
> table is bumping into a unique constraint violation—as though a unique
> constraint were defined on each individual column, rather than on the group
> of columns!
>
> If I go into the mydb.mv.db file, my actual table definition stored in
> that file, minus some control characters and other binary stuff, is this:
>
> CREATE CACHED TABLE PUBLIC.GAV(
> GROUP_ID VARCHAR(255) NOT NULL,
> ARTIFACT_ID VARCHAR(255) NOT NULL,
> VERSION_ID VARCHAR(20) NOT NULL,
> CLASSIFIER VARCHAR(20) DEFAULT 'jar' NOT NULL
> )
>
>
> Looks good so far.  Then I see:
>
> CREATE PRIMARY KEY PUBLIC.PRIMARY_KEY_1 ON PUBLIC.GAV(GROUP_ID,
> ARTIFACT_ID, VERSION_ID, CLASSIFIER)
>
>
> Also looks good.  And then:
>
> ALTER TABLE PUBLIC.GAV ADD CONSTRAINT PUBLIC.CONSTRAINT_1 PRIMARY
> KEY(GROUP_ID, ARTIFACT_ID, VERSION_ID, CLASSIFIER) INDEX
> PUBLIC.PRIMARY_KEY_1
>
>
> Great.  Everything looks fine.
>
> Then, like I said, a part of my code does:
>
> MERGE INTO GAV(GROUP_ID, ARTIFACT_ID, VERSION_ID, CLASSIFIER) VALUES(?, ?,
> ?, ?)
>
>
> ...and I get:
>
> Unique index or primary key violation: "CONSTRAINT_INDEX_112 *ON
> PUBLIC.GAV(VERSION_ID)* VALUES ('3.0.0.CR1', 1)"; SQL statement:
> MERGE INTO GAV(GROUP_ID, ARTIFACT_ID, VERSION_ID, CLASSIFIER)
> VALUES(?, ?, ?, ?) [23505-193]
>
>
> Huh?  I checked the four values; they're distinct from any other four
> values in the table.  This shouldn't be a primary key violation.
>
> I couldn't find CONSTRAINT_INDEX_112 in the INFORMATION_SCHEMA.SYSTEM_
> TABLE area, so I looked back at the database file and found this oddness:
>
> CREATE UNIQUE INDEX PUBLIC.CONSTRAINT_INDEX_112 *ON
> PUBLIC.GAV(VERSION_ID)*
>
>
> What?  I didn't create this index.  I'm guessing it's an index that is
> automatically created for a foreign key that references the VERSION_ID
> column?
>
> Indeed, I have another table that does this:
>
> CREATE TABLE IF NOT EXISTS QUALIFICATION (
>   GROUP_ID VARCHAR(255) NOT NULL REFERENCES GAV(GROUP_ID),
>   ARTIFACT_ID VARCHAR(255) NOT NULL REFERENCES GAV(ARTIFACT_ID),
> *  VERSION_ID VARCHAR(20) NOT NULL REFERENCES GAV(VERSION_ID),*
>   CLASSIFIER VARCHAR(20) NOT NULL DEFAULT 'jar' REFERENCES GAV(CLASSIFIER),
>   JAVA_TYPE_ID INT NOT NULL REFERENCES JAVA_TYPE(ID),
>   QUALIFIER_ID INT NOT NULL REFERENCES QUALIFIER(JAVA_TYPE_ID),
>   USAGE_ID CHAR NOT NULL REFERENCES USAGE(ID),
>   PRIMARY KEY(GROUP_ID, ARTIFACT_ID, VERSION_ID, CLASSIFIER, JAVA_TYPE_ID,
> QUALIFIER_ID, USAGE_ID)
> );
>
>
> This all seems like reasonable DDL to me.  Is this a bug or am I doing
> something wrong?
>
> I'm using H2 1.4.193 and Java 8.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] MVMap rollback

2017-03-03 Thread Thomas Mueller Graf
Hi,

No, I'm sorry, there is no way. But you can open the map for a specific
version, and copy the data to a new map.

Regards,
Thomas


On Fri, Mar 3, 2017 at 8:11 AM, Roland Lohner  wrote:

> Hi,
>
> I have to rollback a given MVMap to an earlier version.
> Other maps in the store must NOT be rolled back so I can not use method
> MVStore.rollbackTo(long version).
>
> Is there a way doing this map specific rollback?
>
> As I can see method MVMap.rollbackTo(long version) is package-private.
> Is it 'legal' to call this method via reflection?
>
> Thanks, Roland
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] High processor usage when no transactions taking place - revisited

2017-03-03 Thread Thomas Mueller Graf
Hi,

It should not keep running. Does it happen with the latest version of H2?
Could you send me the database file (compressed)?

Regards,
Thomas

On Thu, Mar 2, 2017 at 1:35 PM, andreas fw  wrote:

> Hi Thomas,
> thanks for the answer. But why does it keep running? That thread has been
> running constantly for 10 days now?
> FYI, there is another 3rd party application process that writes data to
> the same disk, maybe on average 2 MB/sek - that shouldn't make a big impact
> or...?
>
> Thanks,
> -Andreas
>
> Den onsdag den 1. marts 2017 kl. 17.35.38 UTC+1 skrev Thomas Mueller Graf:
>>
>> Hi,
>>
>> Yes, this is the background thread trying to compact (garbage collect)
>> the database file. It should only occur if there is no other write
>> activity, and should not affect write performance.
>>
>> Regards,
>> Thomas
>>
>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] MVStore caching on read

2017-03-09 Thread Thomas Mueller Graf
Hi,

Which cache do you mean? MVStore.cache? How did you investigate?

Regards,
Thomas

On Wednesday, March 8, 2017, Roland Lohner  wrote:

> Hi MVStore developers,
>
> I have a question regarding caching.
>
> I use a file based persistent MVStore instance.
> The store seems to cache only on put operations.
> Initial (right after opening store using an existing store file) and
> subsequent get operations (using same map, same key) are not sped up by
> caching.
>
> Does MVStore support read cache, or only caching on put?
>
> Is there a special way of configuring read cache?
>
> Thanks,
> Roland
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Invalid value "0" for parameter "parameterIndex"

2017-03-09 Thread Thomas Mueller Graf
Hi,

This exception message doesn't seem to come from H2. Probably you should
ask at the DataNucleus mailing list. Also, could you post the complete
stack trace please (they will need it).

Regards,
Thomas




On Tuesday, March 7, 2017, Carsten Langsdorf 
wrote:

> Sorry for having posted this twice, I wasn't aware this is moderated and
> thus reposted when the first post did not show up. Please use this one:
> https://groups.google.com/forum/#!topic/h2-database/ild2GvmyaQw
>
> Am Dienstag, 7. März 2017 17:12:32 UTC+1 schrieb Carsten Langsdorf:
>>
>> Hi everyone,
>>
>> I'm getting this strange error on attempting to insert a row. I already
>> found and read through several similar occurrences here in the forum, and
>> although these gave me some sort of idea about the issue, I still can't see
>> how to work around this.
>>
>> Okay, here's a more detailed sitrep:
>>
>> I am working on a JavaFX program that uses H2 in embedded mode to store
>> data in a local database (for now). I'm not using JDBC directly, but
>> running through JPA with DataNucleus as persistence provider.
>>
>> The product versions are:
>>
>>- jdk1.8.0_121
>>- h2-1.4.193
>>- DataNucleus 5.0.7
>>
>> In one window I deal with 2 tables (seperately), basically doing CRUD
>> operations. Among other things there is an 'Add' button for each table -
>> which, of course, implements INSERTing a new record via JPA persist.
>>
>> One of the 2 buttons works like a charm. Using the other one, however,
>> raises an exception:
>>
>> Caused by: javax.persistence.PersistenceException: Cannot set Object
>> parameter: value = 0 for column "ODDLOOT.BASE.ACCOUNT.ACCOUNTTYPEID" :
>> Unerlaubter Wert "0" für Parameter "parameterIndex"
>> Invalid value "0" for parameter "parameterIndex" [90008-193]
>>
>> At first, this misled me into thinking there is a problem with the
>> default value for column ODDLOOT.BASE.ACCOUNT.ACCOUNTTYPEID, as it
>> references another table and 0 would not be a valid value. I had not been
>> worrying about the default values generated by DataNucleus, because the
>> database itself holds defaults values for these columns, and it works
>> smoothly on the other table that is handled by this window. But to be sure,
>> I used a DataNucleus extension (@PrePersist) to even set the value
>> originally set by DataNucleus to 1 - which would be valid. Here's the
>> result:
>>
>> Caused by: javax.persistence.PersistenceException: Cannot set Object
>> parameter: value = 1 for column "ODDLOOT.BASE.ACCOUNT.ACCOUNTTYPEID" :
>> Unerlaubter Wert "0" für Parameter "parameterIndex"
>> Invalid value "0" for parameter "parameterIndex" [90008-193]
>>
>> Thus, this is not the origin of the problem. Searching for similar
>> incidents told me that it is related to the numbering of parameters in
>> prepared statements. Obviously enough, I still have 2 issues here:
>>
>>1. DataNucleus creates the prepared statements, i got no control here
>>2. The same thing works with the other table
>>
>> I already checked the code several times and most thoroughly compared the
>> 2 persistance classes about a dozen times - to no avail.
>>
>> Any ideas/suggestions, anyone?
>>
>> Any help greatly appreciated.
>>
>> Cheers,
>> Carsten
>>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] MVStore write to disk but getting an out of memory error

2017-03-09 Thread Thomas Mueller Graf
Hi,

The MVStore uses a limited, fixed amount of memory (about 32 MB). If your
application uses a lot of memory, then you will get out of memory.

I suggest to analyze such problems with "jmap -histo" or "jmap -histo:live".

If you still think this is a problem of the MVStore, then please post a
complete, simple, reproducible test case.

Regards,
Thomas



On Friday, March 3, 2017, javaworkinggirl  wrote:

> Trying to use MVStore to write to disk.  But when I run, I am getting an
> out
> of memory error.
>
> Caused by: java.lang.IllegalStateException: Last block not stored,
> possibly
> due to out-of-memory [1.4.193/3]
> at
> org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:765)
> ~[h2-1.4.193.jar:1.4.193]
> at org.h2.mvstore.MVStore.storeNowTry(MVStore.java:1096)
> ~[h2-1.4.193.jar:1.4.193]
> at org.h2.mvstore.MVStore.storeNow(MVStore.java:1052)
> ~[h2-1.4.193.jar:1.4.193]
>
> Do I have something configured incorrectly?  Can someone point me in the
> right direction?   Do I need to call commit more often?
>
> Thanks.
>
> Tara
>
> protected MVStore persistentManager = null;
>private MVMap> map = null;
>
>  String filename = getDirectory() + File.separator + getName();
>   FileUtils.forceMkdir(new File(getDirectory()));
>
>   getLogger().info("initializing  mvstore ; filename={}", filename);
>   // open the store (in-memory if fileName is null)
>   persistentManager = MVStore.open(filename);
>   getLogger().info("initialized mvstore; filename={}", filename);
>
> map = persistentManager.openMap(getName());
>
>
>
> --
> View this message in context: http://h2-database.66688.n3.
> nabble.com/MVStore-write-to-disk-but-getting-an-out-of-
> memory-error-tp4034019.html
> Sent from the H2 Database mailing list archive at Nabble.com.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Website color typos

2017-03-09 Thread Thomas Mueller Graf
Hi,

Thanks a lot! I will fix those typos. This will be fixed in the next
release.

Regards,
Thomas


On Thursday, March 9, 2017, Jon Harper  wrote:

> Hi,
> just a quick report that the page http://www.h2database.com/
> html/features.html#comparison has a small color errors:
> - In the line "Linked Tables", PostgreSQL has "yes" but it's written in
> red instead of green.
> - In the line "Fulltext Search" derby has "Yes" but it's written in red
> instead of green.
> - In the line "Computed Columns", MySQL has "yes" but it's written in red
> instead of green.
> - In the line "Custom Aggregate Functions" MySQL has "no" but written in
> green instead red.
>
> Not sure if this group is the correct place to report such typos, but
> hopefully someone who can fix this reads this group.
> Cheers,
> Jon
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] H2 Database Engine: New version 1.4.194 available

2017-03-10 Thread Thomas Mueller Graf
Hello,

A new version of H2 is available at http://www.h2database.com
(you may have to click 'Refresh').

For details, see the 'Change Log' at
http://www.h2database.com/html/changelog.html

For future plans, see the 'Roadmap' page at
http://www.h2database.com/html/roadmap.html

Please note the jar file may not yet be available in the
Maven central repository (synchronizing usually takes a few hours).

P.S. If you reply to this message please use a different subject.

Have fun,
Thomas

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] H2 Version 1.4.194: Maven Central files will be available on Tuesday

2017-03-10 Thread Thomas Mueller Graf
Hi,

A new version of H2 was released today.

Unfortunately, I will not be able to upload the jar files to Maven Central
(Sonatype) until Tuesday, because I don't currently have the GPG
authentication keys.

But of course you can still download H2, and the jar files, from the
h2database.com website.

Regards,
Thomas

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: H2 Database Engine: New version 1.4.194 available

2017-03-11 Thread Thomas Mueller Graf
Hi,

Unfortunately, I will not be able to upload the jar files to Maven Central
(Sonatype) until Tuesday, because I don't currently have the GPG
authentication keys.

But of course you can still download H2, and the jar files, from the
h2database.com website.

Regards,
Thomas

On Sun, Mar 12, 2017 at 5:12 AM, Gary Gregory 
wrote:

> Version 1.4.194 is not in Maven Central. Can you please add it?
>
> Thank you,
> Gary
>
>
> On Friday, March 10, 2017 at 2:24:27 PM UTC+1, Thomas Mueller Graf wrote:
>>
>> Hello,
>>
>> A new version of H2 is available at http://www.h2database.com
>> (you may have to click 'Refresh').
>>
>> For details, see the 'Change Log' at
>> http://www.h2database.com/html/changelog.html
>>
>> For future plans, see the 'Roadmap' page at
>> http://www.h2database.com/html/roadmap.html
>>
>> Please note the jar file may not yet be available in the
>> Maven central repository (synchronizing usually takes a few hours).
>>
>> P.S. If you reply to this message please use a different subject.
>>
>> Have fun,
>> Thomas
>>
>> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 Database Engine: New version 1.4.194 available

2017-03-12 Thread Thomas Mueller Graf
Hi,

Thanks! You are right. It should be fixed now (you may need to refresh the
page).

Regards,
Thomas

On Sun, Mar 12, 2017 at 3:17 PM, Remco Schoen  wrote:

> Hi,
>
> On this page:
> http://www.h2database.com/html/download.html
>
> There is still a reference to 1.3.193, but I guess it should be 1.4.193.
>
> Kind regards,
>
> Remco Schoen
>
>
> Op 12 mrt. 2017, om 08:16 heeft Thomas Mueller Graf <
> thomas.tom.muel...@gmail.com> het volgende geschreven:
>
> Hi,
>
> Unfortunately, I will not be able to upload the jar files to Maven Central
> (Sonatype) until Tuesday, because I don't currently have the GPG
> authentication keys.
>
> But of course you can still download H2, and the jar files, from the
> h2database.com website.
>
> Regards,
> Thomas
>
> On Sun, Mar 12, 2017 at 5:12 AM, Gary Gregory 
> wrote:
>
>> Version 1.4.194 is not in Maven Central. Can you please add it?
>>
>> Thank you,
>> Gary
>>
>>
>> On Friday, March 10, 2017 at 2:24:27 PM UTC+1, Thomas Mueller Graf wrote:
>>>
>>> Hello,
>>>
>>> A new version of H2 is available at http://www.h2database.com
>>> (you may have to click 'Refresh').
>>>
>>> For details, see the 'Change Log' at
>>> http://www.h2database.com/html/changelog.html
>>>
>>> For future plans, see the 'Roadmap' page at
>>> http://www.h2database.com/html/roadmap.html
>>>
>>> Please note the jar file may not yet be available in the
>>> Maven central repository (synchronizing usually takes a few hours).
>>>
>>> P.S. If you reply to this message please use a different subject.
>>>
>>> Have fun,
>>> Thomas
>>>
>>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com.
>> To post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] How to overload a H2DB function

2017-03-14 Thread Thomas Mueller Graf
Hi,

I don't think this is supported right now, sorry.

Regards,
Thomas


On Monday, March 13, 2017, gb co  wrote:

> Hi,
> Is there a way to overload a predefined H2DB function?
> What i want is for H2DB to be able to handle the function call:
>  LAST_INSERT_ID(id)
>
> Basically i want the LAST_INSERT_ID to accept an id as param, and return it
>
> I cannot achieve this through an ALIAS as the method LAST_INSERT_ID() is
> already defined in the H2 binaries.
>
> Thanks
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] MVStore caching on read

2017-03-14 Thread Thomas Mueller Graf
Hi,

It's not an anomaly. If you overwrite existing entries, as you do in B),
then the old value is first read. Which means reading from disk. There are
currently no "blind writes".

> Used cache size calculation seems to be incorrect

It depends on the key and value data types you use. You didn't say which
one you use, so I can't say.

Regards,
Thomas



On Tue, Mar 14, 2017 at 11:10 AM, Roland Lohner > wrote:

> Hi Thomas,
>
> Thank you for your answer.
>
> Yes, I am using MVStore.cache.
> The MVStore object is instantiated like this:
>
>
>store = MVStore.open(file.getPath());
>
>store.setAutoCommitDelay(0);
>
>store.setReuseSpace(true);
>
>store.setVersionsToKeep(0);
>
>store.setCacheSize(descriptor.getCacheSizeMb());
>
> I investigated the cache miss problem more detailed and it turned out that
> it is caused by an unstable calculation of used cache size in MVStore.
> Depending on the situation A. and B. (see below) different cache size is
> returned by method store.getCache().getUsedMemory().
>
> A.) An empty data file is opened with MVStore and a new dataset is
> imported (put ~ 1 million entries in different MVMaps). Then a search
> function is executed against the dataset (MVMap.get operations). During
> search, cache hits=1.1 million, cache misses=0, cache size=1336MB. (value
> reported by store.getCache().getUsedMemory() / 1024 / 1024)
>
> B.) Close MVStore and reopen using data file created and written to disk
> in case A. Run same search function as in case A. The first run loads
> caches, so subsequent runs are faster. During search, cache hits=1.1
> million, cache misses=0,
>
> *cache size=5032MB.*Data stored in MVStore in both cases A, B are the
> same and the same search function is executed. Cache  miss is zero in both
> cases. Used cache size calculation of MVStore is still very different in
> these cases. How is it possible? Do you think we found a bug? Or some more
> special configuration on caching should be done?
>
> If a maximum cache size of (for example) 3000MB is set up then all needed
> map entries are cached in case A. but only a part of them are cached in
> case B. This difference in cache misses is reflected also in highly
> increased execution time of the search function in case B.
>
> Another anomaly: In case B. when used cache size is reported to be 5032Mb,
> the whole java process allocates only 1.7GB of memory. Consequently it is
> impossible to cache ~5G of data. Used cache size calculation seems to be
> incorrect. This incorrect calculation prohibits proper cache size
> configuration.
>
> Each versions: 1.4.193, 1.4.180 and 1.3.175 has this behavior.
> Java: Oracle JDK 1.8.0_121 on Linux 64bit
>
> Thanks for any help.
> Regards, Roland
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] New version 1.4.194 - performance regression on index creation?

2017-03-14 Thread Thomas Mueller Graf
Hi,

I'm not aware of a regression.

Could you get a few full thread dumps and post them please? (jps -l to get
the process id, then jstack -l  >> jstack.txt, about 10 times).

Also, we would need to know the table definition, a description of the data
(example data would be best), number of rows, and index definition.

Regards,
Thomas

On Monday, March 13, 2017, Sylvain Pointeau 
wrote:

> Dear team,
>
> Is there any performance regression for creating the indexes?
> I found that my database take ages to create the indexes after mass load.
>
> Please let me know.
>
> Best regards,
> Sylvain
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] MVStore caching on read

2017-03-15 Thread Thomas Mueller Graf
Hi,

OK I see. I'm not sure, maybe this is a bug? Can you reproduce it with a
simple test case (for example using )?

Regards,
Thomas


On Wed, Mar 15, 2017 at 12:20 PM, Roland Lohner  wrote:

> Hi Thomas,
>
> I suspect you misunderstood case B).
> In that case only the search function is called.
> It means there is no overwrite as there are no put operations, only get
> operations are called.
>
> I am wondering what causes the different used cache size in case B)
>
> Regarding 1.7G java memory vs. 5G reported cache size anomaly. You are
> right.
> I have put a special structure as value into MVMap, without using a proper
> DataType as valueType.
> So MVMap did not have a chance to estimate used cache size.
>
> Regards, Roland
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] MVStore caching on read

2017-03-22 Thread Thomas Mueller Graf
Hi,

I found and fixed the problem in trunk.

The problem was: for object data types, the cache size memory estimation
was sometimes far off in a read-only scenario. This can result in
inefficient cache usage.

This doesn't affect you when using the relational database (SQL / JDBC).

Regards,
Thomas


On Tuesday, March 21, 2017, Roland Lohner  wrote:

> Sorry, the attachment is here. :)
>
> On Tuesday, March 21, 2017 at 8:44:16 PM UTC+1, Roland Lohner wrote:
>>
>> Hi Thomas,
>>
>> The attached test reproduces the case using MVMap> Object>>
>>
>> Regards,
>> Roland
>>
>>
>> On Wednesday, March 15, 2017 at 1:13:14 PM UTC+1, Thomas Mueller Graf
>> wrote:
>>>
>>> Hi,
>>>
>>> OK I see. I'm not sure, maybe this is a bug? Can you reproduce it with a
>>> simple test case (for example using )?
>>>
>>> Regards,
>>> Thomas
>>>
>>>
>>> On Wed, Mar 15, 2017 at 12:20 PM, Roland Lohner 
>>> wrote:
>>>
>>>> Hi Thomas,
>>>>
>>>> I suspect you misunderstood case B).
>>>> In that case only the search function is called.
>>>> It means there is no overwrite as there are no put operations, only get
>>>> operations are called.
>>>>
>>>> I am wondering what causes the different used cache size in case B)
>>>>
>>>> Regarding 1.7G java memory vs. 5G reported cache size anomaly. You are
>>>> right.
>>>> I have put a special structure as value into MVMap, without using a
>>>> proper DataType as valueType.
>>>> So MVMap did not have a chance to estimate used cache size.
>>>>
>>>> Regards, Roland
>>>>
>>>> --
>>>> 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 h2-database...@googlegroups.com.
>>>> To post to this group, send email to h2-da...@googlegroups.com.
>>>> Visit this group at https://groups.google.com/group/h2-database.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] h2 process dies frequently on redhat

2017-03-22 Thread Thomas Mueller Graf
Hi,

I don't think this is related to H2. I would try using nohup:
https://en.wikipedia.org/wiki/Nohup

Regards,
Thomas


On Wed, Mar 22, 2017 at 11:00 AM, Snowber Khan  wrote:

> I am running h2 on Redhat 7.2 in server mode. I start the database as the
> root user via command line:
>
> /opt/h2/bin/h2.sh &
>
> The process will die after an hour or so. What is the correct way to start
> h2? Moreover, how can I determine the cause of the die process?
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Having DbException Syntax error in SQL statement defining a H2 trigger

2017-03-22 Thread Thomas Mueller Graf
Hi,

I'm not sure why, but it looks like inner classes are not supported right
now. I get:


Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.h2.schema.TriggerObject.loadFromSource(TriggerObject.java:101)
... 15 more
Caused by: java.lang.NoClassDefFoundError:
org/h2/dynamic/trigger/MY_TRIGGER$Trig (wrong name:
org/h2/dynamic/trigger/MY_TRIGGER)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at
org.h2.util.SourceCompiler$ClassFileManager$1.findClass(SourceCompiler.java:520)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)



CREATE TRIGGER MY_TRIGGER BEFORE INSERT ON MY_TABLE AS $$
   org.h2.api.Trigger create() {
return new Trig();
}
static class Trig implements  org.h2.api.Trigger {
@Override
public void remove() throws SQLException {
}
@Override
public void init(Connection conn, String schemaName, String
triggerName, String tableName, boolean before,
int type) throws SQLException {
}
@Override
public void fire(Connection conn, Object[] oldRow, Object[]
newRow) throws SQLException {
}
@Override
public void close() throws SQLException {
}
}
 $$;

Regards,
Thomas

On Wed, Mar 22, 2017 at 12:43 PM, Giulio Vito de Musso <
giulio.vito.demu...@gmail.com> wrote:

> Hi Noel, thanks for the reply.
>
> This is the full stacktrace of the error
>
> SQL Error [90043] [90043]: Error creating or initializing trigger
> "MY_TRIGGER" object, class "..source..", cause: "org.h2.message.DbException:
> Syntax error in SQL statement ""
> org.h2.api.Trigger create() {
> return new org.h2.api.Trigger() {
>
>
> @Override
> public void remove() throws SQLException {
> }
>
>
> @Override
> public void init(Connection conn, String schemaName, String
> triggerName, String tableName, boolean before,
> int type) throws SQLException {
> }
>
>
> @Override
> public void fire(Connection conn, Object[] oldRow, Object[]
> newRow) throws SQLException {
> }
>
>
> @Override
> public void close() throws SQLException {
> }
> };
>
>
> } "" [42000-193]"; see root cause for details; SQL statement:
> CREATE TRIGGER MY_TRIGGER BEFORE INSERT ON CURRENT_APPLICATION_PROPERTY AS
> $$
> org.h2.api.Trigger create() {
> return new org.h2.api.Trigger() {
>
>
> @Override
> public void remove() throws SQLException {
> }
>
>
> @Override
> public void init(Connection conn, String schemaName, String
> triggerName, String tableName, boolean before,
> int type) throws SQLException {
> }
>
>
> @Override
> public void fire(Connection conn, Object[] oldRow, Object[]
> newRow) throws SQLException {
> }
>
>
> @Override
> public void close() throws SQLException {
> }
> };
>
>
> } $$ [90043-193]
>   Error creating or initializing trigger "MY_TRIGGER" object, class
> "..source..", cause: "org.h2.message.DbException: Syntax error in SQL
> statement ""
> org.h2.api.Trigger create() {
> return new org.h2.api.Trigger() {
>
>
> @Override
> public void remove() throws SQLException {
> }
>
>
> @Override
> public void init(Connection conn, String schemaName, String
> triggerName, String tableName, boolean before,
> int type) throws SQLException {
> }
>
>
> @Override
> public void fire(Connection conn, Object[] oldRow, Object[]
> newRow) throws SQLException {
> }
>
>
> @Override
> public void close() throws SQLException {
> }
> };
>
>
> } "" [42000-193]"; see root cause for details; SQL statement:
> CREATE TRIGGER MY_TRIGGER BEFORE INSERT ON CURRENT_APPLICATION_PROPERTY AS
> $$
> org.h2.api.Trigger create() {
> return new org.h2.api.Trigger() {
>
>
> @Override
> public void remove() throws SQLException {
> }
>
>
> @Override
> public void init(Connection conn, String schemaName, String
> triggerName, String tableName, boolean before,
> int type) throws SQLException {
> }
>
>
> @Overrid

Re: [h2] Re: h2 process dies frequently on redhat

2017-03-23 Thread Thomas Mueller Graf
Hi,

I didn't know about the -Xrs option. But I would be careful, because
according to
http://stackoverflow.com/questions/34951812/why-does-xrs-reduce-performance
this might reduce performance.

I used nohup for testing H2 on a Raspberry Pi; it worked for me.

Regards,
Thomas


On Thu, Mar 23, 2017 at 8:51 AM, Manfred Rosenboom  wrote:

> If you want to run a JVM as server process you must use the -Xrs option
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] "WHERE param in ()" produces no error in PostgreSQL mode

2017-03-30 Thread Thomas Mueller Graf
Hi,

> a lot of people would pay some money to see H2 being faster, more stable,
more SQL 2003+ (CTE, complex merge, etc) etc

Yes, I understand that... Right now we don't have the people for this I'm
afraid.

As for the issue at hand: I don't see why it's a syntax error in
PostgreSQL. Unlike PostgreSQL, in H2 it is not a bug to use an empty list.
Similar than using an empty array is not a bug in Java either. Please note
that H2 is not, and doesn't currently try to be 100% compatible with all
other databases.

Regards,
Thomas

On Wed, Mar 29, 2017 at 1:53 PM, Mikie Mike  wrote:

> jdbc:h2:tcp://localhost:8082/mem:db;DB_CLOSE_DELAY=-1;MODE=PostgreSQL
>
>
> select distinct user0_.id  from USERS user0_ where user0_.id in ();
>
>
> actual result: *empty output, no error produced*
>
> expected result: *[42601] ERROR: syntax error at or near ")"*
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Which is best using one MVStore (persisted to a file) for two MVMap(s) or two?

2017-04-05 Thread Thomas Mueller Graf
Hi,

I would try using one store, with a higher cache size. The cache is shared,
so in theory performance should be a bit better (slightly higher cache
usage).

Regards,
Thomas



On Fri, Mar 31, 2017 at 4:06 PM, Kenton Garner 
wrote:

> First - Thomas and Noel, Thanks for everything.
> I think you have a great project here and I am just learning to love the
> MVStore all by itself.
>
> So the question is...
>
> Assuming I have:
> MVMap cacheA;
> MVMap cacheB;
>
> If I want to store a lot of short lived key/value pairs within these two
> MVMap objects in a persisted MVStore instance;
> Would it be best to use one instance of MVStore to hold both MVMap objects
> or should I assign each MVMap to its own MVStore and persisted file?
>
> This is of course a performance and disk space question.
>
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] H2 Database Engine: New version 1.4.195 available

2017-04-23 Thread Thomas Mueller Graf
Hello,

A new version of H2 is available at http://www.h2database.com
(you may have to click 'Refresh').

For details, see the 'Change Log' at
http://www.h2database.com/html/changelog.html

For future plans, see the 'Roadmap' page at
http://www.h2database.com/html/roadmap.html

Please note the jar file may not yet be available in the
Maven central repository (synchronizing usually takes a few hours).

P.S. If you reply to this message please use a different subject.

Have fun,
Thomas

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Why MVMap's public V get(Object key) is not synchronized

2017-06-09 Thread Thomas Mueller Graf
Hi,

The get method is thread-safe. The MVMap implements ConcurrentMap which
implies thread-safety.

Thread-safe method doesn't need to be synchronized. For example,
String.hashCode is not synchronized, but is thread-safe.

Regards,
Thomas


On Friday, June 9, 2017, Michael Wu  wrote:

> Hi,
> I am learning to use the MVMap class.  I read the source code and found
> that the following methods are all synchronized except the get(...) method:
>
> public synchronized V put(K key, V value)
> public synchronized void clear()
> public synchronized V putIfAbsent(K key, V value)
> public synchronized boolean remove(Object key, Object value)
> public synchronized boolean replace(K key, V oldValue, V newValue)
> public synchronized V replace(K key, V value)
>
> Looks it is not thread safe to use the get(...) method:
>
> public V get(Object key)
>
> Is this an error?  Can anyone help?
>
> Thanks in advance!
> Michael
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] H2 Database Engine: New version 1.4.196 available

2017-06-10 Thread Thomas Mueller Graf
Hello,

A new version of H2 is available at http://www.h2database.com
(you may have to click 'Refresh').

For details, see the 'Change Log' at
http://www.h2database.com/html/changelog.html

For future plans, see the 'Roadmap' page at
http://www.h2database.com/html/roadmap.html

Please note the jar file may not yet be available in the
Maven central repository (synchronizing usually takes a few hours).

P.S. If you reply to this message please use a different subject.

Have fun,
Thomas

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 Database upgrade

2017-07-18 Thread Thomas Mueller Graf
Hi,

No, the database file was not upgraded.

For how to upgrade, see the documentation, section "Upgrade, Backup, and
Restore".

Regards,
Thomas


On Tuesday, July 18, 2017, Lingamoorthy Bheeman Balan <
b.b.lingamoor...@gmail.com> wrote:

> *Hi,*
>
> *Kindly help us in understanding/migration h2 from older version to the
> latest.*
>
> *1. h2.db file was created using the version **1.3.161.*
> *2. Our application connects this h2.db file using the version **1.3.169
> and working fine.*
>
> *Does it mean the database file has been already upgraded to 1.3.169 from
> 1.3.161? If not, how to proceed the upgrade from this version to the
> latest.*
>
> *Kindly advise.*
>
> *Regards,*
> *Lingamoorthy.*
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Query very slow over ODBC driver connection

2017-07-18 Thread Thomas Mueller Graf
Hi,

It's hard to say, it would be best to analyze what the database engine is
doing during that time using thread dumps. Usually it's enough to capture a
few and then have a look at them.

Regards,
Thomas



On Friday, July 14, 2017, Murilo Mansano  wrote:

>
> I am having problems using H2 in server mode (org.h2.tools.Server) using
> ODBC driver in VBA (Excel 2016). When trying to execute a simple select on
> an empty table, the query takes about 2 seconds to execute. I've tried
> almost all versions of the drivers, tried to change the version of java to
> 64 bits, but the problem persists. When running the query on the same
> machine that is running the H2 server the problem does not occur. I do not
> know what I can do anymore, did anyone have such problems using ODBC driver?
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 very slow compared to others?

2017-07-25 Thread Thomas Mueller Graf
Hi,

It depends on what you do. For simple use cases, I generally found H2 to be
faster than DB2, specially in embedded mode, as no network overhead is
needed. But your use case is probably different. That's hard to say,
because you didn't write what you did.

Regard,
Thomas

On Monday, July 24, 2017, YM  wrote:

> On Saturday, 22 July 2017 03:59:42 UTC-4, Noel Grandin wrote:
>>
>> what does your H2 URL look like?​ Are you using the H2 JDBC driver?
>>
>> If your app is heavily multi-threaded, you could try MULTI_THREADED=true,
>> which is almost production-ready
>>
>
> I've tried the following:
>
> 1) jdbc:h2:tcp://localhost:5//path/to/mydb;DB_CLOSE_DELAY=-1
> 2) jdbc:h2:tcp://localhost:5/mem:mydb;DB_CLOSE_DELAY=-1;
> 3) jdbc:h2:mem:mydb;DB_CLOSE_DELAY=-1
>
> #2 made a measurable improvement, which is where I am now with average
> latency being 100x longer, but from there trying embedded didn't help. Also
> tried MULTI_THREADED=1 which didn't help.
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] DATE / TIME types are not consistent across timezones / DST!

2017-07-25 Thread Thomas Mueller Graf
Hi,

I think you should write a simple, self contained, reproducible test case.

Regards,
Thomas


On Monday, July 24, 2017, marcolopes  wrote:

> I believe H2 works differently from MySQL and PostgreSQL :
> LocalTime is not SAVED, so, i have a big problem in my hands :
>
> I opened a new topic: https://groups.google.com/forum/#!topic/h2-database/
> BYlk8oVfLd8
>
> On Monday, July 24, 2017 at 12:54:16 PM UTC+1, marcolopes wrote:
>>
>> The problem is if the same database is opened in a different TIMEZONE,
>> all the DATE and TIME will be changed!!!
>>
>> I cannot control if the fields were saved under ONE or another timezone!!
>> It is up to the database engine to do that...
>>
>> TIME 00:00 saved under one timezone should be retrieved as 00:00 under
>> another timezone! This is critical!
>>
>> On Monday, July 24, 2017 at 12:51:12 PM UTC+1, Noel Grandin wrote:
>>>
>>>
>>> How the data is presented is up to you, we just make sure the same data
>>> is stored and retrieved.
>>>
>>> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Version 1.3.176 not on download page

2017-07-25 Thread Thomas Mueller Graf
Hi,

Yes, only recent versions are available for download at h2database.com.
Older versions are available on Maven.

Regards,
Thomas


On Monday, July 24, 2017, Richard Fuller  wrote:

> Not sure why it was officially removed, but they push the jars to main
> Maven repository so you should be able to find it here.
>
> http://mvnrepository.com/artifact/com.h2database/h2
>
> On Sun, Jul 23, 2017 at 3:34 PM, Adam McMahon  > wrote:
>
>> Hi,
>>
>> I am using H2 Version 1.3.176.  But I went to the download page and I no
>> longer see it listed.  Was this version removed for some reason?  I would
>> like to have the latest 1.3x, and I thought Version 1.3.176 was that
>> version, but now that I see it is no longer online, I am wondering if it
>> has been removed due to errors (or other reasons)?.
>>
>> Thanks,
>>
>> -Adam
>>
>> --
>> 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 h2-database+unsubscr...@googlegroups.com
>> 
>> .
>> To post to this group, send email to h2-database@googlegroups.com
>> .
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] MVStore Custom datatypes are treated as ObjectDataType

2017-08-18 Thread Thomas Mueller Graf
Hi,

You need to set the key and value type. In Java, there is no other way to
get hold of the class (that's the way generics work).

Regards,
Thomas


On Mon, Aug 14, 2017 at 2:09 PM,  wrote:

> Hi,
>
>
> H2 version 1.4.196;   I implemented a custom data type.  After opening map
>  :   MVMap map = store.openMap("any");
>
>
> CustomType's methods wont be called. It is treated as a Object, so instead of 
> my implementation, Java serialization is called.
>
>
>
>
>
> *Builder object in method MVStore.java line 441 :*
>
>
> *.  *openMap( String name, MVMap.MapBuilder builder)
>
>
>
> The builder object used in this method does not set keyType and valueType, 
> they are still null,
>
>
> so they will be set to ObjectDataType whenever builder.create() is called ( 
> at *MVMap.java line 456 or 468*)
>
>
>
>
>
> This is builder.create() :
>
>
> *MVMap.java line 1333 :*
>
>
> @Override
> public MVMap create() {
> if (keyType == null) {
> keyType = new ObjectDataType();
> }
> if (valueType == null) {
> valueType = new ObjectDataType();
> }
> return new MVMap(keyType, valueType);
> }
>
>
>
>
>
>
> If I set key and value type as in below, it works but looks horrible :)
>
>
>   = store.openMap("mymap", new MVMap.Builder String>().keyType(CustomType.INSTANCE).valueType(StringDataType.INSTANCE));
>
>
>
>
> Is there a proper way to do it or does it need a fix?
>
>
>
> Thanks,
>
>
> Ozan.
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com.
> To post to this group, send email to h2-database@googlegroups.com.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] FILE_LOCK=NO in multi ihreaded server application

2017-11-24 Thread Thomas Mueller Graf
Hi,

Why do you use FILE_LOCK=NO? I don't think you should.

Could you provide a simple, reproducible test case?

Regards,
Thomas

On Friday, November 24, 2017, Olaf van der Meer  wrote:

> Hi,
>
> We have got a multi threaded server application. Each thread connects with
> a h2 database using the H2 properties: FILE_LOCK=NO, MV_STORE=FALSE
> The h2 version is h2-1.4.190.
>
> Every now and then we got a EOFException when closing the database.
> Reopening the database after this error sometimes results in:
> java.lang.RuntimeException: rowCount expected 214438 got 214493
> TABLENAME.FIELDNAME
>
> Is it safe to use FILE_LOCK=NO? The documentation writes that it is unsafe
> as another process is able to open the same database.
> We don't open the database from another process, but in another thread
> within the same process. Is this safe?
>
> Thanks for any advice.
>
> Olaf
>
>
>
>
> --
> 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 h2-database+unsubscr...@googlegroups.com
> 
> .
> To post to this group, send email to h2-database@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


  1   2   >