Last week I blogged about a bug I found in ColdFusion MX when you loop over queries in the application scope. Perversely, the standard behavior of ColdFusion MX is to store the CurrentRow variable in the application scope along with the query. This means that two people looping over the same query in the application scope will run into a race condition.
One of my coworkers has been working with Macromedia support to resolve this issue. According to my coworker (and not to me) Macromedia is developing a HotFix for this issue. To the best of my knowledge this is not yet released. However, my coworker has tested it on the site where we found the problem. At least in the beta of the hot fix the behavior will change somewhat. The following code will continue to be susceptible to the bug:
<cfoutput query="application.myQuery"> #application.myQuery.currentRow#<br> </cfoutput>
The reason this code will be susceptible to the problem is because it pulls currentRow directly from the application scope. You can think of this as the way to find out the current row in any loop in your site.
However, if you want to find the current row of your loop be sure to only reference it as currentRow as follows:
<cfoutput query="application.myQuery"> #currentRow#<br> </cfoutput>
After the HotFix is applied currentRow does not exist in any of the standard scopes and exists only in cfoutput and cfloop tags. This is not the behavior in the unpatched version.
So, look for this HotFix on a macromedia.com site near your home.