Ticket Change Details
Not logged in

Artifact ID: a60f7f54d2c9fcfbec4d41a32b717de224f14bca
Ticket: 2a0c90d7b09cc2ff5fb401a84ad7344cd1e4867d
Connection string bug in SQLiteConnection
User & Date: mistachkin 2011-07-07 04:36:26

  1. comment changed to:
    In this code:
                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);
    shouldn't "Default" be "Delete"? There might be some other compares that are wrong.
    <hr /><i>anonymous claiming to be navaraf added on 2011-02-17 09:58:09 UTC:</i><br />
    Actually I believe the last parameter to FindKey should be "Default", not "Delete".
    <hr /><i>anonymous added on 2011-02-17 14:56:18 UTC:</i><br />
    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.
    <hr /><i>mistachkin added on 2011-07-05 06:24:37 UTC:</i><br />
    Fixed with [50b4844f0c].
  2. subsystem changed to: "Connection"