History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-489
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: James House
Reporter: Jasper Rosenberg
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

HSQLDB booleans broken for version 1.7.2+

Created: 20/Jul/06 05:34 AM   Updated: 21/Oct/07 02:59 PM
Component/s: Job Stores
Affects Version/s: 1.6, 1.5.2
Fix Version/s: 1.6.1

Environment: HSQLDB


 Description  « Hide
http://forums.opensymphony.com/thread.jspa?forumID=6&threadID=37886

Description of boolean handling in hsqldb:
http://www.hsqldb.org/doc/guide/ch02.html#N1045F

In addition, as mentioned in the forum post, "sql.enforce_strict_size=false" was the legacy behavior, so I suspect what was previously happening was that even though the boolean columns were declared as varchar(1), the longer values "true"/"false" were being allowed.

Seems like we have a couple options:
1. Modify the hsqldb script as described and test backwards compatibility to < 1.7.2 as well
2. Create a hsqldb 1.7.2+ db table script as described to be used for 1.7.2 (probably rename current to "legacy"?)
3. Change the booleans to be varchar(5) so the explicitly fit "true"/"false"

Unless we have someone who wants to setup an old hsqldb database for testing, I lean towards 2.

 All   Comments   Change History      Sort Order:
Henri Yandell - [02/Apr/07 01:52 AM ]
Looking at the documentation for hsqldb 1.7.0 (released 2002), BIT was a supported type back then that mapped to boolean and java.lang.Boolean.

So I think this change is very safe. Attempting to test to confirm.

Henri Yandell - [02/Apr/07 03:03 AM ]
Testing against HSQL 1.8.0.7, I can't replicate the error. Instead I get a working test that happily puts a 'true' into the IS_STATEFUL column. My test uses the reporters quartz.properties and source code, the only difference is that as they didn't attach their Job I have made a simple StatefulJob that prints out a log statement.

I get the same with 1.7.2.11, except that I'm unable to use the sqlTool to check to see if the IS_STATEFUL column is true or not (problem in hsqldb I presume).

One thing I did notice is that hsql seems to be case-sensitive and I had to pass the table_hsqldb.sql script through `tr`.

I'll have to dig on 1.7.0 and 1.7.1 to figure out how to test with them, looks like 1.7.2 saw a bit of a change (in that I can run java -jar to load data with them). Not much point doing that if I can't replicate the error though. Any thoughts on how? Seems to me that just putting a StatefulJob in the database should be enough.

Jasper Rosenberg - [02/Apr/07 06:10 AM ]
Hey Henri,

Looking back at the original forum post, it seemed that the issue really was around whether HSQL will work with varchar(1) as a boolean if sql.enfirce_strict_size is true. If it does not, as the user suggested, then I would go ahead and make the change to BIT so we do not have to worry about a user setting this flag or not.

Thanks,
Jasper

Henri Yandell - [02/Apr/07 01:55 PM ]
I'll give it another shot with that parameter turned on (for some reason I was thinking that was set to true by default in 1.7.2 and thus the problem).

If so, then I'll have a go with the various versions with BIT and see if it errors.

Henri Yandell - [13/Apr/07 11:36 AM ]
I wasn't able to replicate it, so I'm probably still not getting something right in the replication.

James House - [21/Oct/07 02:57 PM ]

I also cannot reproduce this. using 1.7.2.11 or 1.8.0.8.

I going ahead and closing this issue. If any users come across the problem, hopefully they'll find this and/or the forum to find their work-around.

James House - [21/Oct/07 02:58 PM ]
(forgot to set fixtype to "cannot reproduce" instead of "fixed")