Re: Unable to sort the data using first column, while using sub queries...

2009-10-14 Thread Christian Peter
Hi Ronald, This is a bug. I just sent Thomas (the main developer) a patch which should fix this issue. I'll keep you informed. Bye Christian On Oct 14, 1:05 pm, Ronald wrote: > Hi guys, > >   I'm just new to this H2Database engine. I work on Oracle & SQL > server mainly. > >  I was just tryin

Re: Unable to sort the data using first column, while using sub queries...

2009-10-16 Thread Christian Peter
Hi Ronald, I just committed the patch. The bug should be fixed in the next version. Bye Christian On Oct 14, 11:31 pm, Christian Peter wrote: > Hi Ronald, > > This is a bug. I just sent Thomas (the main developer) a patch which > should fix this issue. I'll keep you

Re: Taking a long time to connect to the H2 embedded database on restart; Java shutdown hook

2009-11-14 Thread Christian Peter
h=recover#logging_recovery So normally you shouldn't have to use the parameter. Regards Christian Peter On Nov 14, 4:14 pm, Seb wrote: > Hi, >   We have a java application thats connected to a H2 database in the > embedded mode. Our java application has  a Java Runtime shutdown hook > writ

Re: How avoid database corruptions?

2010-01-06 Thread Christian Peter
Hi Nico, I'm involved in the development of the serialization mode. Could you please provide a test case for this problem? Which version did you use? Regards Christian Peter On Jan 6, 3:20 pm, Nico Collard wrote: > Hi Thomas, > > my situation is similar to the one of the first

Re: DELETE FROM tbl causes IndexOutOfBoundsException

2010-03-05 Thread Christian Peter
Hi, I just checked in a fix for that. Thomas will release a new version soon. Please check if it is fixed for you, too. Regards Christian On Mar 4, 7:03 am, kensystem wrote: > Using h2-1.2.130, > > CREATE TABLE IF NOT EXISTS test (rowid INTEGER PRIMARY KEY > AUTO_INCREMENT,txt VARCHAR(64000));

Re: retrieving datatype is not the set datatype

2010-03-18 Thread Christian Peter
Hi hsyn, Hi Thomas, Thomas: I already extended an old test case. I'll send you the patch. Regards Christian On Mar 18, 8:58 pm, Thomas Mueller wrote: > Hi, > > > if i add a FLOAT column in a table and retrieve it again the datatype > > is shown as DOUBLE; > > i should retrieve the set type > >

Re: is it safe to have multiple machines pointing on the same files in embedded mode?

2010-03-20 Thread Christian Peter
Hi Martin, H2 does not use java.nio.channels.FileLock. Locking is done internally without OS specific features. See org.h2.store.FileLock for more Infos. Regards Christian On Mar 20, 9:30 am, Wildam Martin wrote: > > There something comes to my mind: In Java file locking is working > different

H2 Database Engine: New version 1.2.132 available

2010-03-21 Thread Christian Peter
It's actually version 1.2.132, so I changed the subject. On Mar 21, 4:11 pm, Thomas Mueller wrote: > Hello, > > A new version of H2 is available athttp://www.h2database.com > (you may have to click 'Refresh'). > > For details, see the 'Change Log' > athttp://www.h2database.com/html/changelog.htm

Re: Restore DB from SQL: Cannot parse date constant ?676-10-10

2010-03-31 Thread Christian Peter
Hi Thomas, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6898593 Since Java 6u18 java.sql.Date.valueOf() throws exceptions if not in -mm-dd format. I just checked in a fix for RandomGen.randomDate(). You should check if everywhere else the handling is correct. Regards Christian On

Re: ResultSet isBeforeFirst method

