From 0d099d1930b1870db7f20761388b9772d0abfedc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 10 Jan 2017 17:25:20 +0200 Subject: Add PRAGMA to list of complete query prefixes 'PRAGMA integrity_check' is like SELECT. --- odb/sqlite/query.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'odb') diff --git a/odb/sqlite/query.cxx b/odb/sqlite/query.cxx index 6e475d8..31d81be 100644 --- a/odb/sqlite/query.cxx +++ b/odb/sqlite/query.cxx @@ -199,18 +199,20 @@ namespace odb // rather than getting involved with the portable case- // insensitive string comparison mess. // - if (s.compare (0, (n = 5), "WHERE") == 0 || - s.compare (0, (n = 5), "where") == 0 || - s.compare (0, (n = 6), "SELECT") == 0 || - s.compare (0, (n = 6), "select") == 0 || + if (s.compare (0, (n = 5), "WHERE") == 0 || + s.compare (0, (n = 5), "where") == 0 || + s.compare (0, (n = 6), "SELECT") == 0 || + s.compare (0, (n = 6), "select") == 0 || s.compare (0, (n = 8), "ORDER BY") == 0 || s.compare (0, (n = 8), "order by") == 0 || s.compare (0, (n = 8), "GROUP BY") == 0 || s.compare (0, (n = 8), "group by") == 0 || - s.compare (0, (n = 6), "HAVING") == 0 || - s.compare (0, (n = 6), "having") == 0 || - s.compare (0, (n = 4), "WITH") == 0 || - s.compare (0, (n = 4), "with") == 0) + s.compare (0, (n = 6), "HAVING") == 0 || + s.compare (0, (n = 6), "having") == 0 || + s.compare (0, (n = 4), "WITH") == 0 || + s.compare (0, (n = 4), "with") == 0 || + s.compare (0, (n = 6), "PRAGMA") == 0 || + s.compare (0, (n = 6), "pragma") == 0) { // It either has to be an exact match, or there should be // a whitespace following the keyword. -- cgit v1.1