Bug 381771

Summary: some database breaks on the hsqldb shipped with fc8 (hsqldb-1.8.0.8-1jpp.4.fc8)
Product: [Fedora] Fedora Reporter: A. Folger <afolger>
Component: hsqldbAssignee: Deepak Bhole <dbhole>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: fnasser, jprindiv
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-08 18:38:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description A. Folger 2007-11-14 08:26:37 UTC
Description of problem:
When opening one of my databases, which worked just fine in fc7, oobase 
refused to connect to the data source, reporting a error message that a 
particular view could not be executed.

Version-Release number of selected component (if applicable):
hsqldb-1.8.0.8-1jpp.4.fc8

How reproducible:
every time

Steps to Reproduce:
1. open oobase, select troublesome database
2. click tableson left pane
3. get error message
  
Actual results:
error message

Expected results:
Tables and views become available

Additional info:
The view that seems to cause the problem is rather complex, making it hard to 
debug. As it is hard to debug by editing repeatedly the zipped xml file that 
is oobase's native format, and as the file is critical in my work right now, I 
just forced a downgrade to hsqldb-1.8.0.7-2jpp.2, without touching any other 
files, and lo and behold, the database works.

Unfortunately, under these circumstances, debugging the view is like searching 
a needle in a haystack, so I will for the while have to suffice with the 
following guess:
I use a large UNION SELECT statement and lots of IFNULL and CASE WHEN 
statements.
If any of the above changed recently, that could be the reason for what 
happened.

Comment 1 A. Folger 2008-05-08 18:38:02 UTC
Today, after making a backup, I 
modified my database file by removing the offending view, upgraded hsqldb, 
and tried to see what the problem was. I resolved the bug, for me, for now, 
but have no idea what the issue is.

Essentially, there was a view which was considered offensive by the upgraded 
hsqldb. After removing it and upgrading, closing and reopening OOo, I could 
at first NOT recreate that view. An error message kept on propping up, which, 
because the error box could not be resized, I could not read in its entirety. 
However, it was a Java error.

After removing more and more statements, I finally managed to figure out that 
there was no specific SQL statement that was offensie. Rather, there was a 
particular table (actually, it's a view) that the view editor did not like, 
and whenever I would create a view of that view, it would refuse to save the 
new, secondary view. Yet, I could save views of other views and tables.

Somehow, after playing with OOo a bit, closing and opening and saving and 
rebooting (I was also working on a Wine project and the automounter didn't 
seem happy), suddenly I managed to create the view I wanted and save it. Now 
everything works fine.

As the issue is now resolved for me, I will suggest to close the bug.