From 5596ff596003e398b70b08b978386ead51615adf Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 16 Aug 2011 21:36:58 +0000 Subject: [PATCH] sqlite: unquote fields to avoid filter failures - preliminary fix for #822 --- plugins/input/sqlite/sqlite_featureset.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/input/sqlite/sqlite_featureset.cpp b/plugins/input/sqlite/sqlite_featureset.cpp index 48201b3e4..8c7126314 100644 --- a/plugins/input/sqlite/sqlite_featureset.cpp +++ b/plugins/input/sqlite/sqlite_featureset.cpp @@ -31,6 +31,7 @@ #include #include #include +#include // ogr #include "sqlite_featureset.hpp" @@ -77,7 +78,9 @@ feature_ptr sqlite_featureset::next() for (int i = 2; i < rs_->column_count (); ++i) { const int type_oid = rs_->column_type (i); - const char* fld_name = rs_->column_name (i); + // TODO - avoid copying string + // TODO - handle single quotes + const char* fld_name = mapnik::unquote_sql(rs_->column_name(i)).c_str(); switch (type_oid) {