IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 11, 2026, 3:09:36 PM (2 months ago)
Author:
eugene
Message:

fix various SQL errors caught by more strict mysql versions, especially: force SQL to select a specific entry from non-aggregated fields when other fields are aggregated using e.g., GROUP BY

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/ippTools/share/pstamptool_pendingdependent.sql

    r38586 r43014  
    11SELECT DISTINCT
    22    pstampDependent.*,
    3     pstampRequest.label,
     3    MIN(pstampRequest.label) as label,
    44    MIN(req_id) as first_req_id,
    55    concat( pstampDependent.outdir, '/checkdep.', dep_id, '.log') as logfile,
    6     IFNULL(Label.priority, 10000) AS priority
     6    MIN(IFNULL(Label.priority, 10000)) AS priority
    77FROM pstampDependent
    88JOIN pstampJob USING(dep_id)
     
    1313    AND pstampRequest.state = 'run'
    1414    AND (Label.active OR Label.active IS NULL)
     15-- EAM TEST:
     16-- this is added in pstamptool, but is needed to test the SQL validity
     17-- GROUP BY dep_id ORDER BY priority DESC, MIN(req_id), dep_id
     18
Note: See TracChangeset for help on using the changeset viewer.