Re: ExecuteBatch

2012-05-08 Thread Thomas Mueller
Hi, 1) Assume I'm inserting 100 rows successfully. Based on earlier group > threads getGeneratedKeys only will return the key for record 100. So > I'll need to query the database after the executeBatch to get the list > of Ids created? > Yes. 2) Assume row 14 of the above has a constraint violat

Re: Max length on parameter OriginalTableString of CREATE LINKED TABLE

2012-05-08 Thread Thomas Mueller
Hi, The error code "PWS0006" / "-239" is not from H2, so it has to be from AS/400. Is there some more thread dump you could post? There should be the root cause as well, from the AS/400 JDBC driver. Regards, Thomas On Wednesday, May 2, 2012, Francesc Monge Tapies wrote: > Hi: > I am getting an

Re: Index corruption bug

2012-05-08 Thread Thomas Mueller
Hi, Not for me, unfortunately. Running 1.3.166, embedded in my app Could you check that the database file was created with version 1.3.166? To do this, run the statement SELECT * FROM INFORMATION_SCHEMA.SETTINGS WHERE NAME='CREATE_BUILD' The result should be 166. If it is, could you send me a

Re: Two phase commit and transaction log issue

2012-05-08 Thread Thomas Mueller
Hi, I didn't run the test so far. But what what is the problem (what result do you expect, and what result do you get)? Regards, Thomas On Saturday, May 5, 2012, wburzyns wrote: > Please see below for a standalone testcase. However after playing with > it I no longer claim that the issue is r

Re: SCRIPT TO 'filename' add character ';' at the beginning

2012-05-08 Thread Thomas Mueller
Hi, The ";" is not part of the statement, you should ignore it. Regards, Thomas On Saturday, May 5, 2012, furanu wrote: > Hello, when I export the database into a file using the SCRIPT TO > 'filename' query all goes well except that at the beginning of the script > ther is the character ';' so

deadlock detected

2012-05-08 Thread Thomas Mueller
Hi, If it's a deadlock, I guess you didn't lock the tables in the same order. I suggest to use SELECT ... FOR UPDATE. But I can't solve the problem for you, sorry. Regards, Thomas On Friday, May 4, 2012, albert vallès 2 wrote: > Hi, > > Having 3 threads running (one java swing application and

Patch to track progress of long-running query

2012-05-10 Thread Thomas Mueller
Hi, This looks good! I gave you commit rights, so you can commit it yourself now. Please tell me if you want me to commit it for you. Regards, Thomas On Friday, May 4, 2012, Steve McLeod wrote: > I'd like to submit this patch which finishes my earlier additions to > DatabaseEventListener. Now,

Re: Using database event listener (resend)

2012-05-10 Thread Thomas Mueller
Hi, The DatabaseEventListener is create on the server side. To transfer the data to the client, you would need a different connection from the client to the server. Possible the DatabaseEventListener could add the events to the database (in a small in-memory table for example) that can then be que

Re: array data type

2012-05-12 Thread Thomas Mueller
Hi, I think H2 should be already quite efficient for such data. To verify, you could run a benchmark with the array against your own serialization code (convert the doubles to a byte array and back, and use the binary data type). Regards, Thomas On Wednesday, May 9, 2012, essence wrote: > Mos

Re: Two phase commit and transaction log issue

2012-05-14 Thread Thomas Mueller
Hi, Thanks for the test case! I can reproduce this now. The warning should not be logged, but it seems it doesn't prevent empty space in the transaction log to be re-used. Anyway, it doesn't work as expected, I will investigate. Regards, Thomas On Wednesday, May 9, 2012, wburzyns wrote: > The

Re: How to include full H2 sources to Java project?

2012-05-14 Thread Thomas Mueller
Hi, Yes, you need those libraries to build H2. However, unless you use those features, you don't need them at runtime. Regards, Thomas On Fri, May 11, 2012 at 7:00 PM, Fred&Dani&Pandora wrote: > Hi, > > I think you will need some external jars, even to build H2. The follow jars > are download

Re: List tables in current schema as a select

2012-05-15 Thread Thomas Mueller
Hi, The JDBC database metadata functions are the best solution. If you need to access INFORMATION_SCHEMA directly, you could use the SCHEMA() function: http://h2database.com/html/functions.html#schema Regards, Thomas On Tuesday, May 15, 2012, Jacob Qvortrup wrote: > Hi. > > I an attempt to m

Re: Cascading delete

