Skip to content
Snippets Groups Projects
Commit d5c238f0 authored by pkupczyk's avatar pkupczyk
Browse files

BIS-180 - openBIS AS becomes unresponsive when performing batch sample updates...

BIS-180 - openBIS AS becomes unresponsive when performing batch sample updates - fix the sample_type.is_subcode_unique consistency only for sample types with this flag set to true

SVN: 26605
parent b0293677
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,7 @@ DECLARE ...@@ -96,7 +96,7 @@ DECLARE
sample_count INTEGER; sample_count INTEGER;
BEGIN BEGIN
FOR sample_type_record IN SELECT * FROM sample_types LOOP FOR sample_type_record IN SELECT * FROM sample_types WHERE is_subcode_unique = true LOOP
select count(*) as c into sample_count from samples_all where saty_id = sample_type_record.id group by code, saty_id, space_id, dbin_id order by c desc limit 1; select count(*) as c into sample_count from samples_all where saty_id = sample_type_record.id group by code, saty_id, space_id, dbin_id order by c desc limit 1;
IF (sample_count > 1) THEN IF (sample_count > 1) THEN
update sample_types set is_subcode_unique = false where id = sample_type_record.id; update sample_types set is_subcode_unique = false where id = sample_type_record.id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment