You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by "Aaron Peeler (JIRA)" <ji...@apache.org> on 2014/07/14 21:34:05 UTC

[jira] [Updated] (VCL-27) SQL statement error Level_1.pm

     [ https://issues.apache.org/jira/browse/VCL-27?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron Peeler updated VCL-27:
----------------------------

    Fix Version/s: 2.4
                   2.3.3

> SQL statement error Level_1.pm
> ------------------------------
>
>                 Key: VCL-27
>                 URL: https://issues.apache.org/jira/browse/VCL-27
>             Project: VCL
>          Issue Type: Bug
>          Components: vcld (backend)
>    Affects Versions: 2.0
>            Reporter: Andy Kurth
>            Priority: Minor
>             Fix For: 2.3.3, 2.4
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)