Details

    • Steps to Reproduce:
      Hide
      <cfscript>
          q = new Query( sql="SELECT 'http://localhost/' AS myURL" );
          q.execute();
      </cfscript>
      
      Show
      <cfscript> q = new Query( sql= "SELECT 'http: //localhost/' AS myURL" ); q.execute(); </cfscript>

      Description

      Executing a script query fails when its SQL contains a colon that is not part of a parameter, throwing the misleading error "parameter 2 of the function right must be a positive number".

      This appears to be a result of the parameter-detection regex and related ':' references in the parseSQL() method of /railo/components/org/railo/cfml/Query.cfc; changing these to require whitespace or an equals sign before the colon might be a viable fix, allowing normal parameter usage of the colon, without falsely triggering parameter expansion on text that simply contains a colon.

      Changing to a tag-based query is of course a workaround (but may also require changing to a tag-based function in a tag-based component).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                andreacfm Andrea Campolonghi
                Reporter:
                logantracyo Tracy Logan
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: