Open xavivars opened 1 year ago
Does WordPress actually use FLOOR()
though? I'm using SQLite 3.34 and this plugin works floorlessly (sorry).
I'm sure some plugins require it - but then it should be the plugin that checks the database version.
If the idea is for this plugin to "transparently" replace the DB, so that no-one (neither core nor plugins) need to know that you are using SQLite, I don't think plugins are the ones who would need to check the version.
And making sure that top plugins are working should be a goal for this project. In my case, the plugin that was failing was Wordfence (top 11 WordPress.org most used plugin according to https://wordpress.org/plugins/browse/popular/)
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