WordPress / WordPress/sqlite-database-integration

Plugin should run more extensive checks

Open
#32 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
363
Forks
67
Avg merge
2d 15h
Merged PRs (30d)
7

Description

Currently, the plugin says your system is ready as soon as the host has SQLite and SQLite3 class exists.

But MATH functions (like FLOOR) are not available before SQLite 3.35 [1]. While that version is more than 2 years old, Linux distros like Debian stable [2] (which is the one where the WordPress 7.x Docker images are based from [3]) still have 3.34.

IMHO, the plugin should make sure all the TOKENs it supports and creates SQLIte queries for (like FLOOR [4]) are supported in the server, so maybe a version check should be done against the SQLite3 version running on the server.

[1] https://www.sqlite.org/changes.html#version_3_35_0
[2] https://packages.debian.org/bullseye/libsqlite3-0
[3] https://hub.docker.com/layers/library/wordpress/php7.4-fpm/images/sha256-08a1cb1fbe022cd08d5d19e6f95ab549194927959a297da41590d4f2d884f7b4?context=explore
[4] https://github.com/WordPress/sqlite-database-integration/blob/main/wp-includes/sqlite/class-wp-sqlite-lexer.php#L919

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the plugin's readiness check and the SQLite token definitions in wp-includes/sqlite/class-wp-sqlite-lexer.php around line 919. Trace how supported SQL functions are checked before the plugin reports the system ready. Done means incompatible SQLite capabilities, including FLOOR, are detected rather than accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, sqlite
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.