Page MenuHomePhabricator

[keyserver] Avoid JSON cast when using MariaDB
ClosedPublic

Authored by ashoat on Jul 13 2022, 10:49 AM.
Tags
None
Referenced Files
F3540235: D4522.id14441.diff
Thu, Dec 26, 4:39 AM
F3540234: D4522.id.diff
Thu, Dec 26, 4:39 AM
Unknown Object (File)
Mon, Dec 16, 12:21 AM
Unknown Object (File)
Mon, Dec 16, 12:21 AM
Unknown Object (File)
Sun, Dec 15, 8:21 AM
Unknown Object (File)
Sun, Dec 15, 7:27 AM
Unknown Object (File)
Sun, Dec 15, 7:27 AM
Unknown Object (File)
Sun, Dec 15, 7:26 AM

Details

Summary

One difference between MySQL and MariaDB is that MySQL has a JSON column type and MariaDB doesn't.

MySQL requires that the second parameter to JSON_CONTAINS is a JSON type. MariaDB doesn't have JSON types, so it doesn't have this requirement.

We need to make sure we do the cast for MySQL, but not for MariaDB.

Depends on D4521

Test Plan

I ran the web application and clicked around a bunch. Full test plan will come later

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

keyserver/src/fetchers/message-fetchers.js
113 ↗(On Diff #14441)

Should probably make a follow-up task to the mysql migration to remove the branching logic (which you may already have).

keyserver/src/fetchers/message-fetchers.js
113 ↗(On Diff #14441)
This revision is now accepted and ready to land.Jul 17 2022, 12:53 PM