2012-05-15 Thread Thomas Mueller
Hi, Referential constraints support cascading deletes using "on delete cascade": http://h2database.com/html/grammar.html#referential_constraint Regards, Thomas On Tuesday, May 15, 2012, Thotheolh wrote: > Is there a feature in H2 that would allow cascading deletes of foreign key > linked tab

Re: Problem with bundled Tanuki service wrapper on 64Bit Wondows 7

2012-05-17 Thread Thomas Mueller
Hi, Thanks a lot! I will document this problem for now and add a link: "The service wrapper bundled with H2 is a 32-bit version. To use a 64-bit version of Windows (x64), you need to use a 64-bit version of the wrapper, for example the one from http://www.krenger.ch/blog/java-service-wrapper-3-5-

Re: How to add new software '974 Application Server' (including your database H2) into your website 'http://www.h2database.com' ?

2012-05-17 Thread Thomas Mueller
Hi, Thanks! I will add the following link: http://www.webaura.fr";> 974 Application Server A clusterable application server. Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to h2-database@goog

Re: H2 at SUSE

2012-05-17 Thread Thomas Mueller
Hi, Thanks a lot! I will add a link as follows: http://www.suse.com/products/suse-manager";>SUSE Manager, part of Linux Enterprise Server 11 The SUSE Manager http://www.suse.com/blogs/suse-manager-eases-the-buden-of-compliance";> eases the burden of compliance with regulatory requirements and cor

Re: Use of IN

2012-05-18 Thread Thomas Mueller
Hi, Generally, you should try not to use conditions, and an index on very large column (for example a very large text column, or an array column with 3000 values). If you need to delete multiple rows, you could try: delete from test where id in (select x from table(x int=?)) Regards, Thomas --

Re: Some minor updates to the H2 documentation

2012-05-18 Thread Thomas Mueller
Hi, Done (in trunk, but not on the website yet). Regards, Thomas On Fri, May 4, 2012 at 11:05 AM, Lukas Eder wrote: > I would like to suggest this patch updating some parts of the H2 > documentation related to jOOQ. These are the suggested changes: > > - jaqu.html: Added link to the list of sim

Re: Build Docs fails on files i haven't touched

2012-05-18 Thread Thomas Mueller
Hi, My mistake, I don't always check if the documentation is complete and correct before I commit. It should be fixed now. Regards, Thomas On Tue, May 15, 2012 at 10:43 AM, Jacob Qvortrup wrote: > Hmm.. I may end up just sending my patch without going through the steps. > > -- > You received

Re: Using database event listener

2012-05-18 Thread Thomas Mueller
Hi, The DatabaseEventListener is running on the server side (where the database is open). What you could do is: within the database event listener, buffer the log messages into the database (in an in-memory table for example). Then, on then client side, read from this buffer from time to time. Re

Re: Why servletContext.getAttribute("connection") and not servletContext.getAttribute("connectionPool") ?

2012-05-18 Thread Thomas Mueller
Hi, > this means that when I get a connection from the servletContext, I get > a non-pooled connection, and always the same one is used. Yes. > - it is safe to access the same connection from multiple threads? No. > How this works with transactions? If you use transactions, you have to synchr

Re: Listening to changes in data from another process at a database level

2012-05-21 Thread Thomas Mueller
Hi, So, a follow on question, is there a way to prioritise queries when running > in multi-threaded mode? Not within the database engine. You would have to do that in the application. Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H2 Database" g

Use of IN

2012-05-21 Thread Thomas Mueller
Hi, the bottleneck is that when deleting a row, > the complete row is read, and if that row contains a column with a > large array, the reading of the array is the bottleneck (even though > it is about to be deleted). > Yes. However I don't think converting the byte array to a row is the problem.

Re: Empty string is replaced with space

2012-05-21 Thread Thomas Mueller
Hi, You are right, there is a bug in the H2 Console where an empty column is replaced with a single, non-breaking space. I have now fixed this problem in revision 4231. Please note this is a bug in the H2 Console tool only, not a bug in the database engine itself. Thanks a lot for reporting this

Re: integer and BigInt

2012-05-22 Thread Thomas Mueller
Hi, Why not use BIGINT? It's a java.lang.Long, as required by the JDBC Spec (not BigInteger). See also http://h2database.com/html/datatypes.html#bigint_type http://docs.oracle.com/javase/1.4.2/docs/guide/jdbc/getstart/mapping.html Regards, Thomas On Mon, May 21, 2012 at 4:37 PM, Patrice wrote

Re: Feature Request: more specific sql exceptions

