[ 
https://issues.apache.org/jira/browse/DERBY-4589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-4589:
---------------------------------

    Attachment: derby-4589-01-ab-missingServiceProperties.diff

Attaching derby-4589-01-ab-missingServiceProperties.diff. This patch adds an 
error message for the case when the database directory exists but it is missing 
service.properties. I am running regression tests now.

I agree with Mike's analysis on DERBY-4733. We should not delete a directory 
just because it is missing the files which signify an intact database. The best 
we can do is raise an error suggesting that the problem might be that Derby 
crashed during database creation. It should remain the user's responsibility to 
throw away the half-created database and try again.

Touches the following files:

----------------

M      
java/engine/org/apache/derby/impl/services/monitor/StorageFactoryService.java

Raise a special error if the database directory exists but it is missing 
service.properties.

----------------

M      java/engine/org/apache/derby/loc/messages.xml
M      java/shared/org/apache/derby/shared/common/reference/SQLState.java

Special error message suggesting that Derby may have crashed during database 
creation.

----------------

A      
java/testing/org/apache/derbyTesting/functionTests/tests/lang/HalfCreatedDatabaseTest.java
M      java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java

Test for this error condition.


> Corrupted database prevents startup and should be automatically repaired 
> perhaps
> --------------------------------------------------------------------------------
>
>                 Key: DERBY-4589
>                 URL: https://issues.apache.org/jira/browse/DERBY-4589
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.5.3.0
>         Environment: Windows 2000, SP4. J2SE 1.6
>            Reporter: Jeff Mckenzie
>         Attachments: 2010-03.zip, Test_4589.java, Test_4589.java, 
> derby-4589-01-ab-missingServiceProperties.diff
>
>
> I have found a database in my application that prevents startup due to it 
> being corrupted. 
> The driver reports that the database does not exist, even though it does. 
> Then when my app tries to create the database using ;create=true; on the URL 
> it fails.
> I think this happened due to the app being killed in Task Manager while it 
> was creating the database.
> I have the database saved so that you can reproduce the problem. (I'm not 
> sure if I can attach it yet)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to