The fact that Mediawiki (I know, I think it is none of core, but some important extensions) doesn't work out of the box on the latest/distro-available versions of MySQL and MariaDB is worrying to me (specially when those were supposed to be the best supported systems(?)).
I know there is lots of people involved here, and that each database may have differents degrees of support, based on the user base, plus there has been a lot of changes on those databases since MySQL 5.0, but I had been crying wolf for over 2 years already: T112637. Supporting MySQL/MariaDB 5.5 doesn't mean we should't support the latest stable versions, too, if the changes are sensible.
Note I am not ranting here, and I am the first that will help anyone to fix their code, just want to urge everybody to:
* Support "real" (4-byte) UTF-8: utf8mb4 in MySQL/MariaDB (default in the latest versions) and start deprecating "fake" (3-byte) UTF-8: utf8 * Check code works as intended in "strict" mode (default in the latest versions), at least regarding testing * Check support for latest unicode standards ("emojies") * Avoiding unsafe writes to the database (non-deterministic statements) like UPDATE... LIMIT without ORDER BY * Add primary keys to all tables
Fixing those will likely reveal many hidden bugs by supposing a too lenient storage system and will allow better support for clustering solutions.
Anomie- I think you were thinking on (maybe?) abstracting schema for mediawiki- fixing the duality of binary (defining sizes in bytes) vs. UTF-8 (defining sizes in characters) would be an interesting problem to solve- the duality is ok, what I mean is being able to store radically different size of contents based on that setting.
I am also offering all mediawiki contributors time if you do not feel confident enough with sql/persistence storage systems to make those fixes, if you need support.
On Sat, Apr 28, 2018 at 3:58 PM, Brad Jorsch (Anomie) <bjorsch@wikimedia.org
wrote:
On Fri, Apr 27, 2018 at 5:58 PM, Antoine Musso hashar+wmf@free.fr wrote:
[T193222] MariaDB on Stretch uses the utf8mb4 character set. Attempting to create a key on VARCHAR(192) or larger would cause: Error: 1071 Specified key was too long; max key length is 767 bytes
Reducing the key length is the obvious solution and some fields could use to be converted to ENUM.
Personally, I'd rather we didn't use more enums. They work inconsistently for comparisons and ordering, and they require a schema change any time a new value is needed. It'd probably be better to use NameTableStore instead.
-- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l