You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently there has been brainfart with the checking if capture_id exists.
File R__Procedure_Retrieve_Capture_Storages.sql has null check where
if (select count(id) from cfe_18.capture_def_x_flow_targets where capture_def_id = capture_id = 0) then
SELECT JSON_OBJECT('id', capture_id, 'message', 'Capture storage does not exist with given ID') into @cs;
signal sqlstate '45000' set message_text = @cs;
should be
if ((select count(id) from cfe_18.capture_def_x_flow_targets where capture_def_id=capture_id)= 0) then
SELECT JSON_OBJECT('id', capture_id, 'message', 'Capture storage does not exist with given ID') into @cs;
signal sqlstate '45000' set message_text = @cs;
NOTICE missing parentheses from when count is taken from existing records. Above code snippet results always on TRUE due to assigning the value and not handling the count correctly.
This is currently applied locally but different pull request should be created where this is fixed.
Description
fetching storages for capture results in an error.
The text was updated successfully, but these errors were encountered: