Uploaded image for project: 'Engineering'
  1. Engineering
  2. ENG-6861

Params in complex WHERE clauses generate wrong expectations for parameter counts.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.6
    • Fix Version/s: V4.8
    • Component/s: Core
    • Labels:
    • Team Backlog:
      CORE team
    • Story Points:
      0
    • Sprint:
      core39, core40, core41

      Description

      Post progress on this issue to the forum where it was reported:
      https://forum.voltdb.com/showthread.php?1247-Java-stored-procedure-question-about-mapping-parameters

      CREATE TABLE PAULTEST (ID INTEGER, NAME VARCHAR(12),LOCK_TIME TIMESTAMP, PRIMARY KEY (ID));

      CREATE PROCEDURE GETS_BAD_PARAM_COUNT AS
      SELECT TOP ? *
      FROM PAULTEST
      WHERE NAME IS NOT NULL AND
      (LOCK_TIME IS NULL OR
      SINCE_EPOCH(MILLIS,CURRENT_TIMESTAMP)-? <
      SINCE_EPOCH(MILLIS,LOCK_TIME));

      This procedure complains that it needs to be passed 4 parameters instead of the reasonably expected 2.

        Attachments

          Activity

            People

            Assignee:
            pmartel Paul Martel
            Reporter:
            pmartel Paul Martel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support