Details
Assignee
Michael OffnerMichael OffnerReporter
Ryan GuillRyan GuillPriority
TrivialLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Ryan Guill
Ryan GuillPriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Created 10 March 2015 at 00:42
Updated 15 July 2020 at 15:18
Copying most of this from the google group conversation: https://groups.google.com/forum/#!searchin/lucee/query/lucee/KlP7G4ApwoU/BF2k8EoOphAJ
I have found a few different bugs in the queryExecute function around the result attribute. Here is the testcases:
https://gist.github.com/ryanguill/b6497628e951a3cffacd
All tested on lucee 4.5.1.000.
The bugs as I see them:
1) There is only one way I can find to create the result attribute variable in the local scope. See test 2, 3, 4 - test 7 does work (thanks to John Berquist)
2) Trying to use result="local.result" silently fails to create the variable at all, in any scope. I believe there is no way to create any variable that has a period in the name. See test 2.
3) Trying to var the result prior to the queryExecute call also keeps the variable from being created at all - it still silently fails. see test 3.
4) Trying to var the result prior to the queryExecute and then set the result as result=result (without the quotes) also silently fails to fill the variable, see test 4
5) related to LDEV-5, trying to use result=result (without the quotes) and also without creating the variable first throws a syntax error. I assume this is expected, the result attribute is expecting a variable name that it can use to create the variable - I would still argue this is bad form though, we should be able to provide the variable for the result value to go into . See test 5.
See test 6 for an example of the ability to assign to local variables working properly with tags.
Also, as far as I can find there is no documentation anywhere around using the result attribute with queryExecute, which cause a lot of fumbling around on my part trying to figure out how to make it work, with these bugs hiding how it should actually work.