2010-04-15 Thread Christian Peter
Hi Mikel, thanks for the bug report. I just checked in a fix for this, and for isAfterLast(), too. The next version will contain these fixes. Regards Christian On Apr 14, 4:34 pm, Mikel wrote: > Hi, > > isBeforeFirst() method on ResultSet (http://java.sun.com/j2se/1.4.2/ > docs/api/java/sql/Re

Re: Is there an issue tracking system?

2010-05-06 Thread Christian Peter
Hi, the issue tracker with all issues is here: http://code.google.com/p/h2database/issues/list?can=1&q=&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&sort=&x=&y=&cells=tiles but it does not contain all bugfixes, only reported issues by non-H2 developers. The best thing for you would be

Re: One instance r/w other instances only r?

2010-05-06 Thread Christian Peter
Hi, no it's not stupid, sometimes the replies take some time :) If the instances share the same network you could use AUTO_SERVER=TRUE http://www.h2database.com/html/features.html?highlight=AUTO_SERVER&search=AUTO_SERVER#auto_mixed_mode For a file-based concurrent access you'd have to use the m

Re: java.lang.NullPointerException in embed Profiler

2010-05-06 Thread Christian Peter
Hi, executeUpdate does not produce a result set. Therefore the result is null (you can't get the content of the table if you do an insert): http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#getResultSet%28%29 To get a result set you'd have to execute a query: ResultSet rs2 = stat.

Re: H2 and rename file extension

2010-05-06 Thread Christian Peter
Hi, the extension must not be changed. See http://www.h2database.com/html/features.html#database_file_layout and there the topic "Moving and Renaming Database Files". I'll change the documentation to: While a database is closed, the files can be moved to another directory, and they can be rena

Re: H2 and rename file extension

2010-05-06 Thread Christian Peter
Thats even better :) I committed it. Regards Christian On May 7, 8:39 am, Thomas Mueller wrote: > Hi, > > >> as long as all files start with the same name > > That's not required. Only the suffix needs to stay. > > Ah, I understand... All files of the same database need to start with > the sam

Re: Possible database corruption

2010-05-07 Thread Christian Peter
Hi Thomas, very good news. I'm looking forward to see where the bugs are. Keep up your excellent work. Regards Christian On May 7, 9:35 am, Thomas Mueller wrote: > Hi, > > From time to time, people send reports about corrupt databases. Of > course it's not acceptable that databases get corrup

Re: H2 and rename file extension

2010-05-07 Thread Christian Peter
Hi, currently you have to compile H2 yourself. There is no way to change the extension at runtime. Patches are welcome :) Regards Christian On May 7, 6:09 pm, Paluee wrote: > Hi, > > OK then how would I be able to edit this: > "The only way to change it would be to edit org.h2.engine.Constant

Re: Possible database corruption

2010-05-09 Thread Christian Peter
Hi, the checkin is here: http://code.google.com/p/h2database/source/detail?r=2568# In H2 it is possible to use different "file systems" to write the data. This file system is enabled by adding "debug:" to the connection string. Regards Christian On May 9, 12:31 am, Wildam Martin wrote: > Wha

Re: Prepared Statements with parameter in "where in" clause

2010-05-09 Thread Christian Peter
Hi, this is a bug. I just sent a patch to Thomas for review. It should be fixed in the next release. Regards Christian On May 9, 8:59 am, JPT2 wrote: > Found something odd with the "select where in (select)" construct > using a Prepared Statement -- only the first execution works. Please > see

Re: Prepared Statements with parameter in "where in" clause

2010-05-09 Thread Christian Peter
Fix is included in the next version. Thanks for reporting. Regards Christian On May 9, 2:05 pm, Christian Peter wrote: > Hi, > > this is a bug. I just sent a patch to Thomas for review. It should be > fixed in the next release. > > Regards > > Christian > >

Re: ResultSet.next on empty result set

2010-05-11 Thread Christian Peter
Hi, maybe it is related to this one: http://code.google.com/p/h2database/source/detail?r=2484 Regards Christian On May 11, 10:08 pm, "steve.ebersole" wrote: > Not sure if you looked at the Hibernate test, but the very first thing > this test does is to execute an initial query which simply ch

Re: One instance r/w other instances only r?

2010-05-14 Thread Christian Peter
essage.DbException.get(DbException.java:144) >         at org.h2.store.PageStore.readPage(PageStore.java:1008) >         at org.h2.store.PageStore.getPage(PageStore.java:528) >         at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:211) > > And it actually corrupted the whole d

Re: How to persist tables in mem

2010-05-31 Thread Christian Peter
Hi, see: http://groups.google.com/group/h2-database/browse_thread/thread/0609796d04ffa038# Regards Christian On May 31, 10:55 am, Nimi wrote: > Hi All, >           I have created a database in mem using the following > command. > > jdbc:h2:mem:testing;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE.

Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-06-09 Thread Christian Peter
to the latest version http://inputsys.de/h2/Migrate.java<= Sourcecode of the main conversion class This works for me, but of course it may not work for you. So please give me feedback! Regards Christian Peter -- You received this message because you are subscribed to the Google Groups "H2

Re: Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-06-09 Thread Christian Peter
Usage: Just replace your h2 jar file with this version and launch your app. If your app connects to an old database, it will be converted automatically to a page store version. Apart from that, it will act like the default H2 version. See the class comment above for more options. Christian Peter