2012-05-22 Thread Thomas Mueller
Hi, I think the first step should be to support the more specific exceptions as available in Java 6 (SQLDataException, SQLSyntaxErrorException, SQLTimeoutException,...). I'm not sure if it's then needed to support even more specific exceptions. Regards, Thomas On Fri, May 18, 2012 at 6:18 PM, Lu

H2 Database Engine: New version 1.3.167 available

2012-05-23 Thread Thomas Mueller
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 P.S. If you reply to

Re: H2 running in Tomcat 7 produces memory leak reports in tomcat's detection mechanism

2012-05-23 Thread Thomas Mueller
t; Thanks! > > On Apr 27, 11:55 am, Jim > wrote: > > Ok. If you need anything else from me, please let me know. I assume > > that what I have provided so far is sufficient for your investigation? > > > > On Apr 26, 9:44 am, Thomas Mueller > > > > > > w

Re: integer and BigInt

2012-05-23 Thread Thomas Mueller
Hi > Why "unsigned" is not supported with H2 ? Because it's non-standard. What SQL type (java.sql.Types) and Java type would it be? Please note in a database file, for H2, BIGINT (java.lang.Long) and INT (java.lang.Integer) typically need the same space. Regards, Thomas -- You received this m

Re: Tomcat has to prevent H2 from leaking memory

2012-05-24 Thread Thomas Mueller
Hi, I believe this is related to: http://stackoverflow.com/questions/3320400/to-prevent-a-memory-leak-the-jdbc-driver-has-been-forcibly-unregistered I'm not sure if it's a good idea to manually unregister the driver when the application is stopped, it might work. Using a connection pool is more

Re: H2 running in Tomcat 7 produces memory leak reports in tomcat's detection mechanism

2012-05-24 Thread Thomas Mueller
Hi, I could reproduce the log message now and I think I found a way to avoid it. Just to make sure: you didn't in fact see any out of memory problems, or similar, right? It's just the message in the log file? Regards, Thomas -- You received this message because you are subscribed to the Google

Re: H2 running in Tomcat 7 produces memory leak reports in tomcat's detection mechanism

2012-05-27 Thread Thomas Mueller
Hi, > 1) So far I didn't get a memory leak problem e.g. reported by > profiler. OK that's good to know. > I only get these log warnings which hint that there is such > a problem. I guess the classloader of the web application stays in memory unnecessarily for the first time you restart the web

Re: emergency: How to kill the uncommit read lock on other session when lock_mode 1/2 ?

2012-05-29 Thread Thomas Mueller
Hi, Sorry I can't reproduce the problem. In my test, the lock gets released as soon as the connection is closed. Could you post a reproducible test case? Regards, Thomas On Friday, May 18, 2012, 齐哲之 wrote: > Hi, > > I had a problem. > Lock_mode 1 or Lock_mode 2. > > Two or more session on one

Re: Last user login details (except password) is shown in H2 db console

2012-05-29 Thread Thomas Mueller
Hi, I think normally it's not a security problem to remember the user name. But I see in your case it might not be nice. Did you try making the file ".h2.server.properties" read-only, as suggested? Regards, Thomas On Saturday, May 19, 2012, Dinusha Dilrukshi wrote: > HI, > > I looked in

Re: android build not working

2012-05-29 Thread Thomas Mueller
Hi, Sorry but I can't tell what's wrong, it works for me. I guess the driver is not in the classpath for some reason in your case, but I can't say why. Android is supported. Regards, Thomas On Wednesday, May 23, 2012, Maciej Kacper Jagiełło wrote: > Tried to setup a basic android project wi

Re: !!!!! How To add Months to Date(dd-mon-yy) that works with Oracle Also !!!!!

2012-05-29 Thread Thomas Mueller
Hi, I believe this should work: insert into test(id, x) values(1, {d '2001-12-31'}); as documented in the JDBC specification. Use {ts ...} for time stamps. Regards, Thomas On Thursday, May 24, 2012, Abhi wrote: > Hi, > My query is how to add months to Date(dd-mon-yy) that works with > Oracle

Re: CurrentRow in rowset not updating after inserting new row into H2 DB

2012-05-30 Thread Thomas Mueller
Hi, I'm afraid this feature isn't supported in the H2 database. In H2, updatable result sets are supported in the same way as in PostgreSQL. In H2, own changes are visible, but not own inserts and deletes. Regards, Thomas On Thursday, May 24, 2012, bee vo <19beev...@gmail.com> wrote: > Hi, >

Re: Problems with database event listener

2012-05-30 Thread Thomas Mueller
Hi, It sounds you could use the server mode. That way you can ensure the database event listener is running within the virtual machine that started the server. Regards, Thomas On Monday, May 28, 2012, Lizard Lizard wrote: > On Mon, May 28, 2012 at 2:20 PM, Noel Grandin > > > wrote: > > You'r

