QueryNew does not ignore leading or trailing spaces in columns names

Description

Variables.myQuery = QueryNew("myCol1, myCol2,myCol3", "varchar,varchar,varchar");
QueryAddRow(Variables.myQuery, 1);
QuerySetCell(Variables.myQuery, "myCol2", "some value", 1);

The space between the comma and the name of the second field will then cause an error that the query does not contain a field by that name. It is looking for " myCol2" and not "myCol2". ColdFusion ignores leading or trailing spaces between the field delimiter.

Environment

Debian Linux 9

Activity

Pothys - MitrahSoft 7 April 2021 at 13:40

This issue was solved in fixed version. So I marked this ticket as deployed.

Pothys - MitrahSoft 17 January 2020 at 14:32

I've checked & added a test case, fix for this ticket and confirmed the issue happened on Lucee. But the issue not in querynew function. Querynew() function correctly ignores the spaces but in Querysetcell() function if column name with spaces, the issue has been thrown by Lucee.

Pull Request: https://github.com/lucee/Lucee/pull/828

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 15 January 2020 at 03:17
Updated 27 April 2022 at 17:00
Resolved 7 April 2021 at 13:40