summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbpp/sqlParse.ll2
-rw-r--r--libdbpp/unittests/parseTest.sql3
-rw-r--r--libdbpp/unittests/testConnection.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/libdbpp/sqlParse.ll b/libdbpp/sqlParse.ll
index 0661abc..684b996 100644
--- a/libdbpp/sqlParse.ll
+++ b/libdbpp/sqlParse.ll
@@ -22,7 +22,7 @@ comment ("--"{non_newline}*)
other .
term ;
any ({other}|{space})
-quote '
+quote ('|\")
quote_apos ''
quote_esc \\.
dolq_start [A-Za-z\200-\377_]
diff --git a/libdbpp/unittests/parseTest.sql b/libdbpp/unittests/parseTest.sql
index cfba78f..6a3df82 100644
--- a/libdbpp/unittests/parseTest.sql
+++ b/libdbpp/unittests/parseTest.sql
@@ -13,3 +13,6 @@ INSERT INTO name(t, i) VALUES('string', 3);
/*! comments with a ;*/;
/*! Because reasons */;
+SET @cmd="SET @broken_views = (select count(*) from information_schema.views"
+ " where table_schema='performance_schema')";
+
diff --git a/libdbpp/unittests/testConnection.cpp b/libdbpp/unittests/testConnection.cpp
index a40c5cc..159e5a2 100644
--- a/libdbpp/unittests/testConnection.cpp
+++ b/libdbpp/unittests/testConnection.cpp
@@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE( parse )
mock->executeScript(s, rootDir);
MockDb * mockdb = dynamic_cast<MockDb *>(mock);
BOOST_REQUIRE(mockdb);
- BOOST_REQUIRE_EQUAL(2, mockdb->executed.size());
+ BOOST_REQUIRE_EQUAL(3, mockdb->executed.size());
BOOST_REQUIRE_EQUAL("INSERT INTO name(t, i) VALUES('string', 3)", mockdb->executed[1]);
delete mock;
}