Re: Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-06-10 Thread Christian Peter
fix it to their liking. > > ...just like I'm doing. > > On Jun 9, 2010, at 12:55 PM, Christian Peter wrote: > > > But I know at least two > > companies which are unhappy about the current situation. -- You received this message because you are subscribed to the Goo

Re: Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-06-10 Thread Christian Peter
n the fly by the default H2 version, so developers can ship the default distribution with the migration tool as a separate tool. > > Anyway, great work. Many thanks! > Dirk. Thank you Regards Christian Peter -- You received this message because you are subscribed to the Google Groups &qu

Re: Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-06-14 Thread Christian Peter
Hi Thomas, On Jun 14, 8:27 pm, Thomas Mueller wrote: > Hi, > > This is a good idea. I didn't have time yet to look at the details, > but once it's ready it could be included in H2, specially the > Migrate.java (in the package org.h2.tools, in the regular H2 jar > file). I think Migrate.java shou

Re: www.h2database.com is down a lot?

2010-06-23 Thread Christian Peter
Hi, I visit the home page a few times a day and never had a problem. Regards Christian On Jun 23, 7:55 am, Thomas Mueller wrote: > Hi, > > It's not down for me (it never was down for me). I recently try to > enable HTTP compression (not sure if it works now), maybe this causes > problems? > >

Re: Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-07-03 Thread Christian Peter
Hi Thotheolh, Thomas and I work on a solution which soon will be integrated and will eventually has the following features: - Default H2 release can be used - Standalonge migration .jar is available from the h2 homepage - If H2 finds the migration classes, it will convert the database via "script

Re: Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-07-03 Thread Christian Peter
Jul 3, 11:04 am, Thotheolh wrote: > Hi Christain. May I know the url to the standalone migration jar file? > I tried to search the h2 website for the standalone download but > couldn't find it. > > Thanks alot. > > Regards, > Thotheolh. > > On Jul 3, 4:54 pm,

Re: Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-07-11 Thread Christian Peter
Hi, On Jul 10, 8:01 am, Thotheolh wrote: > Hi. I took a look at the standalone migration and the modified H2 > database Christian made. i noticed both contains the entire H2 source > for the old version. Most applications who wish to migrate already > have a H2 database jar file included and now

Re: Database upgrade from 1.1 to 1.2 (non page store to page store) finally made easier

2010-07-11 Thread Christian Peter
FYI: I updated the migration .jar file. Now it's created from the version-1.1.x branch. Regards Christian On Jul 11, 10:29 am, Christian Peter wrote: > Hi, > > On Jul 10, 8:01 am, Thotheolh wrote: > > > Hi. I took a look at the standalone migration and the modified H2

Re: Automatic database upgrade from non page store

2010-07-15 Thread Christian Peter
Hi, Thotheolh is right, we need the connection url. Additionally, we need to know which databases and files are present. Thanks Christian On Jul 16, 2:19 am, Thotheolh wrote: > Could you post your JDBC connection url ? > According to the Error Analyzer provided on the H2 website: > > DATABASE_

Re: Automatic database upgrade from non page store

2010-07-16 Thread Christian Peter
Hi, I already removed IFEXISTS=TRUE internally for the old connection, but I didn't remove it case insensitive. Please retest with the next version, it should be fixed now. Regards Christian On Jul 16, 11:30 am, Duvel wrote: > The used url is: > jdbc:h2:target;ifexists=true > > We use it to pr

Re: Automatic database upgrade from non page store

2010-07-17 Thread Christian Peter
> target.index.db > target.data.db > target.2.log.db > > And no new page store db file like target.h2.db. > > Regards, > > Remco > > On 16 jul, 21:04, Christian Peter > wrote: > > > Hi, > > > I already removed IFEXISTS=TRUE internally for the old c

Re: encrypteed temp migration file

2010-07-26 Thread Christian Peter
Hi, On Jul 26, 2:08 pm, Thotheolh wrote: > I notice that 1.2.140 has a feature to encrypt temp files use during > migration of the db. Is there an option to manually enable or disable > this function. No, currently, the file is encrypted. > This is a good security feature but it could slow down

Re: encrypteed temp migration file

2010-07-30 Thread Christian Peter
I changed it now. It is no longer encrypted if the db is unencrypted, too. Regards Christian On Jul 26, 10:33 pm, Christian Peter wrote: > Hi, > > On Jul 26, 2:08 pm, Thotheolh wrote: > > > I notice that 1.2.140 has a feature to encrypt temp files use during > > migra

