Title:
Re-querying a cached query doesn't return the initial cached query after result variable is modified
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): James Moberg / James Moberg ()
Created: 07/03/2017
Components: Caching
Versions: 2016
Failure Type: Data Corruption
Found In Build/Fixed In Build: 2016,0,04,302561 /
Priority/Frequency: Normal / All users will encounter
Locale/System: / Win 2012 Server x64
Vote Count: 1
Problem Description: Performing a query that is already cached will not return the initial, based query that was cached. If you add columns or modify values post-query, they become a permanent part of the initial cached query. NOTE: This has worked consistently in ColdFusion 4-11 (and Railo/Lucee) until ColdFusion 2016 (which we're required to upgrade to due to CF10 EOL.)
Steps to Reproduce:
1) Perform a cached query.
2) Modify one of the column values (ie, QueryName.ColumnName[1] = 'Something Else';)
3) Re-perform the cached query... the query result set should be the same as the initial cached query (#1), but it's not.
Here's some sample code:
https://gist.github.com/JamoCA/fe7ff5be43560ba6f8b6c513fdf9f723
Actual Result: The modified results of the query #2.
Expected Result: The initial, base query from the database (1) without any retained post-query modifications (as is consistent with ColdFusion 3, 4, 5, 6, 7, 8, 9, 10 & 11.)
Any Workarounds: None.
Attachments:
- July 03, 2017 00:00:00: CF2016QueryCache.cfm
- July 13, 2017 00:00:00: CFQueryCache_20170713081847.png
Comments: