Page MenuHomePhabricator

[keyserver] Avoid JSON cast when using MariaDB
ClosedPublic

Authored by ashoat on Jul 13 2022, 10:49 AM.
Tags
None
Referenced Files
F2208493: D4522.diff
Sun, Jul 7, 2:00 PM
F2204348: D4522.id14553.diff
Sat, Jul 6, 3:58 PM
F2204347: D4522.diff
Sat, Jul 6, 3:57 PM
Unknown Object (File)
Thu, Jul 4, 3:43 AM
Unknown Object (File)
Sun, Jun 30, 2:44 AM
Unknown Object (File)
Sat, Jun 29, 7:38 PM
Unknown Object (File)
Sat, Jun 29, 2:41 PM
Unknown Object (File)
Wed, Jun 26, 12:55 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
Branch
ashoat/mariadb
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

keyserver/src/fetchers/message-fetchers.js
113

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
This revision is now accepted and ready to land.Jul 17 2022, 12:53 PM