Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-27

SQL statement error Level_1.pm

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.4
    • vcld (backend)
    • None

    Description

      Under some circumstances, the SQL statement in Level_1.pm fails because the IN clause contains an empty set. The error as it appears in the log file:

      4389 373988:446602 timeout ---- WARNING ----
      4389 373988:446602 timeout 2009-01-06 10:46:30 4389 373988:446602 timeout utils.pm:database_select(5529) could not execute statement,
      4389 373988:446602 timeout SELECT
      4389 373988:446602 timeout COUNT(imageid) AS cnt,
      4389 373988:446602 timeout imageid
      4389 373988:446602 timeout FROM
      4389 373988:446602 timeout log
      4389 373988:446602 timeout WHERE
      4389 373988:446602 timeout imageid IN ()
      4389 373988:446602 timeout AND start > (NOW() - INTERVAL 2 DAY)
      4389 373988:446602 timeout GROUP BY imageid
      4389 373988:446602 timeout ORDER BY cnt DESC
      4389 373988:446602 timeout LIMIT 1
      4389 373988:446602 timeout , You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syn
      tax to use near ')
      4389 373988:446602 timeout AND start > (NOW() - INTERVAL 2 DAY)
      4389 373988:446602 timeout GROUP BY imageid
      4389 373988:446602 timeout ' at line 7

      A query earlier on in the subroutine populates an array of image IDs. These values are inserted between the parenthesis after "IN". Under some circumstances, the previous query produces 0 results. This occurred when testing an image which could only be run on a handful of computers. In addition, the computers were configured to only be able to run a single image.

      Attachments

        Activity

          People

            Unassigned Unassigned
            arkurth Andrew Kurth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: