tracker issue : CF-4178249

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

isNull() on a NULL query column returns NO

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): / ext-user (HariKrishna Kallae)

Created: 08/03/2016

Components: Language

Versions: 2016,11.0,10.0

Failure Type:

Found In Build/Fixed In Build: CF10_HF20 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Mac 10 All,Win XP All

Vote Count: 0

isNull() on a NULL query column returns NO

Perform a query with NULL and non-NULL values. isNull() of a null column returns NIO

Repro:
<cfset q = queryNew("nullCol")>
<cfset queryAddColumn(q, "dataCol", ["A", "B", "C"])>
<cfdump var="#q#">

<cfoutput query="q">
	<cfset dataColValue = q.getString("dataCol")>
	<cfset nullColValue = q.getString("nullCol")>

	#CurrentRow#<br>
	dataCol: "#dataCol#";
	IsNULL(dataCol): #IsNULL(dataCol)#;
	IsNULL(q.dataCol): #IsNULL(q.dataCol)#;
	isDefined(dataCol): #isDefined(dataCol)#;
	isDefined(q.dataCol): #isDefined(q.dataCol)#;
	IsNULL(q.dataCol[currentRow]): #IsNULL(q.dataCol[currentRow])#;
	Actual Null: #!StructKeyExists(variables,"dataColValue")#;
	<!--- isDefined(q.dataCol[currentRow]): #isDefined(q.dataCol[currentRow])#; --->
	<br>
	nullCol: "#nullCol#";
	IsNULL(nullCol): #IsNULL(nullCol)#;
	IsNULL(q.nullCol): #IsNULL(q.nullCol)#;
	IsNULL(q.nullCol[currentRow]): #IsNULL(q.nullCol[currentRow])#;
	Actual Null: #!StructKeyExists(variables, "nullColValue")#;
	<br>
	<hr>
</cfoutput>

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

Watson Bug ID:	4178249

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:

Attachments:

Comments: