Re: [h2] Maven repository

2015-04-11 Thread bocher
Hi,

Thanks.

Erwan

Le samedi 11 avril 2015 20:08:17 UTC+2, Thomas Mueller a écrit :
>
> Hi,
>
> Thanks! My mistake, I didn't copy all the files... I fixed it now, but it 
> will take some more time until it is synchronized.
>
> Regards,
> Thomas
>
>
> On Sat, Apr 11, 2015 at 4:29 PM, bocher 
> > wrote:
>
>>
>> Dear Thomas,
>>
>> The maven repository contains only the sources for the last release 
>> 1.4.187 (http://repo2.maven.org/maven2/com/h2database/h2/1.4.187/).
>>
>> Could you update it ?
>>
>> Thanks a lot
>>
>> Cheers
>>
>> Erwan
>>
>> -- 
>> 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 http://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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Migrated to Github

2015-04-11 Thread Cecil Westerhof
2015-04-10 21:51 GMT+02:00 Thomas Mueller :

> The source code of H2 is now migrated to Github:
> https://github.com/h2database/h2database
>

​I see that there are files to start h2 as a service on Windows. Here the
two files I use to start h2 as a service on Linux with systemd.

Of-course the values MAX and MIN have to be changed depending on the usage
that is made of h2.​

-- 
Cecil Westerhof

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


h2.service
Description: Binary data


startH2.sh
Description: Bourne shell script


Re: [h2] First query very expensive

2015-04-11 Thread Cecil Westerhof
2015-04-09 13:07 GMT+02:00 Noel Grandin :

> That's cache warmup, basically.
>
> The only way to circumvent this is to warm up the caches yourself.
> If you are running some kind of long-lived server application, it's fairly
> normal to run a thread at startup that executes some common queries to warm
> up the caches.


​I tried that, but not with much success until now. One problem is that
after restarting the server I do not have the delay any-more. (What I do
not understand.) So to test my changes I need to do a complete reboot.
Something to look into if I have a little bit more time.

The way I start the service is with:
#!/usr/bin/env bash

# An error should terminate the script
set -o errexit
set -o nounset


# Always define all used variables
# I use uppercase for readonly variables
declare -r H2_JAR=/var/lib/h2/jars/h2-current.jar
declare -r LOGFILE="/var/lib/h2/Logging/H2_$(date +%FT%H-%M).log"
declare -r MAX=8912M
declare -r MIN=4096M


# main code
if [[ "$(whoami)" != "h2" ]] ; then
printf "This script should be run as h2 user\n"
exit 1
fi

# Limit memory usage
# Description in startShowMemory.sh
/usr/bin/java -Xloggc:"${LOGFILE}" \
  -XX:+PrintGCDateStamps \
  -Xms"${MIN}" \
  -Xmx"${MAX}" \
  -cp "${H2_JAR}" \
  org.h2.tools.Console \
  -ifExists \
  -tool \
  -tcp


>
> On 2015-04-09 12:13 PM, Cecil Westerhof wrote:
>
>> The first time I send a query to H2 it takes around 25 seconds. All
>> subsequent queries are ready in less as a second. Is
>> this normal? Can I circumvent this?
>>
>
-- 
Cecil Westerhof

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] H2 seems to create a huge number of orphan lobs since 1.4.183.

2015-04-11 Thread Kenton Garner
Thomas, what did you decide to do for this? 

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Maven repository

2015-04-11 Thread Thomas Mueller
Hi,

Thanks! My mistake, I didn't copy all the files... I fixed it now, but it
will take some more time until it is synchronized.

Regards,
Thomas


On Sat, Apr 11, 2015 at 4:29 PM, bocher  wrote:

>
> Dear Thomas,
>
> The maven repository contains only the sources for the last release
> 1.4.187 (http://repo2.maven.org/maven2/com/h2database/h2/1.4.187/).
>
> Could you update it ?
>
> Thanks a lot
>
> Cheers
>
> Erwan
>
> --
> 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 http://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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Support to "EXTERNAL" table type

2015-04-11 Thread bocher

Dear Thomas and Noël,

I sent a PR to support the "EXTERNAL" table type.

Cheers

Erwan

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] How to extract the where clause from a Select object?

2015-04-11 Thread Pablo Beltran
Hi,

Given a SQL quer... how to get the where clause? 

...
String sql = "select * from T where col1=value1 and col2=value2 or 
col3=value3";
Parser parser = new Parser(session);
Select select = (Select) parser.prepare(sql);

String where = ...

//How to get the where clause? "col1=value1 and col2=value2 or col3=value3"

Thanks!
Pablo.

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Has the behaviour of INFORMATION_SCHEMA.FUNCTION_COLUMNS changed?

