Title:
Frequent key collisions on cached queries resulting in wrong (cached) result-set returned
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): David Stockton / David Stockton (DaveyS)
Created: 11/21/2012
Components: Caching
Versions: 10.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: Final / CF 10 Update 11
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Platforms All
Vote Count: 8
Problem Description:
A query can be requested in CF10 that is not cached. However, CF10 returns a previous query that is in the cache returning the incorrect data. The problem is in the way the cache key is generated for a cached query with queryparams. It's much too easy to generate a key collision.
Steps to Reproduce:
1 - Create the table & data as defined in comments at top of test.cfm (attached)
2 - Run test.cfm
Actual Result:
Query result for "RGB100" is returned in case 1, 2
Query result for "RAB160" is returned in case 3.
Expected Result:
Query result for "RGB100" is returned in case 1
Query result for "RAB160" is returned in case 2, 3.
Any Workarounds:
- Don't cache the query
- Don't use cfqueryparam
- Add (SQL) comment containing all queryparam values to SQL text so it is unique but doesn't affect the query or query-plan
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3369530
Keywords:
FixTested
External Customer Info:
External Company:
External Customer Name: DaveyS
External Customer Email:
External Test Config: Happens on CF10 (no updates) & CF10 update 5 on CentOS 6 64bit and Windows 7 64bit
Attachments:
- November 22, 2012 00:00:00: 1_test.cfm
Comments: