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

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

Overview
Comment:Further adjustments.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sessionStreamManager
Files: files | file ages | folders
SHA1: fc3f62b4be0f3a70b47fea65b3f6ffc5fbc12372
User & Date: mistachkin 2017-10-13 16:47:58
Context
2017-10-13
17:11
Prevent delegates used for native callbacks from being disposed while in use. check-in: 489188361e user: mistachkin tags: sessionStreamManager
16:47
Further adjustments. check-in: fc3f62b4be user: mistachkin tags: sessionStreamManager
2017-10-12
22:27
Incomplete work in progress on stream adapter object lifetime fixes. check-in: c4fb95f1eb user: mistachkin tags: sessionStreamManager
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
....
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
                    return SQLiteErrorCode.Misuse;

                if (nData > 0)
                {
                    byte[] bytes = new byte[nData];
                    int nRead = localStream.Read(bytes, 0, nData);

                    if (nRead > 0)
                    {
                        if (pData != IntPtr.Zero)
                            Marshal.Copy(bytes, 0, pData, nRead);

                        nData = nRead;
                    }
                }

                return SQLiteErrorCode.Ok;
            }
            catch (Exception e)
            {
                try
................................................................................
        #endregion

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

        #region IEnumerable<ISQLiteChangeSetMetadataItem> Members
        public IEnumerator<ISQLiteChangeSetMetadataItem> GetEnumerator()
        {
            SQLiteConnectionFlags flags = GetFlags();
            return new SQLiteStreamChangeSetEnumerator(inputStream, flags);
        }
        #endregion

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

        #region IEnumerable Members
        IEnumerator System.Collections.IEnumerable.GetEnumerator()







<
<
|
|

|
<







 







|
|







884
885
886
887
888
889
890


891
892
893
894

895
896
897
898
899
900
901
....
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
                    return SQLiteErrorCode.Misuse;

                if (nData > 0)
                {
                    byte[] bytes = new byte[nData];
                    int nRead = localStream.Read(bytes, 0, nData);



                    if ((nRead > 0) && (pData != IntPtr.Zero))
                        Marshal.Copy(bytes, 0, pData, nRead);

                    nData = nRead;

                }

                return SQLiteErrorCode.Ok;
            }
            catch (Exception e)
            {
                try
................................................................................
        #endregion

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

        #region IEnumerable<ISQLiteChangeSetMetadataItem> Members
        public IEnumerator<ISQLiteChangeSetMetadataItem> GetEnumerator()
        {
            return new SQLiteStreamChangeSetEnumerator(
                inputStream, GetFlags());
        }
        #endregion

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

        #region IEnumerable Members
        IEnumerator System.Collections.IEnumerable.GetEnumerator()

Changes to Tests/session.eagle.

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
###############################################################################

proc changeSetFileToString { connection fileName includeValues } {
  set result [list]

  if {[isObjectHandle $connection] && $connection ne "null"} then {
    if {[openStreamChangeSetForConnection \
        $connection $fileName "" changeSet]} then {
      return [changeSetToString $changeSet(changeSet) $includeValues]
    }
  }

  return $result
}

###############################################################################







|
|







189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
###############################################################################

proc changeSetFileToString { connection fileName includeValues } {
  set result [list]

  if {[isObjectHandle $connection] && $connection ne "null"} then {
    if {[openStreamChangeSetForConnection \
        $connection $fileName "" state]} then {
      return [changeSetToString $state(changeSet) $includeValues]
    }
  }

  return $result
}

###############################################################################