Skip to content

Conversation

@patrikjuvonen
Copy link
Contributor

Summary

Tests

Tested with test_sqlite.zip (cheers to botder)

Validation

To help validate the integrity of the update I have created the following bash script that diffs between my PR branch and the official package provided from the SQLite website.

#!/bin/bash

SQLITE_UPDATE_VERSION=3.37.2
SQLITE_PATH_NAME=sqlite-$SQLITE_UPDATE_VERSION

GIT_REPO_BRANCH=vendor/sqlite-$SQLITE_UPDATE_VERSION
GIT_REPO_URL=https://github.com/patrikjuvonen/mtasa-blue.git
GIT_REPO_SQLITE_PATH=vendor/sqlite/

echo 1. Download and extract $SQLITE_PATH_NAME...
curl https://www.sqlite.org/2022/sqlite-autoconf-3370200.tar.gz | tar -xz

echo 2. Fetch and checkout the vendor update branch $GIT_REPO_BRANCH from $GIT_REPO_URL...
git fetch $GIT_REPO_URL $GIT_REPO_BRANCH:$GIT_REPO_BRANCH
git checkout $GIT_REPO_BRANCH

echo 3. Start checking integrity...
diff -r --strip-trailing-cr $GIT_REPO_SQLITE_PATH sqlite-*

echo 4. Completed.
exec $SHELL

Past SQLite updates in MTA

Date From To Link
August 2021 3.35.5 3.36.0 (current) #2284
June 2021 3.35.2 3.35.5 #2245
March 2021 3.34.0 3.35.2 #2142
December 2020 3.32.3 3.34.0 #1960
July 2020 3.31.1 3.32.3 #1561
March 2020 3.30.1 3.31.1 #1260
November 2019 3.29.0 3.30.1 #1160
August 2019 3.28.0 3.29.0 #1028
May 2019 3.27.1 3.28.0 #913
February 2019 3.24.0 3.27.1 #818
July 2018 3.13.0 3.24.0 #245
August 2016 3.7.17 3.13.0 3aa1753
August 2013 3.7.8 3.7.17 fd195b7
October 2011 3.6.14 3.7.8 ca06363

Changelog

2022-01-06 (3.37.2)

  1. Fix a bug introduced in version 3.35.0 (2021-03-12) that can cause database corruption if a SAVEPOINT is rolled back while in PRAGMA temp_store=MEMORY mode, and other changes are made, and then the outer transaction commits. Check-in 73c2b50211d3ae26
  2. Fix a long-standing problem with ON DELETE CASCADE and ON UPDATE CASCADE in which a cache of the bytecode used to implement the cascading change was not being reset following a local DDL change. Check-in 5232c9777fe4fb13.
  3. Other minor fixes that should not impact production builds.

2021-12-30 (3.37.1)

  1. Fix a bug introduced by the UPSERT enhancements of version 3.35.0 that can cause incorrect byte-code to be generated for some obscure but valid SQL, possibly resulting in a NULL-pointer dereference.
  2. Fix an OOB read that can occur in FTS5 when reading corrupt database files.
  3. Improved robustness of the --safe option in the CLI.
  4. Other minor fixes to assert() statements and test cases.

2021-11-27 (3.37.0)

  1. STRICT tables provide a prescriptive style of data type management, for developers who prefer that kind of thing.
  2. When adding columns that contain a CHECK constraint or a generated column containing a NOT NULL constraint, the ALTER TABLE ADD COLUMN now checks new constraints against preexisting rows in the database and will only proceed if no constraints are violated.
  3. Added the PRAGMA table_list statement.
  4. CLI enhancements:
    1. Add the .connection command, allowing the CLI to keep multiple database connections open at the same time.
    2. Add the --safe command-line option that disables dot-commands and SQL statements that might cause side-effects that extend beyond the single database file named on the command-line.
    3. Performance improvements when reading SQL statements that span many lines.
  5. Added the sqlite3_autovacuum_pages() interface.
  6. The sqlite3_deserialize() does not and has never worked for the TEMP database. That limitation is now noted in the documentation.
  7. The query planner now omits ORDER BY clauses on subqueries and views if removing those clauses does not change the semantics of the query.
  8. The generate_series table-valued function extension is modified so that the first parameter ("START") is now required. This is done as a way to demonstrate how to write table-valued functions with required parameters. The legacy behavior is available using the -DZERO_ARGUMENT_GENERATE_SERIES compile-time option.
  9. Added new sqlite3_changes64() and sqlite3_total_changes64() interfaces.
  10. Added the SQLITE_OPEN_EXRESCODE flag option to sqlite3_open_v2().
  11. Use less memory to hold the database schema.

@patrikjuvonen patrikjuvonen added enhancement New feature or request upstream Related to vendor library labels Jan 7, 2022
@patrikjuvonen patrikjuvonen added this to the Next Release (1.6.0) milestone Jan 7, 2022
@patrikjuvonen patrikjuvonen self-assigned this Jan 7, 2022
@patrikjuvonen patrikjuvonen merged commit f2ac185 into multitheftauto:master Jan 7, 2022
@patrikjuvonen patrikjuvonen deleted the vendor/sqlite-3.37.2 branch January 7, 2022 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request upstream Related to vendor library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant