In this code:


<verbatim>
            defValue = FindKey(opts, "Journal Mode", "Delete");
            if (String.Compare(defValue, "Default", StringComparison.OrdinalIgnoreCase) != 0)
            {
              cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA journal_mode={0}", defValue);
              cmd.ExecuteNonQuery();
            }
</verbatim>


shouldn't "Default" be "Delete"? There might be some other compares that are wrong.

Actually I believe the last parameter to FindKey should be "Default", not "Delete".

I agree, it should check for "Default", not "Delete".  An explanation:

Consider the case of an existing database with a journal mode set to something other than delete (esp. WAL).  Connecting with the journal mode explicitly set to delete should change the journal mode, or at least attempt to.

If the connection string handling checks for "Delete" as the do-nothing default, then that scenario would not work properly.

Fixed with [50b4844f0c].