You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2007/05/23 03:13:16 UTC

[jira] Reopened: (DERBY-1783) Logical error in code for determining mode for opening of log files

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

Myrna van Lunteren reopened DERBY-1783:
---------------------------------------


> Logical error in code for determining mode for opening of log files
> -------------------------------------------------------------------
>
>                 Key: DERBY-1783
>                 URL: https://issues.apache.org/jira/browse/DERBY-1783
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.2.1.6
>         Environment: JVM 1.4.2 and later
>            Reporter: Olav Sandstaa
>         Assigned To: Olav Sandstaa
>            Priority: Trivial
>             Fix For: 10.2.1.6, 10.2.2.0, 10.3.0.0
>
>         Attachments: rwsync.diff
>
>
> There is a logical error in the following function in DirFile4.java
> for determining which mode to use when opening a new log file:
>     public StorageRandomAccessFile getRandomAccessFile( String mode) throws FileNotFoundException
>     {
>         // Assume that modes "rws" and "rwd" are not supported.
>         if(!rwsOK && "rws".equals( mode) || "rwd".equals( mode))
>             mode = "rw";
>         return new DirRandomAccessFile4( (File) this, mode);
>     } // end of getRandomAccessFile
> The expression in the if test is missing parentheses around the OR
> expression making it return the wrong value for one case. If "rwd"
> mode is requested for the file (and this is supported by the JVM), the
> file is opened with "rw" instead of "rwd".
> NOTE: this bug does not effect any current Derby versions since as far
> as I know "rwd" is never used for log files. I came across it when
> experimenting with using "rwd" for the log.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.