DatabaseProcApplicationCreatedLinks
sybsystemprocssp_jdbc_lob_getbytes  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     **  End of sp_jdbc_getlob 
4     */
5     
6     /*
7     **  sp_jdbc_lob_getbytes 
8     */
9     
10    create or replace procedure sp_jdbc_lob_getbytes(
11        @lob_type int,
12        @locator binary(24),
13        @read_pos bigint,
14        @read_len int)
15    as
16        if @lob_type = 0
17            select substring(locator_literal(IMAGE_locator, @locator), @read_pos, @read_len), datalength(locator_literal(IMAGE_locator, @locator))
18        else if @lob_type = 1
19            select substring(locator_literal(TEXT_locator, @locator), @read_pos, @read_len), char_length(locator_literal(TEXT_locator, @locator))
20        else
21            select substring(locator_literal(UNITEXT_locator, @locator), @read_pos, @read_len), char_length(locator_literal(UNITEXT_locator, @locator))
22    


exec sp_procxmode 'sp_jdbc_lob_getbytes', 'AnyMode'
go

Grant Execute on sp_jdbc_lob_getbytes to public
go
RESULT SETS
sp_jdbc_lob_getbytes_rset_003
sp_jdbc_lob_getbytes_rset_002
sp_jdbc_lob_getbytes_rset_001

DEFECTS
 PERR 6 Parsing Error Could not find COLUMN IMAGE_locator in the query's tables 17
 PERR 6 Parsing Error Could not find COLUMN TEXT_locator in the query's tables 19
 PERR 6 Parsing Error Could not find COLUMN UNITEXT_locator in the query's tables 21
 MGTP 3 Grant to public sybsystemprocs..sp_jdbc_lob_getbytes  
 MUCO 3 Useless Code Useless Brackets in create proc 10
 QCRS 3 Conditional Result Set 17
 QCRS 3 Conditional Result Set 19
 QCRS 3 Conditional Result Set 21
 QNAM 3 Select expression has no name datalength(locator_literal(IMAGE_locator, @locator)) 17
 QNAM 3 Select expression has no name substring(locator_literal(IMAGE_locator, @locator), @read_pos, @read_len) 17
 QNAM 3 Select expression has no name char_length(locator_literal(TEXT_locator, @locator)) 19
 QNAM 3 Select expression has no name substring(locator_literal(TEXT_locator, @locator), @read_pos, @read_len) 19
 QNAM 3 Select expression has no name char_length(locator_literal(UNITEXT_locator, @locator)) 21
 QNAM 3 Select expression has no name substring(locator_literal(UNITEXT_locator, @locator), @read_pos, @read_len) 21
 MRST 2 Result Set Marker 17
 MRST 2 Result Set Marker 19
 MRST 2 Result Set Marker 21
 MTR1 2 Metrics: Comments Ratio Comments: 7% 10
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 4 = 3dec - 1exi + 2 10
 MTR3 2 Metrics: Query Complexity Complexity: 8 10

DATA PROPAGATION detailed
ColumnWritten To
@locatorsp_jdbc_lob_getbytes_rset_001.sqlbNoName15 °.sqlbNoName16 sp_jdbc_lob_getbytes_rset_002.sqlbNoName17 °.sqlbNoName18 sp_jdbc_lob_getbytes_rset_003.sqlbNoName19 °.sqlbNoName20
@read_lensp_jdbc_lob_getbytes_rset_001.sqlbNoName15 sp_jdbc_lob_getbytes_rset_002.sqlbNoName17 sp_jdbc_lob_getbytes_rset_003.sqlbNoName19
@read_possp_jdbc_lob_getbytes_rset_001.sqlbNoName15 sp_jdbc_lob_getbytes_rset_002.sqlbNoName17 sp_jdbc_lob_getbytes_rset_003.sqlbNoName19

DEPENDENCIES
PROCS AND TABLES USED
writes table sybsystemprocs..sp_jdbc_lob_getbytes_rset_002 
writes table sybsystemprocs..sp_jdbc_lob_getbytes_rset_001 
writes table sybsystemprocs..sp_jdbc_lob_getbytes_rset_003