System.Data.SQLite

Check-in [7b49ab3bf0]
Login

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

Overview
Comment:Prevent native database connection handles from entering the connection pool if they have been used to create a virtual table module.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7b49ab3bf0631a991aceaffb7372e7fceed069c9
User & Date: mistachkin 2013-07-16 19:48:34.047
Context
2013-07-17
07:21
Minor improvement to FAQ #22. check-in: 2b950c2ead user: mistachkin tags: trunk
2013-07-16
19:48
Prevent native database connection handles from entering the connection pool if they have been used to create a virtual table module. check-in: 7b49ab3bf0 user: mistachkin tags: trunk
03:33
Simplify the change in the previous check-in and support the Debug/ReleaseStatic build configurations as well. check-in: 385fa3f34d user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to System.Data.SQLite/SQLite3.cs.
201
202
203
204
205
206
207


208
209
210
211
212
213
214
                SQLiteModule module = pair.Value;

                if (module == null)
                    continue;

                module.Dispose();
            }


        }
    }
#endif

    ///////////////////////////////////////////////////////////////////////////////////////////////

    // It isn't necessary to cleanup any functions we've registered.  If the connection







>
>







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
                SQLiteModule module = pair.Value;

                if (module == null)
                    continue;

                module.Dispose();
            }

            _modules.Clear();
        }
    }
#endif

    ///////////////////////////////////////////////////////////////////////////////////////////////

    // It isn't necessary to cleanup any functions we've registered.  If the connection
1733
1734
1735
1736
1737
1738
1739









1740
1741
1742
1743
1744
1745
1746

        if (module.CreateDisposableModule(_sql))
        {
            if (_modules == null)
                _modules = new Dictionary<string, SQLiteModule>();

            _modules.Add(module.Name, module);









        }
        else
        {
            throw new SQLiteException(GetLastError());
        }
    }








>
>
>
>
>
>
>
>
>







1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757

        if (module.CreateDisposableModule(_sql))
        {
            if (_modules == null)
                _modules = new Dictionary<string, SQLiteModule>();

            _modules.Add(module.Name, module);

            if (_usePool)
            {
                _usePool = false;

#if !NET_COMPACT_20 && TRACE_CONNECTION
                Trace.WriteLine(String.Format("CreateModule (Pool) Disabled: {0}", _sql));
#endif
            }
        }
        else
        {
            throw new SQLiteException(GetLastError());
        }
    }