Re: [h2] Re: (corrected): has it gone multi-threaded when MULTI_THREADED=1 but MULTI_THREADED=false?

2017-08-29 Thread Noel Grandin
very good analysis. The constructor should either perform the same check, or call setMultiThreaded() so that the checks are applied. On 29 August 2017 at 17:40, wrote: > Found it. :) > > In DbSettings.java, there is a hash map entry MULTI_THREADED which also > gets printed in

Re: [h2] Re: ALTER TABLE "table-name" MODIFY "columne" NOT NULL; fail with Unknown data type: "NOT";

2017-08-29 Thread Noel Grandin
This is our official syntax for such things: http://h2database.com/html/grammar.html#alter_table_alter_column ​ -- 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

Re: [h2] Re: Question about "check before insert"

2017-08-29 Thread Noel Grandin
h2 does do triggers: http://h2database.com/html/features.html#triggers ​ -- 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] ALTER TABLE "table-name" MODIFY "columne" NOT NULL; fail with Unknown data type: "NOT";

2017-08-29 Thread Sam Blume
Version: h2-1.4.196 ALTER TABLE "table-name" MODIFY "columne-name" NOT NULL; fails with Unknown data type: "NOT"; - - - I kowticed that h2 started to support the "ALTER TABLE - MODIFY"-SQL syntax (used in Oracle) since ca. Version: h2-1.4.19x. In the older version h2-1.4.192 it failed when

[h2] build of jarClient results in 1620 KB (complains and warns, but still builds)

2017-08-29 Thread ceepunx
Hello, I'm trying to build the small (typically about 400+ KB) client library of H2. Below is my exact console log (working under Debian Linux) with Java versions included at the bottom. For some reason, it compiles me a library of 1.6 MB instead of 400+ KB. It still builds, despite the

[h2] (corrected): has it gone multi-threaded when MULTI_THREADED=1 but MULTI_THREADED=false?

2017-08-29 Thread ceepunx
(Sorry about the double post, I made a mess of my previous post by trying to edit it.) So I wished to do some testing about how H2 behaves in multi-threaded mode. Only, I'm not entirely certain if it's entering multi-threaded mode. When I test with 1.4.196 (latest version from GIT), the

[h2] Has it gone multithreaded when: MULTI_THREADED==1 but MULTI_THREADED==false ?

2017-08-29 Thread ceepunx
I wish to esting how H2 behaves in multi-threaded mode. Only, I'm not entirely certain if it's entering multi-threaded mode. When I test with 1.4.196 (latest version from GIT), the following happens: 1) Connect jdbc:h2:tcp://127.0.0.1:9092/db;MULTI_THREADED=1;DB_CLOSE_DELAY=-1 2) Verify:

[h2] Re: (corrected): has it gone multi-threaded when MULTI_THREADED=1 but MULTI_THREADED=false?

2017-08-29 Thread ceepunx
P.S. Also, I notice that when MVCC status is reported, then TRUE is in uppercase. However, when MULTI_THREADED status is reported, then "false" is in lowercase. That is an additional source of confusion for me. I have a suspicion that my method of testing might be incorrect, yet I can't find

[h2] Re: ALTER TABLE "table-name" MODIFY "columne" NOT NULL; fail with Unknown data type: "NOT";

2017-08-29 Thread Sam Blume
Uff, I must restate my last entry: ALTER TABLE "table-name" MODIFY "columne-name" NULL causes an odd modification. It changes the colume type to NULL(0) (never heard of that type) To reporduce, do this: CREATE TABLE FOO ( A VARCHAR2(50) NOT NULL, B VARCHAR2(50) NOT NULL );

[h2] Question about "check before insert"

2017-08-29 Thread Burak Baltali
Hi, I'm a newbie in the H2 database and I'd like to ask a question regarding trigger. I created a table for hotel reservations in the sql with the following script CREATE TABLE Reservierung( RID INTEGER PRIMARY KEY, customername VARCHAR(50) NOT NULL, roomnumber VARCHAR(50) NOT NULL,

[h2] Re: (corrected): has it gone multi-threaded when MULTI_THREADED=1 but MULTI_THREADED=false?

2017-08-29 Thread ceepunx
Found it. :) In DbSettings.java, there is a hash map entry MULTI_THREADED which also gets printed in MetaTable.java like this: HashMap s = database.getSettings().getSettings(); for (String k : s.keySet()) { settingNames.add(k); } Collections.sort(settingNames); for (String k

[h2] Re: Question about "check before insert"

2017-08-29 Thread ceepunx
If it were not a date *interval*, I would suggest a UNIQUE constraint on multiple columns. However, since it is an interval, I don't think there is any mechanism in SQL (H2 or otherwise) that will help you. I think you need to do it on client-side code, by performing a separate SELECT query

[h2] Re: (corrected): has it gone multi-threaded when MULTI_THREADED=1 but MULTI_THREADED=false?

2017-08-29 Thread ceepunx
Found one relevant code site in "table/MetaTable.java": add(rows, "MULTI_THREADED", database.isMultiThreaded() ? "1" : "0"); add(rows, "MVCC", database.isMultiVersion() ? "TRUE" : "FALSE"); This would suggest that a call to "database.isMultiThreaded()" returns false in my test. To be extra

[h2] Re: Question about "check before insert"

2017-08-29 Thread ceepunx
Edit: I found that there is one SQL engine which lets you do that. It is PostgreSQL (and I don't think that functionality is part of any standard): https://dba.stackexchange.com/questions/110582/uniqueness-constraint-with-date-range -- You received this message because you are subscribed to