System.Data.SQLite
Check-in [2bed8a7ba9]
Not logged in

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

Overview
Comment:Do not try to rollback a nested transaction after it has been committed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tkt-1f7bfff467
Files: files | file ages | folders
SHA1:2bed8a7ba9e4d225d42c57f12f721dcff3aad685
User & Date: mistachkin 2016-10-30 03:27:29
Context
2016-10-30
20:31
Fix commit of nested transactions that are out-of-order. Use a sequence number to construct SAVEPOINT names, not a random number. check-in: 0898ed0bbf user: mistachkin tags: tkt-1f7bfff467
03:27
Do not try to rollback a nested transaction after it has been committed. check-in: 2bed8a7ba9 user: mistachkin tags: tkt-1f7bfff467
2016-10-29
22:19
Make the SAVEPOINT names used for nested transactions much less predictable. check-in: 09db2a0a1b user: mistachkin tags: tkt-1f7bfff467
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197


198
199
200
201
202
203
204
            if (level - 1 == 0)
            {
                using (SQLiteCommand cmd = _cnn.CreateCommand())
                {
                    cmd.CommandText = "COMMIT;";
                    cmd.ExecuteNonQuery();
                }

                _cnn._transactionLevel--;
                _cnn = null;
            }
            else
            {
                using (SQLiteCommand cmd = _cnn.CreateCommand())
                {
                    cmd.CommandText = String.Format(
                        "RELEASE {0};", GetSavePointName(level - 1));

                    cmd.ExecuteNonQuery();
                }

                _cnn._transactionLevel--;
            }


        }

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

        /// <summary>
        /// Returns the underlying connection to which this transaction applies.
        /// </summary>







<
<
<










|
<
|
>
>







175
176
177
178
179
180
181



182
183
184
185
186
187
188
189
190
191
192

193
194
195
196
197
198
199
200
201
202
            if (level - 1 == 0)
            {
                using (SQLiteCommand cmd = _cnn.CreateCommand())
                {
                    cmd.CommandText = "COMMIT;";
                    cmd.ExecuteNonQuery();
                }



            }
            else
            {
                using (SQLiteCommand cmd = _cnn.CreateCommand())
                {
                    cmd.CommandText = String.Format(
                        "RELEASE {0};", GetSavePointName(level - 1));

                    cmd.ExecuteNonQuery();
                }
            }


            _cnn._transactionLevel--;
            _cnn = null;
        }

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

        /// <summary>
        /// Returns the underlying connection to which this transaction applies.
        /// </summary>