Re: Incompatibility between 1.2.132 and 1.2.137 jarSmall

2010-08-08 Thread Christian Peter
Hi, there is no special mechanism other than an internal TCP protocol version number which isn't used in your case (since it's file: access). Is this right? - New application - Old driver 1.2.132 How do you access the "old driver" with your 1.2.137 web console? Regards Christian On Aug 8,

Re: Incompatibility between 1.2.132 and 1.2.137 jarSmall

2010-08-08 Thread Christian Peter
Hi, > > For the web console, I just double clicked on the H2's 1.2.137 main > jar file which would auto launch a web app and from that h2 console > web app, i attempted to access the JDBC url but it did not work until > I replaced the old h2 with a new one and ran the production app once > (which

Re: H2 usage question.

2010-08-11 Thread Christian Peter
Hi Sylvain, > > Is it possible and > safe to update the database with another process (e.g the H2 console) > without touching the running program (I really don't want to restart > them) ? No, you will get problems, because the read only connections are not aware of file changes. > Eventually, I

Re: H2 usage question.

2010-08-11 Thread Christian Peter
Hi > SERIALIZED mode seems pretty interesting for my case, i will mostly do > simple update query, i'll test it. > Regarding performance, only writing performance is affected right? > Writing is expensive, because the writer must wait some time to get the lock. Writing also affects the readers, b

Re: SQL statement:

2010-08-14 Thread Christian Peter
Hi FrancoGP, > > another question.. is there any way to load into memory an SQLite data > base (.bd3)? > H2 does not support other file formats. If you need to access SQLLite tables from H2 you can use linked tables: http://h2database.com/html/advanced.html?highlight=linked&search=linked#linked_t

Re: H2 Database Engine: New version 1.2.141 available

2010-08-22 Thread Christian Peter
Hi Andreas, if it's a minor version upgrade (eg. from 1.2.140 to 1.2.141) you can usually swap the jar file. If it's a major version jump (eg. from 1.1.x to 1.2.x) you should read http://www.h2database.com/html/advanced.html?highlight=upgrade&search=upgrade#database_upgrade The changelog is also

Re: Issues with memory (native memory?)

2010-09-30 Thread Christian Peter
Hi, in the company I work for we have databases with 6GB and just 128MB of RAM assigned to the java process. We have no problems with memory. You really should profile what objects are created in the JVM. Look at this article. http://java.sun.com/developer/technicalArticles/Programming/HPROF.htm

Directory ".lobs.db" with temp files when using client-server mode

2010-12-02 Thread Christian Peter
Hi, just FYI, I just checked in a fix for the following problem: - H2 in server mode - H2 client retrieves blobs which are bigger than LOB_CLIENT_MAX_SIZE_MEMORY => In the client a ".lobs.db" directory gets created, storing temporary lobs This is problematic if there is no write access to the cu

Re: i want to add anything new to H2 database a my course subject.

2010-12-14 Thread Christian Peter
Hello hemang, you might want to look at the current roadmap. There are easy tasks like "FTP: document the server, including -ftpTask option to execute / kill remote processes " but for most issues you've got to invest more time. You might also want to read how to build H2: http://www.h2database

Re: Oops! Auto Upgrade with h2mig_pagestore_addon.jar failing because it is renaming the lob folder

2011-02-15 Thread Christian Peter
Hi, apparently I broke it. Sorry for that. In version 1.3.148 Thomas did refactor it, so I guess you might have another result with a newer version. Please try it and tell me if it works for you. I will then make a 1. 2 version with the fix for you (though I'm very busy at the moment, so it coul

Re: Oops! Auto Upgrade with h2mig_pagestore_addon.jar failing because it is renaming the lob folder

2011-02-23 Thread Christian Peter
ewire.pl.system.database.connection.DBCPNonSyncPoolableConnectionFactory.makeObject(DBCPNonSyncPoolableConnectionFactory.java: > > 57) > >         at > > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java: > > 1148) > >         at org.apache.

Re: Database file modification

2011-07-07 Thread Christian Peter
Hi Sylvain, if the connections all come from one computer, and they are not in the same VM, then AUTO_SERVER is the best way to do this. AUTO_SERVER only has problems if you access the database via different networks (imagine a mobile user starting the server, and other users accessing this server

Re: Database file modification

2011-07-09 Thread Christian Peter
Hi Sylvain, thank you for the test case. Its not the select that causes the modification, it's the connection from a new client. I'm sorry this is currently by design. The SERIALIZED mode was never meant to be equal in performance, so I think thats Ok. Maybe this changes in the future, but curren