Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
5b18a710
Commit
5b18a710
authored
Jun 05, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: FileStorage loadBefore didn't handle deleted/undone data correctly.
parent
6fe36b98
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
CHANGES.rst
CHANGES.rst
+2
-0
src/ZODB/FileStorage/FileStorage.py
src/ZODB/FileStorage/FileStorage.py
+4
-2
src/ZODB/tests/TransactionalUndoStorage.py
src/ZODB/tests/TransactionalUndoStorage.py
+4
-0
No files found.
CHANGES.rst
View file @
5b18a710
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
- DemoStorage: add support for conflict resolution and fix history()
- DemoStorage: add support for conflict resolution and fix history()
https://github.com/zopefoundation/ZODB/pull/58
https://github.com/zopefoundation/ZODB/pull/58
- Fixed: FileStorage loadBefore didn't handle deleted/undone data correctly.
4.2.0 (2015-06-02)
4.2.0 (2015-06-02)
==================
==================
...
...
src/ZODB/FileStorage/FileStorage.py
View file @
5b18a710
...
@@ -489,11 +489,13 @@ class FileStorage(
...
@@ -489,11 +489,13 @@ class FileStorage(
if
not
pos
:
if
not
pos
:
return
None
return
None
if
h
.
back
:
if
h
.
plen
:
return
_file
.
read
(
h
.
plen
),
h
.
tid
,
end_tid
elif
h
.
back
:
data
,
_
,
_
,
_
=
self
.
_loadBack_impl
(
oid
,
h
.
back
,
_file
=
_file
)
data
,
_
,
_
,
_
=
self
.
_loadBack_impl
(
oid
,
h
.
back
,
_file
=
_file
)
return
data
,
h
.
tid
,
end_tid
return
data
,
h
.
tid
,
end_tid
else
:
else
:
r
eturn
_file
.
read
(
h
.
plen
),
h
.
tid
,
end_tid
r
aise
POSKeyError
(
oid
)
def
store
(
self
,
oid
,
oldserial
,
data
,
version
,
transaction
):
def
store
(
self
,
oid
,
oldserial
,
data
,
version
,
transaction
):
if
self
.
_is_read_only
:
if
self
.
_is_read_only
:
...
...
src/ZODB/tests/TransactionalUndoStorage.py
View file @
5b18a710
...
@@ -179,6 +179,10 @@ class TransactionalUndoStorage:
...
@@ -179,6 +179,10 @@ class TransactionalUndoStorage:
info
=
self
.
_storage
.
undoInfo
()
info
=
self
.
_storage
.
undoInfo
()
self
.
_undo
(
info
[
2
][
'id'
],
[
oid
])
self
.
_undo
(
info
[
2
][
'id'
],
[
oid
])
self
.
assertRaises
(
KeyError
,
self
.
_storage
.
load
,
oid
,
''
)
self
.
assertRaises
(
KeyError
,
self
.
_storage
.
load
,
oid
,
''
)
# Loading current data via loadBefore should raise a POSKeyError too:
self
.
assertRaises
(
KeyError
,
self
.
_storage
.
loadBefore
,
oid
,
b'
\
x7f
\
xff
\
xff
\
xff
\
xff
\
xff
\
xff
\
xff
'
)
self
.
_iterate
()
self
.
_iterate
()
def
checkUndoCreationBranch2
(
self
):
def
checkUndoCreationBranch2
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment