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
F2902360: D4528.id14448.diff
Sat, Oct 5, 5:10 PM
Unknown Object (File)
Thu, Sep 26, 11:29 PM
Unknown Object (File)
Thu, Sep 26, 11:29 PM
Unknown Object (File)
Thu, Sep 26, 11:29 PM
Unknown Object (File)
Thu, Sep 26, 11:26 PM
Unknown Object (File)
Wed, Sep 25, 2:22 AM
Unknown Object (File)
Wed, Sep 25, 2:22 AM
Unknown Object (File)
Wed, Sep 25, 2:21 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