Open nickchomey opened 1 year ago
The plugin also says "myisam" for storage engine instead of "innodb".
It would be good to expose the actual SQLite version, but we can't do that directly with db_version because those sqlite versions are numbers like 3.7.4 or 3.27.5. Those will fail the minimum MySQL version check.
In SQLite there are feature-difference breakpoints at
I propose:
This semantic version number kludge is unambiguous and durable because we know there will never be a MySQL or MariaDB 5.8, 5.9, 5.10 etc.
The actual version of SQLite in use depends on the version installed as the php extension on each host. I've never seen anything before 3.7 in the wild. A variety of other versions are out there.
Caution: sometimes the command-line sqlite3
utility on a box has a different version than the php extension. If you use the command line to debug or do other things, this causes the confusion (and bizarre to people accustomed to client-server DBMS operation) situation where two different versions of the software are accessing the same database container files simultaneously. Watch for that.
I defer to Ollie! Glad that I was able to point out something that needs attention.
The return for db_version()
was updated to 8.0
in https://github.com/WordPress/sqlite-database-integration/commit/768f8cc6d2a2707f744bba31cb0e5421a68c0f4f (following WordPress's minimum required version bump). Should this issue be marked as resolved?
Regarding the proposals mentioned in https://github.com/WordPress/sqlite-database-integration/issues/24#issuecomment-1466896373, I think that WordPress Core's native support for SQLite would promise more accurate version info.
The db_version function returns 5.5, noting that it is the newest version of MySQL. However 8.0 is the latest, and there's also 5.7. Perhaps it won't matter at all, but I do know that some plugins check db versions and set different schemas based on that. Presuming that this function overrides the default one, it seems to me that it should retuen at least 5.7, if not 8.0.