Re: Possible to set server props when using AUTO_SERVER?

2012-05-30 Thread Thomas Mueller
Hi, You can't change the settings of the server from within the client. One solution might be to set the system properties in all applications that use the database. Regards, Thomas On Tuesday, May 29, 2012, h2_mad wrote: > Hi, > > Still wondering if you can set the fetch size and server cach

Re: LIMIT in JOINs above version 1.3.165

2012-06-01 Thread Thomas Mueller
Hi, Could you simplify your test case? See http://h2database.com/html/build.html#support Regards, Thomas On Fri, Jun 1, 2012 at 11:04 AM, Dani wrote: > Hi, > > again as I stated before the queries worked fine up to h2 version > 1.3.165 > With the higher versions they keep running till I cance

Re: Common table expressions

2012-06-04 Thread Thomas Mueller
Hi, See the documentation, under Advanced / Recursive Queries. Regards, Thomas On Wednesday, May 30, 2012, trho...@gmail.com wrote: > Are CTEs supported in the most recent release? Are they available in > alpha or beta condition? I am modeling graphs :( > > -- > You received this message becau

Re: Try to delete a record. The record is deleted but executeUpdate() always returns 0!

2012-06-04 Thread Thomas Mueller
Hi, Maybe the row was deleted before executing the statement? Could you provide a complete, simple, reproducible test case please? Regards, Thomas On Thursday, May 31, 2012, Jim wrote: > I am using H2 embeded database. > I try to delete a record from a table as follows: > > PreparedStatement s

Re: Create a simple table and compress data

2012-06-04 Thread Thomas Mueller
Hi, See the documentation for the functions COMPRESS and EXPAND, and the examples there. Regards, Thomas On Thursday, May 31, 2012, nolimit nolimit wrote: > Hi, > > I'm trying to create a simple table and compress the data in it. But I > don't really understand how to do it. Can someone give me

Re: Accessing an H2.db file inside a jar?

2012-06-04 Thread Thomas Mueller
Hi, See the documentation at Features / Read Only Databases in Zip or Jar File. Regards, Thomas On Thursday, May 31, 2012, Ryan How wrote: > I'm not sure on that sorry. What is the full exception? A NPE sounds a bit > odd, I would have thought you'd get something a bit more informative. > > On

Re: Possible to set server props when using AUTO_SERVER?

2012-06-04 Thread Thomas Mueller
losed [90007-167] when using auto_server and select * on > a table containing many LOBs > > Could i suggest this as a bug and be included in the next release? > > Thanks again > > > > On Wednesday, 30 May 2012 08:21:37 UTC+1, Thomas Mueller wrote: >> >> Hi, >

Re: Information to and problems with LOBs not in DB

2012-06-04 Thread Thomas Mueller
Hi, h2.lobInDatabase=false will not be supported in future versions of H2. If you need this feature, could you store the files in the filesystem yourself? Regards, Thomas On Wednesday, May 30, 2012, SME wrote: > I'm working on my problems posted above. So far, I found the following > answers:

Re: ODBC

2012-06-04 Thread Thomas Mueller
Hi, See the documentation: Advanced / ODBC Driver. Regards, Thomas On Tuesday, May 29, 2012, Carlos Crosetti wrote: > I will be installing the latst jBPM ebgine that comes with H2 - so > later on I would like to query the bpm DB by the means of doing > statnard ODBC connection and exceuting SQ

Re: Index corruption bug

2012-06-04 Thread Thomas Mueller
very 50 or so actions (which I'd guess > are inserts) we commit a transaction. > > Thanks! > > -Sandeep > > On Tuesday, May 8, 2012 11:43:21 PM UTC-7, Thomas Mueller wrote: >> >> Hi, >> >>> Not for me, unfortunately. Running 1.3.166, embedded in my ap

Re: LIMIT in JOINs above version 1.3.165

2012-06-04 Thread Thomas Mueller
Hi, I think this is due to issue 387: WHERE condition getting pushed into sub-query with LIMIT. I'm afraid you will not be able to use such subqueries any longer, and have to find a different way to solve this problem. I'm sorry. With "simple test case" I actually meant a "a short, self contained

Re: Slow operations above 500MB?

2012-06-04 Thread Thomas Mueller
Hi, This statement is superfluous now. It was added a long time ago (in 2007 or so), because few people used large databases at that time. Since then, a few smaller problems have been found and fixed, and I think this are is now reasonably stable. Quite many people use large databases now. I will

Re: init runscript with relative path ends in FileNotFoundException

2012-06-05 Thread Thomas Mueller
Hi, Did you try using an absolute path, as in ...;INIT=runscript from 'classpath:/com/acme/create.sql' ? Regards, Thomas On Sunday, June 3, 2012, michael.nitschke wrote: > Hi knut, > Thanks for your answer, this seems a good solution. But in my case the > configuration is done in an xml file

Re: LIMIT in JOINs above version 1.3.165

2012-06-05 Thread Thomas Mueller
Hi, Maybe you could ask at StackOverflow? It sounds like a generic SQL problem, not related to H2. It sounds like an interesting problem, there is a very good chance that people will help you there. Regards, Thomas On Mon, Jun 4, 2012 at 11:32 PM, Dani wrote: > Thank you Thomas for looking int

Re: Slow operations above 500MB?

2012-06-05 Thread Thomas Mueller
Hi, Depending on the operations, the embedded mode can be up to 6 times faster than the server mode. This is if the server is running on the same machine; localhost connections. If the server is on another machine, the difference might be even bigger. This is according to the performance test at h

Re: LIMIT in JOINs

2012-06-06 Thread Thomas Mueller
Hi, Why so complicated, why don't you just use a simple join? SELECT * FROM TICKER INNER JOIN ANLKURSE AS LETZTER ON .. INNER JOIN ANLKURSE AS VORLETZTER ON ... ORDER BY ... LIMIT 1 Again, please use StackOverflow for such questions. The H2 Group is not the right place for basic SQL join questio

Re: init runscript with relative path ends in FileNotFoundException

2012-06-06 Thread Thomas Mueller
file.FileURLConnection.connect(Unknown > Source) >        at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown > Source) >        at java.net.URL.openStream(Unknown Source) >        at > org.h2.store.fs.FileSystemDisk.openFileInputStream(FileSystemDisk.java: > 397) > > > > R

Re: Digest for h2-database@googlegroups.com - 2 Messages in 1 Topic

2012-06-10 Thread Thomas Mueller
Hi Carlos, Please do not reply to digest mails, as this will use the wrong subject ("Re: Digest for h2-database@googlegroups.com..."). Please always use an appropriate subject line. Regards, Thomas On Mon, Jun 11, 2012 at 1:08 AM, Ryan How wrote: > ~/ means the home directory for the user.

Re: Transfer "In-Memroy" DB to physical file

2012-06-11 Thread Thomas Mueller
Hi, You could use the SCRIPT TO '' statement. Regards, Thomas On Sunday, June 10, 2012, Matthias wrote: > Hi > id like to know if there is an "easy" way to transfer all data from an > in-memory database to a physical file. Background: I want to use H2 as > the data sink for my private program

Re: Sorting with index

2012-06-11 Thread Thomas Mueller
Hi, Reading in descending order is possible now, but I guess it will be much slower. Regards, Thomas On Friday, June 8, 2012, Noel Grandin wrote: > On Fri, Jun 8, 2012 at 6:11 PM, Petr Holik > > wrote: > > Should not be this enhancement request? It is very often request in web > > application

Re: DB file size issue

2012-06-11 Thread Thomas Mueller
Hi, If the application is leaving transaction open is there any > information from these logs that can lead me to which connections are > having an issue? > You see the connection number in the transaction log. But this number isn't very helpful I guess. More helpful are the actual transactions

Re: Bug in FullText

2012-06-11 Thread Thomas Mueller
Hi, > UUID because it has jdbc type Types.BINARY Well, unless I'm mistaken there is no java.sql.Types.UUID (not even in Java 7). An instanceof check sounds like a hack, but I don't currently see a way around using it. So I suggest to use an instanceof check. By the way, using randomly UUIDs as

Re: Slow operations above 500MB?

2012-06-11 Thread Thomas Mueller
Hi, If I combine both, some will say it's comparing apples to oranges... I think I will keep the current layout for now. Regards, Thomas On Tuesday, June 5, 2012, Joachim Durchholz wrote: > Am 05.06.2012 20:11, schrieb Thomas Mueller: > >> Hi, >> >> Depending on

Re: Select campo de fecha tipo BIGINT

2012-06-11 Thread Thomas Mueller
Hi, Please write questions in English. Regards, Thomas On Tuesday, June 5, 2012, Javier wrote: > Alguien me puede ayudar, cómo realizo un select haciendo filtro por > fecha, los valores del campo se almacenan BIGINT y queda algo así: > 1334878337090 > Gracias. > > -- > You received this messag

Re: Try to delete a record. The record is deleted but executeUpdate() always returns 0!

2012-06-13 Thread Thomas Mueller
Hi, > I can send you a test case, but just to be sure what do you mean when > you say that the "row was deleted before executing the statement"? What I mean is that the row you tried to delete in 2) didn't actually exist at the time the delete statement was run. Maybe it was deleted before, or ne

