Page MenuHomePhabricator

[keyserver] Use VALUE instead of VALUES in DUPLICATE KEY UPDATE on MariaDB
ClosedPublic

Authored by ashoat on Jul 13 2022, 4:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 4:23 PM
Unknown Object (File)
Mon, Dec 16, 12:21 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, 7:27 AM
Unknown Object (File)
Sun, Dec 15, 7:27 AM
Unknown Object (File)
Sun, Dec 15, 7:26 AM
Unknown Object (File)
Sun, Dec 15, 7:22 AM

Details

Summary

See here – MariaDB 10.3.3 and higher require this change.

Depends on D4522

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

In retrospect, it's not clear if this is necessary. From the docs:

The VALUES() function can still be used even from MariaDB 10.3.3, but only in INSERT ... ON DUPLICATE KEY UPDATE statements; it's a syntax error otherwise.

The diff is already out, but I'm still leaning towards abandoning it in order to simplify the code. Curious for other people's thoughts.

The diff is already out, but I'm still leaning towards abandoning it in order to simplify the code.

Don't feel strongly. It does mean we have more branching, but I think this is fine since we don't plan on supporting MySQL and MariaDB indefinitely.

Accepting because it looks fine, up to you

This revision is now accepted and ready to land.Jul 17 2022, 1:00 PM

Decided to leave this in. Branching indeed will be remove once MySQL is deprecated, and since we're using MariaDB going forward it's probably best to have the modern syntax