DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37583>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37583

           Summary: RDBMS store not retrieving revision descriptors
                    correctly.
           Product: Slide
           Version: Nightly
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Stores
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


The successors SQL query in StandardRDBMSAdapter.java appears to be wrong.  If
you perform a load of a store using this class than contains a branch , then try
to make a new branch (ie. you have 1.0, 1.0.1.0, and 1.1 and you try to make
1.0.2.0), you will get an Internal Server Error (500) as it will try to create
1.0.1.0 again.

The issue is in the retrieveRevisionDescriptors() method, line 955
The query is 

"select distinct pvh.REVISION_NO from VERSION_HISTORY vh, VERSION_HISTORY pvh,
VERSION_PREDS vp, URI u where pvh.VERSION_ID = vp.VERSION_ID and vp.VERSION_ID =
vh.VERSION_ID and vh.URI_ID = u.URI_ID and u.URI_STRING = ? and vh.REVISION_NO 
= ?"

but this will only return the revision_no passed in.  It seems like it should 
be 

"select distinct pvh.REVISION_NO from VERSION_HISTORY vh, VERSION_HISTORY pvh,
VERSION_PREDS vp, URI u where pvh.VERSION_ID = vp.PREDECESSOR_ID and
vp.VERSION_ID = vh.VERSION_ID and vh.URI_ID = u.URI_ID and u.URI_STRING = ? and
vh.REVISION_NO = ?"

(ie vp.VERSION_ID becomes vp.PREDECESSOR_ID) and this seems to fix the issue.

Steps to reproduce:
checkout file.txt
checkin file.txt
update file.txt /store/history/1/1.0
checkout file.txt
checkin file.txt

<restart slide>

update file.txt /store/history/1/1.0
checkout file.txt
checkin file.txt
<500 internal server error>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to