DatabaseProcApplicationCreatedLinks
sybsystemprocssp_stat_xact  14 déc. 14Defects Propagation Dependencies

1     
2     create or replace procedure sp_stat_xact
3         @commid int
4     AS
5         BEGIN
6             if @@trancount = 0
7             begin
8                 set transaction isolation level 1
9                 set chained off
10            end
11    
12            IF EXISTS
13                    (
14                    SELECT status
15                    FROM sybsystemdb.dbo.spt_committab
16                    WHERE commid = @commid
17                    )
18                SELECT status
19                FROM sybsystemdb.dbo.spt_committab
20                WHERE commid = @commid
21            ELSE
22                SELECT status = 'u'
23        END
24    


exec sp_procxmode 'sp_stat_xact', 'AnyMode'
go

Grant Execute on sp_stat_xact to public
go
RESULT SETS
sp_stat_xact_rset_002
sp_stat_xact_rset_001

DEFECTS
 MGTP 3 Grant to public sybsystemprocs..sp_stat_xact  
 MUCO 3 Useless Code Useless Begin-End Pair 5
 QCRS 3 Conditional Result Set 18
 QCRS 3 Conditional Result Set 22
 QISO 3 Set isolation level 8
 MRST 2 Result Set Marker 18
 MRST 2 Result Set Marker 22
 MSUB 2 Subquery Marker 13
 MTR1 2 Metrics: Comments Ratio Comments: 0% 2
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 4 = 3dec - 1exi + 2 2
 MTR3 2 Metrics: Query Complexity Complexity: 13 2

DEPENDENCIES
PROCS AND TABLES USED
reads table sybsystemdb..spt_committab (1)  
writes table sybsystemprocs..sp_stat_xact_rset_002 
writes table sybsystemprocs..sp_stat_xact_rset_001