Unexpected CFQUERY behaviour

Description

This seems to be a bug and is certainly an inconsistency against ACF.

Given the following table:

CREATE TABLE `pages` (
`page_id` int(11) NOT NULL AUTO_INCREMENT,
`page_title` varchar(150) DEFAULT NULL,
PRIMARY KEY (`page_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `pages` (`page_id`, `page_title`)
VALUES
(1,'Page 1'),
(2,'Page 2'),
(3,'Page 3'),
(4,'Page 4'),
(5,'Page 5'),
(6,'Page 6'),
(7,'Page 7'),
(8,'Page 8'),
(9,'Page 9'),
(10,'Page 10');

The following query returns no results because the value attribute of cfqueryparam is blank.

<cfquery name="test" datasource="db">
SELECT *
FROM pages
WHERE page_id NOT IN (<cfqueryparam cfsqltype="CF_SQL_INTEGER" value="" list="true">)
LIMIT 100
</cfquery>
<cfdump var="#test#">

I would expected all records to be returned.

The debug output shows the query as:

SELECT *
FROM pages
WHERE page_id NOT IN ([CF_SQL_INTEGER])
LIMIT 100

Environment

None

Status

Assignee

Michael Offner

Reporter

Simon Bingham

Labels

None

Affects versions

Priority

Minor
Configure