Re: Read-only and multi threading

2012-06-13 Thread Thomas Mueller
Hi, Whatever you try to do here, don't use FILE_LOCK=NO. It doesn't do what you want (see the docs). What you should do first is to use a profiler to find out where the bottleneck is. See http://h2database.com/html/performance.html#built_in_profiler Regards, Thomas On Mon, Jun 11, 2012 at 11

Re: Bug in FullText

2012-06-13 Thread Thomas Mueller
Hi, >> there is no java.sql.Types.UUID > Hmm, I was sure that such a constant exists but it really does not. Yes, I also thought so first. To me it looks like an omission in the specification. > Ok, I fixed it with instanceof, added test and committed to trunk. Thanks a lot! I will also add an

Re: In-memory fulltext search

2012-06-13 Thread Thomas Mueller
Hi, I didn't know about the RAMDirectory, nice. The patch looks good, please apply it. It might break some of the built-in tests (probably the line too long test when running "./build.sh docs") but I will fix that, not a problem. Thanks a lot! Regards, Thomas On Wed, Jun 13, 2012 at 1:14 AM, S

Missing LOB issue

2012-06-14 Thread Thomas Mueller
Hi, I'm not sure (well, I don't think) the problem here is the limit on the number of LOBs per result set. It might be something completely different. Is it reproducible with a newly created database? If it's an existing database, could you find out which version was used to create the database?

