Project

General

Profile

Actions

Bug #13034

closed

SQL error when searching for smart class parameter

Added by Brice Sauvajon over 8 years ago. Updated over 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Search
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #12643: Smart variable/class param free text search throws "no such column: lookup_values.value" errorClosedTomer Brisker12/01/2015Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Is duplicate of Bug #12643: Smart variable/class param free text search throws "no such column: lookup_values.value" error added
Actions #2

Updated by Dominic Cleal over 8 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.

Actions #3

Updated by Brice Sauvajon over 8 years ago

I've tested the patch, it works great. Thank's a lot !

Actions

Also available in: Atom PDF