Opened 14 years ago

Closed 14 years ago

#2407 closed bug (fixed)

Quick search behaviour in attributes tables has changed

Reported by: GuZzO Owned by: nobody
Priority: minor: annoyance Milestone: Version 1.5.0
Component: Vectors Version: Trunk
Keywords: search, attribute table Cc:
Must Fix for Release: No Platform: Windows
Platform Version: Windows XP Awaiting user input: no

Description

When i start a search within attribute tables with Mimas (1.0.3), searches return results as if it was a SQL request -> SELECT * FROM table WHERE column like '%word_to_search%'

When i start a search within attribute tables with Enceladus (1.0.4), searches return results as if it was an exact match SQL request -> SELECT * FROM table WHERE column = 'word_to_search'

I don't know if it's referenced as bug but I prefer the previous behaviour. The new one is too rigid...

Change History (4)

comment:1 by lutra, 14 years ago

Did you tried adding the wildcards?

comment:2 by GuZzO, 14 years ago

I tried adding % and * before and/or after the word I searched but nothing changes.... I only got results when i search the exact word (including capitals letters)

I use PostGIS as vectors provider.

comment:3 by marisn, 14 years ago

Unfortunately "Quick search" is not an "find" anymore. Wildcards are not accepted, unescaped SQL also gives errors. I.e. try to find "ab'c" ->

syntax error, unexpected Unknown_CHARACTER, expecting $end

Also it allows to inject SQL. I.e. select all records:

text' or 1=1 or COLUMN like 'text

Tested on QGIS trunk r12951M with Shapefile (DBF).

comment:4 by wonder, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in r13179 (and escaping quotes in r13180)

Note: See TracTickets for help on using tickets.