tracker issue : CF-4170628

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Bug for: cachedWithin=0 returns cached query

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 07/05/2016

Components: Database

Versions: 2016

Failure Type: Data Corruption

Found In Build/Fixed In Build: CF2016_Update1 /

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Win All

Vote Count: 0

Listed in the version 2016.0.03.300466 Issues Fixed doc
In CF11, cachedWithin=0 returns non-cached query (good). In CF2016, cachedWithin=0 returns cached query (bad).

Issue affects QoQ and non-QoQ.

QoQ Repro:

<cfscript>
  q1 = queryNew("foobar", "", [["foo"]]);
  q2 = queryExecute("SELECT foobar FROM q1", [], {dbtype="query", cachedWithin=createTimeSpan(0,0,1,0)});//returns cached query (good)
  q1.setCell("foobar", "bar", 1);
  q3 = queryExecute("SELECT foobar FROM q1", [], {dbtype="query", cachedWithin=createTimeSpan(0,0,0,0)});//should return non-cached query, but returns cached query (bad)
  writeOutput(q3.foobar);
</cfscript>

Actual result in build 2016.0.01.298513: foo

Expected result in build 2016.0.01.298513 (and actual in build 11,0,07,296330): bar

Use case: <cfquery cachedwithin="#myTimeSpan#". See? myTimeSpan is dynamic. A non-cached query is expected, when myTimeSpan=createTimeSpan(0,0,0,0).

When cached data is treated as non-cached data, data corruption can occur.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4170628

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This issue is fixed now. The fix for this issue will be available as part of ColdFusion 2016 Update 3.
Comment by Nimit S.
2242 | July 19, 2016 06:06:17 AM GMT
Hi Nimit, I've confirmed this is fixed in CF2016 Update 3 (build 2016.0.03.300466). The code in the description now returns "bar". Thanks!, -Aaorn
Comment by Aaron N.
2243 | July 11, 2017 04:47:40 PM GMT
Please populate Fixed In Build w/ "CF2016_Update3".
Comment by Aaron N.
2244 | July 11, 2017 09:27:08 PM GMT