Re: Missing LOB issue

2012-06-14 Thread Thomas Mueller
Hi, Is there any other info you need? > Hm, a simple, reproducible test case would be great... ;-) Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to h2-database@googlegroups.com. To unsubscrib

Re: Multi statement JDBC query, getMoreResults() and getUpdateCount() issue.

2012-06-18 Thread Thomas Mueller
Hi, I suggest to use only one statement per Statement.execute. This way your application is not dependent on a specific database (at least in this regard). I would rather not support returning multiple result sets per statement in H2 if possible, because the potential benefit sounds too small com

Re: Sorting with index

2012-06-18 Thread Thomas Mueller
Hi, Hooray! > Since which version? > 167 or an upcoming? > It's possible since quite a long time actually (function Cursor.previous()). However, this is not used internally to support "order by desc". It is only used for a few edge cases (select max(...) if there are null entries at the end). It

Re: Need escape character for apostrophe

2012-06-18 Thread Thomas Mueller
Hi, The escape character for an apostrophe is a single apostrophe, as in Oracle. Regards, Thomas On Tue, Jun 19, 2012 at 7:44 AM, Guys wrote: > Hello > > I have a table with a varchar2 column that should contain sql statement. The > problem is that if the sql statement contains an apostrophe "'

Re: H2 running in Tomcat 7 produces memory leak reports in tomcat's detection mechanism

2012-06-21 Thread Thomas Mueller
Hi, > I stop Tomcat using $CATALINA_HOME/bin/shutdown.sh and I occusionally > expererience that the .lock.db file is not deleted. What happens if you delete this file? Does it stay deleted, or does it re-appear after a few seconds? If it stays deleted, then the database was not closed but the pro

Re: Object serialization in ValueJavaObject

2012-06-21 Thread Thomas Mueller
Hi, I'm sorry for the delay. Yes, this would be a nice feature, not just for in-memory databases. The easiest solution for a "feature switch" would be a system property, but a database level setting would be better of course. I would probably try to use the ValueJavaObject class, maybe add a new

Re: Taking more time when a query is executed in memory, than it is not not executed in memory

2012-06-22 Thread Thomas Mueller
Hi, Thanks! The query is really complicated. Could you try to simplify the test case to the bare minimum? Regards, Thomas On Mon, Jun 18, 2012 at 4:33 PM, Vinod wrote: > Hi, > > I would appreciate any help on the issue that I am facing where a query is > taking more time when executed in memo

Re: Using XPath expressions?

2012-06-22 Thread Thomas Mueller
Hi, > does H2 support extracting data from XML using an XPath expression? > Something like MySQL's ExtractValue [1] function? No, but you could write a Java function that does that: http://h2database.com/html/features.html#user_defined_functions Regards, Thomas -- You received this message bec

Re: Special characters in DB file name?

