Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
10.4.2.0
-
None
-
------------------ Java Information ------------------
Java Version: 1.6.0_06
Java Vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jre1.6.0_06
Java classpath: C:\Working\Derby-fileclose-fix\bin;C:\Working\Derby-fileclose-fix\lib\derby.jar
OS name: Windows XP
OS architecture: x86
OS version: 5.1
Java user name: Administrator
Java user home: C:\Documents and Settings\Administrator
Java user dir: C:\Working\Derby-fileclose-fix
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
--------- Derby Information --------
JRE - JDBC: Java SE 6 - JDBC 4.0
[C:\Working\Derby-fileclose-fix\lib\derby.jar] 10.4.2.0 - (689064)
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------------------------ Java Information ------------------ Java Version: 1.6.0_06 Java Vendor: Sun Microsystems Inc. Java home: C:\Program Files\Java\jre1.6.0_06 Java classpath: C:\Working\Derby-fileclose-fix\bin;C:\Working\Derby-fileclose-fix\lib\derby.jar OS name: Windows XP OS architecture: x86 OS version: 5.1 Java user name: Administrator Java user home: C:\Documents and Settings\Administrator Java user dir: C:\Working\Derby-fileclose-fix java.specification.name: Java Platform API Specification java.specification.version: 1.6 --------- Derby Information -------- JRE - JDBC: Java SE 6 - JDBC 4.0 [C:\Working\Derby-fileclose-fix\lib\derby.jar] 10.4.2.0 - (689064) ------------------------------------------------------ ----------------- Locale Information ----------------- ------------------------------------------------------
-
High Value Fix
-
Crash
Description
When Derby encounters a corrupt data file, it does not close the data file before throwing an exception to the caller. If the user tries to replace the database with a backup in response to the corruption, Derby will first attempt to delete the contents of the corrupt database. But since the corrupt file was never closed, it cannot be deleted, and Derby fails to start.
The attached java code should reproduce the problem, and the attached patch should fix it.