Call fsync() right after ftruncate() when in journal_mode=TRUNCATE and
when synchronous=FULL in order to ensure that transactions are durable
across a power loss that happens moments after the commit.  Proposed
fix for [https://bugzilla.mozilla.org/show_bug.cgi?id=1072773].
This is a cherrypick of [3e922208b68563489].
In the OP_Column opcode, when extracting a field that is past the end of
a short record (because the row was originally inserted prior to ALTER TABLE
ADD COLUMN) then make sure the output register is fully NULL and does not
contain leftover flags (such as MEM_Ephem) from its previous use.
Fix for ticket [43107840f1c02].  This is a cherrypick of
check-in [24780f8ddc1683fc].
Disable the use of strchrnul() unless specifically enabled by compile-time
options.  Cherrypick of check-in [e580470db77d6da9]
Fix problems with running UPDATE and DELETE against a VIEW and referencing
the rowid in the WHERE clause.  This is a cherrypick of [95f8ebdbf87326f2]
and [8523670d50004f3].
Increase the version number to 3.8.7.1
Version 3.8.7.1
This is a cherry-pick of version [b5df5ac052].
Make sure that NULL results from OP_Column are fully and completely NULL and do not have the MEM_Ephem bit set. Fix for ticket [094d39a4c95ee4].
Fix the %c format character in sqlite3VXPrintf() so that it correctly handles precisions larger than 70.
When a transaction or savepoint rollback occurs, save the positions of all open read-cursors so that they can be restored following the rollback operation.  Cherry-pick of check-in [dd03a2802f3f27]
Do not automatically remove the DISTINCT keyword from "a IN (SELECT DISTINCT ...)" expressions. Fix for [db87229497].
Consider using an automatic-index for a scan even if there exists a possible skip-scan that uses one or more "=" operators.
Adding the "noskipscan" token to an sqlite_stat1.stat field prevents an
index for being used with the skip-scan algorithm.
Update a couple of test cases to account for the fact that ROLLBACK does not always abort all running SELECT statements.
Fix a bug in the sqlite3TripAllCursors() routine that prevents it from
reporting errors.  It is unknown at this time whether or not this omission can
result in any incorrect result in an actual query.
When a SELECT statement is terminated by a ROLLBACK TO operation, make the
error message be "abort due to ROLLBACK" rather than 
"callback requested query abort".
Improved comments on the BtCursor.skipNext field.  No changes to code.
Avoid calling sqlite3BtreeKeysize() on a b-tree cursor in SKIPNEXT or SKIPPREV state.
Remove code from sqlite3BtreeKeySize() made unreachable by the previous
check-in.
Add an ALWAYS() to an always-true conditional in the WAL rollback logic.