2012-06-22 Thread Thomas Mueller
Hi, On Wed, Jun 13, 2012 at 9:31 AM, toolforger wrote: > The JDBC URL is a string which includes a file pathname. > What will happen if that name contains special characters, such as > - blanks > - colons > - semicolons > - control codes? The same as if you try to create such a file. > My use c

Re: H2 running in Tomcat 7 produces memory leak reports in tomcat's detection mechanism

2012-06-22 Thread Thomas Mueller
;s > correct and OK. " > > > Am Donnerstag, 21. Juni 2012 22:41:15 UTC+3 schrieb Thomas Mueller: >> >> Hi, >> >> > I stop Tomcat using $CATALINA_HOME/bin/shutdown.sh and I occusionally >> > expererience that the .lock.db file is not deleted. >>

Re: in-memory db issue with JTA and non-auto-commit

2012-06-22 Thread Thomas Mueller
Hi rajandeepvij, Please don't hijack Steves thread. Please use a new subject. > I have following settings in my persistence.xml, but still data isn't there. > jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE Well, this is an in-memory database. Regards, Thomas -- You received this message because

Re: Update into the unique index from different sessions with MVCC mode

2012-06-25 Thread Thomas Mueller
Hi, Thanks a lot for reporting the bug, and the excellent patch! And sorry for the delay. The patch (plus a test case) will be applied in the next release. Regards, Thomas On Tuesday, May 22, 2012, teruo wrote: > Hi > I changed the way to fix this. > > Using undo log and rollback method seems

Re: Bug: CREATE INDEX on read-only database

2012-06-25 Thread Thomas Mueller
Hi, Thanks a lot! This will be fixed in the next release. Regards, Thomas On Wednesday, June 20, 2012, wburzyns wrote: > The DB is created. Tables, sequences and indexes are created all with > 'IF NOT EXISTS' phrase. > > The code for DB opening shares some procedures with the code that > creat

Re: INOUT stored procedure parameters

2012-06-26 Thread Thomas Mueller
Hi, I'm not sure, but I guess it's a JVM / classpath problem. Which JVM do you use? The database tries to compile the class using the class "com.sun.tools.javac.Main" if available (which means the H2 jar file is most likely in the classpath). If it is not available, then it will try using a new p

Re: Editing in web-interface has problems with double qoute

