[interchange-bugs] [Comment] Re: [rt.icdevgroup.org #307] Error creating account in standard catalog with Sqlite database

Peter Ajamian via RT interchange-comment at rt.icdevgroup.org
Thu Aug 27 10:28:38 UTC 2009


http://rt.icdevgroup.org/Ticket/Display.html?id=307
This is a comment.  It is not sent to the Requestor(s):

This has always been an issue with IC.  The issue is that IC performs an
Insert to create the record first and then an update with all the data
in a separate step.  The problem is not limited to SQLite but also
occurs in PostgreSQL.  The only reason that MySQL doesn't do it is
because MySQL has the (rather underhanded) behavior of setting an
implicit default of an empty string for text/char/varchar columns that
have the not null constraint set.  Both PostgreSQL and SQLite do exactly
what you ask, though, and will attempt to set the field to null, and
then complain that the column has a not null constraint.

The easy workaround is to simply remove the not null constraint from the
password column.  alternatively, you can set an explicit default for the
column to the empty string ('').  The "correct" way to fix it would be
to find out why IC is performing an INSERT ahead of time and stop the
errant behavior.  My personal feeling is unless you're willing to spend
loads of time tracking down this bug just remove the not null constraint
and be done with it.


Peter





More information about the interchange-bugs mailing list