HomePhabricator
Diffusion Comm ac199c492c82

[keyserver] Cast NULLs in UNION SELECT

Description

[keyserver] Cast NULLs in UNION SELECT

Summary:
See comment on Linear. This fixes a bug where we were seeing strings where we previously saw numbers.

Depends on D4528

Test Plan:

  1. I made sure the syntax was valid on both MySQL 5.7 and MariaDB 10.8 based on docs
  2. I tested with MariaDB 10.8
  3. I made sure the issue only occured when merging in NULL in cases where you aren't expecting a string by testing queries
  4. I git grepd through the codebase to make sure this was the only place we were doing that

Reviewers: jonringer-comm, atul, palys-swm

Reviewed By: atul

Subscribers: Adrian, yayabosh

Differential Revision: https://phab.comm.dev/D4530

Details

Provenance
ashoatAuthored on Jul 13 2022, 6:47 PM
Reviewer
atul
Differential Revision
D4530: [keyserver] Cast NULLs in UNION SELECT
Parents
rCOMM0eb21c40963d: [keyserver] Use VALUE instead of VALUES in DUPLICATE KEY UPDATE on MariaDB
Branches
Unknown
Tags
Unknown