DatabaseProcApplicationCreatedLinks
mastersp_instmsg  14 déc. 14Defects Propagation Dependencies

1     
2     
3     create or replace procedure sp_instmsg
4         @msg_num int,
5         @msg_text varchar(255)
6     as
7         declare @description varchar(255)
8     
9         select @description = description from sysmessages where
10            error = @msg_num and langid is null
11    
12        if @description = @msg_text
13            return 1
14    
15        if @description is not null
16            delete sysmessages where error = @msg_num
17    
18        if @msg_text is null
19            return 2
20    
21        insert sysmessages values
22        (@msg_num, 0, 0, @msg_text, null, null)
23    
24        return 0
25    

DEFECTS
 MINU 4 Unique Index with nullable columns master..sysmessages master..sysmessages
 MTYP 4 Assignment type mismatch @description: varchar(255) = varchar(1024) 9
 MGTP 3 Grant to public master..sysmessages  
 MNER 3 No Error Check should check @@error after delete 16
 MNER 3 No Error Check should check @@error after insert 21
 MUOT 3 Updates outside transaction 21
 QAFM 3 Var Assignment from potentially many rows 9
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysmessages.ncsysmessages unique
(error, dlevel, langid)
Intersection: {error, langid}
10
 QPRI 3 Join or Sarg with Rooted Partial Index Use SARG Candidate index: sysmessages.ncsysmessages unique
(error, dlevel, langid)
Intersection: {error}
16
 MTR1 2 Metrics: Comments Ratio Comments: 0% 3
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 6 = 5dec - 1exi + 2 3
 MTR3 2 Metrics: Query Complexity Complexity: 20 3

DATA PROPAGATION detailed
ColumnWritten To
@msg_numsysmessages.error  
@msg_textsysmessages.description   sp_exec_SQL_rset_001.sqlbNoName57 sp_helpdb_rset_003.remote location sp_helpsort_rset_001.Collation Name sp_helpsort_rset_003.sqlbNoName79 sp_objectsegment_rset_001.Data_located_on_segment sp_passwordpolicy_rset_002.message sp_passwordpolicy_rset_003.message sp_passwordpolicy_rset_004.Curr_value sp_sproc_columns_rset_001.mode
sp_sproc_columns_rset_002.mode

DEPENDENCIES
PROCS AND TABLES USED
read_writes table master..sysmessages