On 8/17/15, Olivier Barthelemy <barthelemy at geovariances.com> wrote: > Hi, > > I have been using sqlite through Qt. > > I have been using for a while the boolean constraint "CHECK (varname='true' > OR varname='false')" when creating tables with boolean fields and had no > issues in Qt 4.8.6 (sqlite 3.7.7.1) > > Now i am trying to port to Qt 5.4.2 (sqlite 3.8.6). > > I can load already created databases that have this boolean constraint, or > create new tables with boolean fields that have this constraint, but the > constraint now always fail at an insert. > > Removing that constraint, or using "CHECK (varname=0 OR varname=1)" instead > makes the application work again > > Is it a regression that should be made to work again? Or was the constraint > invalid, and in that case there is a bug because adding the constraint > should fail?
You did not supply us with SQL statements to test. So I presume that the SQL is actually being generated by some kind of behind-the-scenes Qt magic. That makes me suspect that the change in behavior is due to changes in Qt, not due to changes in SQLite. If you can provide specific SQL statements that demonstrate your problem, that will be helpful in tracking down the cause. -- D. Richard Hipp drh at sqlite.org