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, Jul 2, 3:51 PM
Unknown Object (File)
Sun, Jun 30, 11:51 AM
Unknown Object (File)
Wed, Jun 26, 12:55 AM
Unknown Object (File)
Wed, Jun 26, 12:54 AM
Unknown Object (File)
Tue, Jun 25, 6:31 PM
Unknown Object (File)
Tue, Jun 25, 3:28 PM
Unknown Object (File)
Tue, Jun 18, 10:41 AM
Unknown Object (File)
Tue, Jun 18, 10:41 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