DatabaseProcApplicationCreatedLinks
sybsystemprocssp_jdbc_search_lob  14 déc. 14Defects Propagation Dependencies

1     
2     /*
3     **  End of sp_jdbc_locator_valid 
4     */
5     
6     /*
7     **  sp_jdbc_search_lob
8     */
9     
10    create or replace procedure sp_jdbc_search_lob(
11        @lob_type int,
12        @search varbinary(16384),
13        @locator binary(24),
14        @pos bigint,
15        @result bigint output,
16        @isPattern int = 0,
17        @searchString varchar(16384) = null)
18    as
19        if @lob_type = 0
20            if @isPattern = 0
21                select @result = charindex(locator_literal(IMAGE_locator, @search), substring(locator_literal(IMAGE_locator, @locator), @pos, datalength(locator_literal(IMAGE_locator, @locator)) - @pos + 1)) + @pos - 1
22            else
23                select @result = charindex(@search, substring(locator_literal(IMAGE_locator, @locator), @pos, datalength(locator_literal(IMAGE_locator, @locator)) - @pos + 1)) + @pos - 1
24        else if @lob_type = 1
25            if @isPattern = 0
26                select @result = charindex(locator_literal(TEXT_locator, @search), substring(locator_literal(TEXT_locator, @locator), @pos, char_length(locator_literal(TEXT_locator, @locator)) - @pos + 1)) + @pos - 1
27            else
28                select @result = charindex(@searchString, substring(locator_literal(TEXT_locator, @locator), @pos, char_length(locator_literal(TEXT_locator, @locator)) - @pos + 1)) + @pos - 1
29        else
30        if @isPattern = 0
31            select @result = charindex(locator_literal(UNITEXT_locator, @search), substring(locator_literal(UNITEXT_locator, @locator), @pos, char_length(locator_literal(UNITEXT_locator, @locator)) - @pos + 1)) + @pos - 1
32        else
33            select @result = charindex(@searchString, substring(locator_literal(UNITEXT_locator, @locator), @pos, char_length(locator_literal(UNITEXT_locator, @locator)) - @pos + 1)) + @pos - 1
34    


exec sp_procxmode 'sp_jdbc_search_lob', 'AnyMode'
go

Grant Execute on sp_jdbc_search_lob to public
go
DEFECTS
 PERR 6 Parsing Error Could not find COLUMN IMAGE_locator in the query's tables 21
 PERR 6 Parsing Error Could not find COLUMN IMAGE_locator in the query's tables 23
 PERR 6 Parsing Error Could not find COLUMN TEXT_locator in the query's tables 26
 PERR 6 Parsing Error Could not find COLUMN TEXT_locator in the query's tables 28
 PERR 6 Parsing Error Could not find COLUMN UNITEXT_locator in the query's tables 31
 PERR 6 Parsing Error Could not find COLUMN UNITEXT_locator in the query's tables 33
 MGTP 3 Grant to public sybsystemprocs..sp_jdbc_search_lob  
 MUCO 3 Useless Code Useless Brackets in create proc 10
 QAFM 3 Var Assignment from potentially many rows 21
 QAFM 3 Var Assignment from potentially many rows 23
 QAFM 3 Var Assignment from potentially many rows 26
 QAFM 3 Var Assignment from potentially many rows 28
 QAFM 3 Var Assignment from potentially many rows 31
 QAFM 3 Var Assignment from potentially many rows 33
 MTR1 2 Metrics: Comments Ratio Comments: 4% 10
 MTR2 2 Metrics: Cyclomatic Complexity Cyclo: 7 = 6dec - 1exi + 2 10
 MTR3 2 Metrics: Query Complexity Complexity: 17 10

DEPENDENCIES