System.Data.SQLite
Check-in [e8355ff70e]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:1.0.39.0
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sourceforge
Files: files | file ages | folders
SHA1: e8355ff70ea1ac57e1c7275e0418c38932cf7cc8
User & Date: rmsimpson 2007-01-10 14:49:19
Context
2007-01-10
14:50
SQLite 3.3.10 check-in: 0b4eec86dd user: rmsimpson tags: sourceforge
14:49
1.0.39.0 check-in: e8355ff70e user: rmsimpson tags: sourceforge
2006-11-22
07:30
Corrected date check-in: 168625c7ec user: rmsimpson tags: sourceforge
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/SQLiteCommand.cs.

   344    344         {
   345    345           if (_activeReader != null)
   346    346             throw new InvalidOperationException("Cannot set Connection while a DataReader is active");
   347    347   
   348    348           if (_cnn != null)
   349    349           {
   350    350             ClearCommands();
   351         -          _cnn._commandList.Remove(this);
          351  +          _cnn.AddCommand(this);
   352    352           }
   353    353   
   354    354           _cnn = value;
   355    355   
   356    356           if (_cnn != null)
   357         -          _cnn._commandList.Add(this);
          357  +          _cnn.RemoveCommand(this);
   358    358         }
   359    359       }
   360    360   
   361    361       /// <summary>
   362    362       /// Forwards to the local Connection property
   363    363       /// </summary>
   364    364       protected override DbConnection DbConnection

Changes to System.Data.SQLite/SQLiteConnection.cs.

   458    458       {
   459    459         if (_sql != null)
   460    460         {
   461    461           // Force any commands associated with this connection to release their unmanaged
   462    462           // resources.  The commands are still valid and will automatically re-acquire the
   463    463           // unmanaged resources the next time they are run -- provided this connection is
   464    464           // re-opened before then.
   465         -        foreach(SQLiteCommand cmd in _commandList)
   466         -          cmd.ClearCommands();
          465  +        lock (_commandList)
          466  +        {
          467  +          foreach (SQLiteCommand cmd in _commandList)
          468  +            cmd.ClearCommands();
          469  +        }
   467    470   
   468    471   #if !PLATFORM_COMPACTFRAMEWORK
   469    472           if (_enlistment != null)
   470    473           {
   471    474             // If the connection is enlisted in a transaction scope and the scope is still active,
   472    475             // we cannot truly shut down this connection until the scope has completed.  Therefore make a 
   473    476             // hidden connection temporarily to hold open the connection until the scope has completed.
................................................................................
  1841   1844         }
  1842   1845   
  1843   1846         tbl.EndLoadData();
  1844   1847         tbl.AcceptChanges();
  1845   1848   
  1846   1849         return tbl;
  1847   1850       }
         1851  +
         1852  +    internal void AddCommand(SQLiteCommand cmd)
         1853  +    {
         1854  +      lock (_commandList)
         1855  +      {
         1856  +        _commandList.Add(cmd);
         1857  +      }
         1858  +    }
         1859  +
         1860  +    internal void RemoveCommand(SQLiteCommand cmd)
         1861  +    {
         1862  +      lock (_commandList)
         1863  +      {
         1864  +        _commandList.Remove(cmd);
         1865  +      }
         1866  +    }
  1848   1867     }
  1849   1868   
  1850   1869     /// <summary>
  1851   1870     /// The I/O file cache flushing behavior for the connection
  1852   1871     /// </summary>
  1853   1872     public enum SynchronizationModes
  1854   1873     {