readysettech / readyset

Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.
https://readyset.io
Other
4.54k stars 125 forks source link

Extend support of `SET` commands when prepared statements #1381

Closed jasobrown-rs closed 1 month ago

jasobrown-rs commented 1 month ago

Description

Currently, SET commands that are presented as prepared statements are naively proxied to the upstream database. We need to treat them uniquely, like selects and writes, in order to properly apply UnsupportedSetMode as well as support "no-upstream-connection" mode.

We already support this for SET commands on the simple/adhoc query path. Adding this support to the prepare/ execute path is a bit tricky, but achievable.