Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
cb4a2d90
Commit
cb4a2d90
authored
16 years ago
by
Giulia Taurelli
Browse files
Options
Downloads
Patches
Plain Diff
Modified updatedbstart to return the mode
parent
deb90272
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
castor/db/oracleTape.sql
+8
-6
8 additions, 6 deletions
castor/db/oracleTape.sql
with
8 additions
and
6 deletions
castor/db/oracleTape.sql
+
8
−
6
View file @
cb4a2d90
/*******************************************************************
*
* @(#)$RCSfile: oracleTape.sql,v $ $Revision: 1.70
8
$ $Date: 2009/0
1/30 07:12:03
$ $Author: gtaur $
* @(#)$RCSfile: oracleTape.sql,v $ $Revision: 1.70
9
$ $Date: 2009/0
2/06 09:23:19
$ $Author: gtaur $
*
* PL/SQL code for the interface to the tape system
*
...
...
@@ -1900,24 +1900,26 @@ END;
create or replace
PROCEDURE updateDbStartTape
( inputVdqmReqId IN INTEGER,
inputMode IN INTEGER, outVid OUT VARCHAR2
) AS
( inputVdqmReqId IN INTEGER,
outVid OUT VARCHAR2, outMode OUT INTEGER
) AS
reqId NUMBER;
tpId NUMBER;
reqMode INTEGER;
BEGIN
-- set the request to ONGOING
UPDATE taperequeststate SET status=3 WHERE vdqmVolreqid = inputVdqmReqId
AND accessmode= inputmode
AND status =2 RETURNING id INTO reqId;
IF
inputm
ode = 0 THEN
UPDATE taperequeststate SET status=3 WHERE vdqmVolreqid = inputVdqmReqId AND status =2 RETURNING id
, accessmode
INTO reqId
, reqMode
;
IF
reqM
ode = 0 THEN
-- read tape mounted
UPDATE tape set status=4 WHERE id IN ( SELECT taperecall FROM taperequeststate WHERE id=reqId ) RETURNING vid INTO outVid;
UPDATE tape set status=4 WHERE id IN ( SELECT taperecall FROM taperequeststate WHERE id=reqId ) RETURNING vid
, tpmode
INTO outVid
,outMode
;
ELSE
-- write
UPDATE stream set status=3 WHERE id IN ( SELECT streammigration FROM taperequeststate WHERE id=reqId ) returning id INTO tpId;
UPDATE tape set status=4 WHERE id = tpId and tpmode=1 RETURNING vid INTO outVid;
UPDATE tape set status=4 WHERE id = tpId and tpmode=1 RETURNING vid
, tpmode
INTO outVid
, outmode
;
END IF;
COMMIT;
END;
/
/* SQL Function updateDbEndTape */
create or replace
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment