Closed
Description
in certain circumstances, when I am call a custom stored procedure, it will open the definition for that stored procedure in another tab.
steps to reproduce:
- Create a stored procedure
- in the same file, add the code to call the stored procedure.
- Place the cursor somewhere within the line that calls the stored procedure (NOT selecting the entire line)
- Run the SQL with Ctrl + R
The issue does not occur when running the code from the run menu, or if you manually highlight the entire line.
create or replace procedure TESTING.sp_json_test(IN json_input CHAR(5000))
--program type sub modifies sql data
LANGUAGE SQL
DYNAMIC RESULT SETS 1
--set option usrprf = *user, dynusrprf = *user, commit = *none
begin
DECLARE stmt VARCHAR(200);
DECLARE PLITM CHAR(25);
DECLARE cur CURSOR WITH HOLD FOR s1;
SET PLITM = JSON_VALUE(json_input, 'PLITM');
--SET PLITM = 'ABS1013';
set stmt = '
SELECT
PLITM,
PSHORTDESC
FROM
F55WB41PRD
WHERE
PLITM = ?
LIMIT 1000
'
;
PREPARE s1 FROM stmt;
OPEN cur USING PLITM;
CLOSE cur;
end;
CALL TESTING.sp_json_test('{"PLITM": "ABS1013"}');
this is just the example that I was testing with, but the contents of the stored procedure dont seem to matter, it has done this with other stored procedures I have created.