DatabaseProcApplicationCreatedLinks
sybsystemprocssp_drv_typeinfo  31 Aug 14Defects Dependencies

1     
2     
3     create 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        if @sstype = 0
13            select literal_prefix, literal_suffix, case_sensitive, searchable, unsigned_attribute, num_prec_radix, ss_dtype from sybsystemprocs.dbo.spt_datatype_info
14        else
15            select literal_prefix, literal_suffix, case_sensitive, searchable, unsigned_attribute, num_prec_radix from sybsystemprocs.dbo.spt_datatype_info where ss_dtype = @sstype
16        /*Not necessary, just for more clear logic */
17        if @curiso = 0
18        begin
19            set transaction isolation level 0
20        end
21    
22    
23        return (0)
24    


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 15
 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 23
 QCRS 3 Conditional Result Set 13
 QCRS 3 Conditional Result Set 15
 QISO 3 Set isolation level 10
 QISO 3 Set isolation level 19
 MRST 2 Result Set Marker 13
 MRST 2 Result Set Marker 15
 MTR1 2 Metrics: Comments Ratio Comments: 4% 3
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 4 = 3dec - 1exi + 2 3
 MTR3 2 Metrics: Query Complexity Complexity: 17 3

DEPENDENCIES
PROCS AND TABLES USED
reads table sybsystemprocs..spt_datatype_info