2012-06-26 Thread Thomas Mueller
Hi, Thanks a lot for fixing this issue! I have now added support for editing multi-line values / documents. Regards, Thomas On Mon, Jun 25, 2012 at 3:42 PM, Noel Grandin wrote: > Thanks, this will be fixed in the next version. > > (It's still not perfect, I didn't try to handle line breaks, bu

Re: Connection Properties

2012-06-26 Thread Thomas Mueller
Hi, > Is there any way to access the value of a connection property via H2's SQL > grammar? Yes, most settings can be read using: select * from information_schema.settings Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To

Re: Special characters in DB file name?

2012-06-26 Thread Thomas Mueller
Hi, >> Isn't this a security problem? > Not for my use case, where the db is created by a local user within his home > directory :-) You need to make sure things like "./../../test" is not allowed. But you also need to filter backslash, and possibly other characters, specially escape sequences (s

Re: INOUT stored procedure parameters

2012-06-26 Thread Thomas Mueller
Hi, Hm, I wonder what is the easiest way to reproduce the problem... > IIUC the problem is really the classpath given to com.sun.tools.javac.Main. > Or most likely the lack thereof. Yes, most likely. Do you use a special classloader environment (a web server, OSGi,...)? > I am using the Oracle

Re: Android - Table "ARTICLE" not found Error

2012-06-27 Thread Thomas Mueller
Hi, Most likely the table was not created, or it was created in a different database (a different path). What is your database URL? I suggest to use an absolute path, for example jdbc:h2:/data/db/test. Using a relative path such as jdbc:h2:test is a common reason for such problems. Regards, Thom

Using Bind Variables - incorrect results

2012-06-27 Thread Thomas Mueller
Hi, I suggest not to use varchar, or cast as appropriate. Another suggestion is to use 1.0 instead of 1 if you want the result to be decimal. drop table test; create table test(id int); insert into test values(0); select 1 - '0.1' from test; --> H2 (no matter which mode is used), Data conversion

Re: Using Bind Variables - incorrect results

2012-06-27 Thread Thomas Mueller
Hi, > I am sure, that I will not be able to modify these queries. If you write code that only works with Oracle and no other database, then well, you need to use Oracle. It seems only Oracle works they way you want it, and no other database I have tested (PostgreSQL, Apache Derby, HSQLDB, H2). It

Re: Using Bind Variables - incorrect results

2012-06-28 Thread Thomas Mueller
n convert to integer fails. > > Thanks, > Vinod > > On Wednesday, June 27, 2012 3:50:59 PM UTC-4, Thomas Mueller wrote: >> >> Hi, >> >> > I am sure, that I will not be able to modify these queries. >> >> If you write code that only works with

Re: Cache on a H2 Server with multiple Databases

2012-06-28 Thread Thomas Mueller
Hi, Does each database have its own cache Yes. > or do they share a cache-pool No. Spezifically I need to know if consolidating several embedded databases > with separate caches into a single server will change anything in the > caching. > You could combine the databases, or manage the cac

Re: Adding Identity Colum, Getting Timeout trying to lock table SYS [HYT00-60]

2012-06-28 Thread Thomas Mueller
Hi, > Timeout trying to lock table SYS [HYT00-60] That would mean you are using H2 version 1.0.60, from 2007-10-20. I suggest to update to a recent version of H2. Regards, Thomas On Monday, June 25, 2012, Ryan wrote: > Hello, > > I'm trying to add an ID column to my database without creating

Re: Obtaining the current size of a database

2012-06-28 Thread Thomas Mueller
Hi, Yes you could use: select (select cast(value as bigint) from information_schema.settings where name = 'info.PAGE_COUNT') * (select cast(value as bigint) from information_schema.settings where name = 'info.PAGE_SIZE') as fileSize; Regards, Thomas On Thu, Jun 28, 2012 at 11:25 PM, John Hendri

Re: Many to many table in defined Schema not found & Hibernate

2012-06-29 Thread Thomas Mueller
Hi, This doesn't sound like a problem within H2. I guess people at StackOverflow could help you better. However you will need to provide more info (the configuration for example, and a simple, reproducible test case). Regards, Thomas On Tuesday, June 26, 2012, Mahdi louati wrote: > > > I encou

Re: Special characters in DB file name?

2012-06-29 Thread Thomas Mueller
Hi, Eh, nope. It's a _local_ user. These can access ./../../test anyway. > OK, that's fine then. > Of course, you want to have something like prepared statements. This doesn't work for the database URL. Regards, Thomas -- You received this message because you are subscribed to the Google Gro

Re: Add column unique

2012-06-29 Thread Thomas Mueller
Hi, I think you are right, the syntax doesn't work as documented. I'm afraid we will have to either (a) implement it, or (b) change the documentation. Currently I think (b) is OK. What you could do is create a constraint. The result is not different than if you would use "unique" when creating th

Re: Is possible to use UTF8 in memory database on Windows OS?

2012-06-29 Thread Thomas Mueller
Hi, > I suppose that memory database use CP1252. No, H2 supports Unicode. I am sure this is not a problem within H2. > Fileencoding has nothing to do with database. Yes. > If you having Problems in the > browser it is most likeley a problem of wron encoding information in header > and or html

Re: Is possible to use UTF8 in memory database on Windows OS?

2012-06-29 Thread Thomas Mueller
the > database, perhaps the problems are there. > > Cheers, > Juan > > 2012/6/29 Thomas Mueller >> >> Hi, >> >> >  I suppose that memory database use CP1252. >> >> No, H2 supports Unicode. I am sure this is not a problem within H2. >&

Re: command line for H2

2012-07-02 Thread Thomas Mueller
Hi, > In Derby I use command line which is more comfortable than console. You mean the Derby ij command line tool is more confortable than the browser based H2 Console tool? > Is there a way to use command line in H2? Yes, the Shell tool: http://h2database.com/html/tutorial.html#shell_tool Reg

Re: Round function - rounding to 0 decimal places

2012-07-04 Thread Thomas Mueller
Hi, ROUND isn't about formatting, it's really only about the mathematical rounding part. Regards, Thomas On Fri, Jun 29, 2012 at 8:40 PM, Vinod wrote: > I am facing a round function related issues while rounding to 0 decimal > places: > > SELECT ROUND(10.128) FROM DUAL > OutputExpected: 10, Ou

Re: Round function - rounding to 0 decimal places

2012-07-04 Thread Thomas Mueller
Hi, Maybe what you are looking for is CAST: CAST(10.6 AS BIGINT) or CAST(ROUND(10.6, 0) AS BIGINT) Regards, Thomas On Thu, Jul 5, 2012 at 7:44 AM, Thomas Mueller wrote: > Hi, > > ROUND isn't about formatting, it's really only about the mathematical > rounding part.

  1   2   3   4   5   6   7   8   9   10   >