Actions
Bug #13034
closedSQL error when searching for smart class parameter
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Search
Target version:
-
Description
On the smart class parameters view, when i search for a parameter with a simple string, for example just typing "host" in the search field, I've got a sql error :
Mysql2::Error: Unknown column 'lookup_values.value' in 'where clause': SELECT `lookup_keys`.`puppetclass_id` FROM `lookup_keys` WHERE `lookup_keys`.`type` IN ('PuppetclassLookupKey') AND ((`lookup_keys`.`key` LIKE '%host%' OR `lookup_values`.`value` LIKE '%host%' OR `puppetclasses`.`name` LIKE '%host%')) ORDER BY `lookup_keys`.`key` ASC LIMIT 20 OFFSET 0
The error seems to be that the where clause uses fields from the tables lookup_values and puppetclasses but they are not present in the FROM.
I tested the query after adding the tables in the FROM, but it generates a temporary table which fullfills the /tmp and crashes
Updated by Dominic Cleal about 9 years ago
- Is duplicate of Bug #12643: Smart variable/class param free text search throws "no such column: lookup_values.value" error added
Updated by Dominic Cleal about 9 years ago
- Status changed from New to Duplicate
Thanks for the report. This has been fixed under #12643 for release in Foreman 1.10.1.
Updated by Brice Sauvajon about 9 years ago
I've tested the patch, it works great. Thank's a lot !
Actions