2015-04-11 Thread Lukas Eder
Consider the following class / method:

// Java
package org.jooq.test.utils.h2;

public class F {
public static Integer fOne() {
return 1;
}
}

-- SQL
CREATE ALIAS f_one FOR "org.jooq.test.utils.h2.F.fOne";

Now consider the following queries:

-- Version 1.3.176
SELECT pos
FROM information_schema.function_columns
WHERE UPPER(alias_name) = 'F_ONE'

++
| POS|
++

-- Version 1.4.186
SELECT pos
FROM information_schema.function_columns
WHERE UPPER(alias_name) = 'F_ONE'

++
| POS|
++
|   0|
++

Am I right assuming that somewhere in between, the return value of a stored 
function has now become a row in the function_columns table with position 
zero?

I couldn't find any reference to such a change in the changelog... (
http://www.h2database.com/html/changelog.html)

Cheers,
Lukas

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Maven repository

2015-04-11 Thread bocher

Dear Thomas,

The maven repository contains only the sources for the last release 1.4.187 
(http://repo2.maven.org/maven2/com/h2database/h2/1.4.187/).

Could you update it ?

Thanks a lot

Cheers

Erwan

-- 
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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] GRANT SCHEMA Feature

2015-04-11 Thread Rami Ojares
I have implemented for myown use a user defined function that has the 
following syntax:
F.GRANT_RIGHTS('comma_separated_list_of_rights', 
'*|comma_separated_list_of_schemas', '*|comma_separated_list_of_users')
With this you can grant a set of rights to any number of schemas to any 
number of users.

The implementation was 30-40 lines.

The problem is that when I do development I have to run my GRANT_RIGHTS 
statement over and over again when I drop and recreate a table (with 
some changes).
So the useful feature would be that giving rights to all objects in a 
schema would mean all objects now and in the future.


If someone else starts creating new tables in the same db for some other 
purpose then it would make sense that he would create a new schema for 
that new purpose, no?


- Rami


On 10.4.2015 21:40, Fred&Dani&Pandora&Aquiles wrote:

Hi Noel,

I studied the behavior of proposed feature in other databases 
(postgres, mysql, derby and hsqldb). However, only postgres and mysql 
allowed me to execute the grant action in the whole schema. Well, 
postgres has a similar behavior to the patch submitted and I think 
that mysql acts like you expects. Please, can you confirm the expected 
behavior with the attached test case?


My initial idea was to allow the permission grant for all tables of a 
given schema more easily, as in postgres. Besides, I thought in a 
situation where you have an schema initially loaded with some tables, 
and this schema can be shared by different users. However, an user X 
do not need, necessarily, to have access in all tables. So, you grants 
the permissions to X in the schema, and later, another tables are 
added to satisfy other applications and different users. Don't you 
think this could lead to a security breach, once the permissions to 
the user X will be 'automatically' granted. What you think about this?


Regards,

Fred


2015-04-09 8:06 GMT-03:00 Rami Ojares >:



Before I proceed with this, I need understand better your
expectations.


I understood Noel in the following fashion:

Let's say I have Table A in Schema X.
I grant update privileges to User U.
Someone creates table B in schema X.
User U tries to update table B but has no privileges.
I am confused because I explicitly told H2 that user U should have
update privileges for all objects in Schema X.

- Rami


-- 
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 http://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 http://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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: Migrated to Github

2015-04-11 Thread Steve McLeod
Hi Thomas,

This is very good news. Some questions:

* Have you decided on a workflow for Git? That is, will we still submit 
patches via this Google Group? Or will we change to feature branches 
accompanied with requests to merge the branch into a 'master' branch or 
'develop' branch? Or will we make pull requests of personal forks?

* I noticed that the list of committers have been migrated to. Does that 
mean that the committers can push to GitHub? 

* As Git makes it much easier to keep two versions active, I'd be very 
happy if we could have an active 1.3.x branch, into which some fixes and 
improvements can be merged, until 1.4 is no longer in beta. For example, a 
couple of months ago I found the performance problem with converting column 
names into upper case, using Locale.ENGLISH, and you patched 1.4 with a 
fix. I don't think 1.4 is ready for our application, but I'd love to 
benefit from that performance improvement in 1.3. Would you consider having 
an active 1.3 branch?

Regards,

Steve


On Saturday, 11 April 2015 03:51:54 UTC+8, Thomas Mueller wrote:
>
> Hi,
>
> The source code of H2 is now migrated to Github: 
> https://github.com/h2database/h2database
>
> The list of issues could not be migrated, I hope I can still do that, but 
> if not I guess it's not a big issue.
>
> The links from the web page will need to be changed.
>
> 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 http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.