fix(test): Disable SQL parsing by default #4462

This commit is contained in:
Alex Fabijanic 2024-02-15 16:50:42 +01:00
parent 2fe694e4d3
commit 137cd32183

View File

@ -206,11 +206,11 @@ void DataTest::testFeatures()
assertTrue (!sess.getFeature("forceEmptyString")); assertTrue (!sess.getFeature("forceEmptyString"));
assertTrue (sess.hasFeature("sqlParse")); assertTrue (sess.hasFeature("sqlParse"));
assertTrue (sess.getFeature("sqlParse")); assertFalse (sess.getFeature("sqlParse"));
sess.setFeature("sqlParse", false);
assertTrue (!sess.getFeature("sqlParse"));
sess.setFeature("sqlParse", true); sess.setFeature("sqlParse", true);
assertTrue (sess.getFeature("sqlParse")); assertTrue (sess.getFeature("sqlParse"));
sess.setFeature("sqlParse", false);
assertFalse (sess.getFeature("sqlParse"));
assertTrue (sess.hasFeature("autoCommit")); assertTrue (sess.hasFeature("autoCommit"));
assertTrue (sess.getFeature("autoCommit")); assertTrue (sess.getFeature("autoCommit"));
@ -1498,6 +1498,10 @@ void DataTest::testSQLParse()
sess.setFeature("autoCommit", false); sess.setFeature("autoCommit", false);
assertTrue (!sess.getFeature("autoCommit")); assertTrue (!sess.getFeature("autoCommit"));
assertFalse (sess.getFeature("sqlParse"));
sess.setFeature("sqlParse", true);
assertTrue (sess.getFeature("sqlParse"));
Statement stmt = (sess << "SELECT %s%c%s,%d,%u,%f,%s FROM Person WHERE Name LIKE 'Simp%%'", Statement stmt = (sess << "SELECT %s%c%s,%d,%u,%f,%s FROM Person WHERE Name LIKE 'Simp%%'",
"'",'a',"'",-1, 1u, 1.5, "42", now); "'",'a',"'",-1, 1u, 1.5, "42", now);