Bug report #6726

Query builder quotes field names with spaces twice; resulting query fails

Added by Alister Hood almost 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:GUI
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:15890

Description

- Add the attached layer.
- Open the layer's attribute table and click the advanced search button.
- Double-click on each field name to insert it in the search query. They will be inserted as "example" in quotes and "example 1" in two sets of quotes! I'm not sure if the quotes are needed in the first case, but they certainly aren't a problem. But in the second case there should only be one set of quotes. If you run a query with the two sets of quotes you get an error message: "Parsing error: syntax error, unexpected COLUMN_REF, expecting $end".

This is a regression since 1.8

Book1.csv Magnifier (34 Bytes) Alister Hood, 2012-11-18 04:38 PM

Associated revisions

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Target version set to Version 2.0.0
  • Status changed from Open to Feedback

I'm pretty sure that the quotes are added to escape the space in the second column name, anyway on the latest master this do not seems to cause the query builder to fail. Please check and report back.

#2 Updated by Giovanni Manghi over 6 years ago

I'm sorry you are right, I was testing on 1.8 and not master. The behavior is confirmed and it causes the query to fail.

#3 Updated by Giovanni Manghi over 6 years ago

  • Status changed from Feedback to Open

#4 Updated by Jürgen Fischer over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF