Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update embedded SQLite3 engine to version 3.40.0 #1482

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Nov 16, 2022

Thank you for your contribution to the Pi-hole Community!

Please read the comments below to help us consider your Pull Request.

We are all volunteers and completing the process outlined will help us review your commits quicker.

Please make sure you

  1. Base your code and PRs against the repositories developmental branch.
  2. Sign Off all commits as we enforce the DCO for all contributions
  3. Sign all your commits as they must have verified signatures
  4. File a pull request for any change that requires changes to our documentation at our documentation repo

What does this PR aim to accomplish?:

See title


Full Changelog (emphasis added by me):

2022-11-16 (3.40.0)

  1. Add support for compiling SQLite to WASM and running it in web browsers. NB: The WASM build and its interfaces are considered "beta" and are subject to minor changes if the need arises. We anticipate finalizing the interface for the next release.
  2. Add the recovery extension that might be able to recover some content from a corrupt database file. (pihole-FTL is already offering the .recover instruction since a long time by now)
  3. Query planner enhancements:
    1. Recognize covering indexes on tables with more than 63 columns where columns beyond the 63rd column are used in the query and/or are referenced by the index.
    2. Extract the values of expressions contained within expression indexes where practical, rather than recomputing the expression.
    3. The NOT NULL and IS NULL operators (and their equivalents) avoid loading the content of large strings and BLOB values from disk.
    4. Avoid materializing a view on which a full scan is performed exactly once. Use and discard the rows of the view as they are computed.
    5. Allow flattening of a subquery that is the right-hand operand of a LEFT JOIN in an aggregate query.
  4. A new typedef named sqlite3_filename is added and used to represent the name of a database file. Various interfaces are modified to use the new typedef instead of "char*". This interface change should be fully backwards compatible, though it might cause (harmless) compiler warnings when rebuilding some legacy applications.
  5. Add the sqlite3_value_encoding() interface.
  6. Security enhancement: SQLITE_DBCONFIG_DEFENSIVE is augmented to prohibit changing the schema_version. The schema_version becomes read-only in defensive mode.
  7. Enhancements to the PRAGMA integrity_check statement:
    1. Columns in non-STRICT tables with TEXT affinity should not contain numeric values.
    2. Columns in non-STRICT tables with NUMERIC affinity should not contain TEXT values that could be converted into numbers.
    3. Verify that the rows of a WITHOUT ROWID table are in the correct order.
  8. Enhance the VACUUM INTO statement so that it honors they PRAGMA synchronous setting.
  9. Enhance the sqlite3_strglob() and sqlite3_strlike() APIs so that they are able to accept NULL pointers for their string parameters and still generate a sensible result.
  10. Provide the new SQLITE_MAX_ALLOCATION_SIZE compile-time option for limiting the size of memory allocations.
  11. Change the algorithm used by SQLite's built-in pseudo-random number generator (PRNG) from RC4 to Chacha20.
  12. Allow two or more indexes to have the same name as long as they are all in separate schemas.
  13. Miscellaneous performance optimizations result in about 1% fewer CPU cycles used on typical workloads. (this is the most important change for Pi-hole in this release)

How does this PR accomplish the above?:

See title, too

Link documentation PRs if any are needed to support this PR:

-/-


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER added the SQLite3 label Nov 16, 2022
@DL6ER DL6ER requested a review from a team November 16, 2022 17:04
@DL6ER DL6ER added the PR: Approval Required Open Pull Request, needs approval label Nov 16, 2022
@DL6ER DL6ER merged commit cafa2ef into development Nov 17, 2022
@DL6ER DL6ER deleted the update/sqlite_3.40.0 branch November 17, 2022 11:51
@DL6ER DL6ER mentioned this pull request Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Approval Required Open Pull Request, needs approval SQLite3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants