DatabaseProcApplicationCreatedLinks
sybsystemprocssp_drv_typeinfo  14 déc. 14Defects Propagation Dependencies

1     
2     
3     CREATE OR REPLACE PROCEDURE sp_drv_typeinfo(@sstype int = 0)
4     as
5         declare @curiso int
6         SELECT @curiso = @@isolation
7         if @@isolation = 0
8         begin
9     
10            set transaction isolation level 1
11        end
12    
13        if @sstype = 0
14            SELECT literal_prefix, literal_suffix, case_sensitive, searchable, unsigned_attribute, num_prec_radix, ss_dtype FROM sybsystemprocs.dbo.spt_datatype_info
15        else
16            SELECT literal_prefix, literal_suffix, case_sensitive, searchable, unsigned_attribute, num_prec_radix FROM sybsystemprocs.dbo.spt_datatype_info WHERE ss_dtype = @sstype
17        /*Not necessary, just for more clear logic */
18        if @curiso = 0
19        begin
20            set transaction isolation level 0
21        end
22    
23    
24        return (0)
25    


exec sp_procxmode 'sp_drv_typeinfo', 'AnyMode'
go

Grant Execute on sp_drv_typeinfo to public
go
RESULT SETS
sp_drv_typeinfo_rset_002
sp_drv_typeinfo_rset_001

DEFECTS
 QTYP 4 Comparison type mismatch Comparison type mismatch: tinyint vs int 16
 TNOI 4 Table with no index sybsystemprocs..spt_datatype_info sybsystemprocs..spt_datatype_info
 MGTP 3 Grant to public sybsystemprocs..sp_drv_typeinfo  
 MGTP 3 Grant to public sybsystemprocs..spt_datatype_info  
 MUCO 3 Useless Code Useless Brackets in create proc 3
 MUCO 3 Useless Code Useless Brackets 24
 QCRS 3 Conditional Result Set 14
 QCRS 3 Conditional Result Set 16
 QISO 3 Set isolation level 10
 QISO 3 Set isolation level 20
 MRST 2 Result Set Marker 14
 MRST 2 Result Set Marker 16
 MTR1 2 Metrics: Comments Ratio Comments: 4% 3
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 5 = 4dec - 1exi + 2 3
 MTR3 2 Metrics: Query Complexity Complexity: 17 3

DEPENDENCIES
PROCS AND TABLES USED
writes table sybsystemprocs..sp_drv_typeinfo_rset_001 
writes table sybsystemprocs..sp_drv_typeinfo_rset_002 
reads table sybsystemprocs..spt_datatype_info