Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
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
Abuhujair Javed
Postgres FD Implementation
Commits
a83c45c4
Commit
a83c45c4
authored
Aug 03, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix misplacement of savepointLevel test, per report from Chris K-L.
parent
929da8e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
src/backend/access/transam/xact.c
src/backend/access/transam/xact.c
+8
-11
No files found.
src/backend/access/transam/xact.c
View file @
a83c45c4
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.17
6 2004/08/01 20:57:59
tgl Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.17
7 2004/08/03 15:57:26
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -2520,19 +2520,10 @@ RollbackToSavepoint(List *options)
Assert
(
PointerIsValid
(
name
));
target
=
CurrentTransactionState
;
while
(
target
!=
NULL
)
for
(
target
=
s
;
PointerIsValid
(
target
);
target
=
target
->
parent
)
{
if
(
PointerIsValid
(
target
->
name
)
&&
strcmp
(
target
->
name
,
name
)
==
0
)
break
;
target
=
target
->
parent
;
/* we don't cross savepoint level boundaries */
if
(
target
->
savepointLevel
!=
s
->
savepointLevel
)
ereport
(
ERROR
,
(
errcode
(
ERRCODE_S_E_INVALID_SPECIFICATION
),
errmsg
(
"no such savepoint"
)));
}
if
(
!
PointerIsValid
(
target
))
...
...
@@ -2540,6 +2531,12 @@ RollbackToSavepoint(List *options)
(
errcode
(
ERRCODE_S_E_INVALID_SPECIFICATION
),
errmsg
(
"no such savepoint"
)));
/* disallow crossing savepoint level boundaries */
if
(
target
->
savepointLevel
!=
s
->
savepointLevel
)
ereport
(
ERROR
,
(
errcode
(
ERRCODE_S_E_INVALID_SPECIFICATION
),
errmsg
(
"no such savepoint"
)));
/*
* Abort the current subtransaction, if needed. We can't Cleanup the
* savepoint yet, so signal CommitTransactionCommand to do it and
...
...
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