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 to 3.46.0 #1974

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented May 23, 2024

What does this implement/fix?

Update embedded SQLite3 to 3.46.0 released earlier today.

Summary

  • Enhancements to the "PRAGMA optimize" command.
  • New capabilities in the date and time functions.
  • Added the json_pretty() SQL function.
  • Allow _ separators in numeric literals, for human readability.
  • Query planner improvements
  • JSON processing improvements

FULL CHANGELOG

  1. Enhance PRAGMA optimize in multiple ways, to make it simpler to use:
    1. PRAGMA optimize automatically implements a temporary analysis limit to prevent excess runtime on large databases.
    2. Added the new 0x10000 bitmask option to check for updates on all tables.
    3. Automatically re-analyze tables that do not have sqlite_stat1 entries.
  2. Enhancements to the date and time functions:
    1. The strftime() SQL function now supports %G, %g, %U, and %V.
    2. New modifiers 'ceiling' and 'floor' control the algorithm used to resolve ambiguous dates when shifting a date by an integer number of months and/or years.
    3. The 'utc' and 'localtime' modifiers are now no-ops if SQLite knows that the time is already in UTC or in the localtime, respectively.
  3. Add support for underscore ("_") characters between digits in numeric literals.
  4. Add the json_pretty() SQL function.
  5. Query planner improvements:
    1. The "VALUES-as-coroutine" optimization enables INSERT statements with thousands of rows in the VALUES clause to parse and run in about half the time and using about half as much memory.
    2. Allow the use of an index for queries like "SELECT count(DISTINCT col) FROM ...", even if the index records are not smaller than the table records.
    3. Improved recognition of cases where the value of an SQL function is constant because all its arguments are constant.
    4. Enhance the WHERE-clause push-down optimization so that it is able to push down WHERE clause terms containing uncorrelated subqueries.
  6. Allocate additional memory from the heap for the SQL parser stack if that stack overflows, rather than reporting a "parser stack overflow" error.
  7. JSON changes:
    1. Allow ASCII control characters within JSON5 string literals.
    2. Fix the -> and ->> operators so that when the right-hand side operand is a string that looks like an integer it is still treated as a string, because that is what PostgreSQL does.
  8. Allow large hexadecimal literals to be used as the DEFAULT value to a table column.

Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


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.
  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)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER requested a review from a team May 23, 2024 18:56
@DL6ER DL6ER merged commit 825a14a into development-v6 May 23, 2024
15 checks passed
@DL6ER DL6ER deleted the update/sqlite_3.46.0 branch May 23, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants