Commit d6a6405
committed
adapter: DEALLOCATE stmts while in transaction
The existing `DEALLOCATE` support missed the case of a DEALLOCATE
being requested while a transaction is open. Becuase of that, the
adapter will naively forward along the request _with the
prepared statement id the application provided_. We can't pass along
that id as we have an alternate id when we prepared the statment,
and that's the one we must send to the upstream.
This CL moves the `SqlQuery::Deallocate` statement handling slightly
higher in `Backend::query()`, just before where it checks if it's in
a transaction. Also, cleans up the existing handling in
`Backend::query_adhoc_non_select()` as it should not execute there
any longer (but we need to handle the enum variant nonetheless).
Fixes: REA-3983
Release-Note-Core: Fixed a bug with handling
DEALLOCATE statements within a transaction.
Change-Id: Iccfcc8ebfc8cf50840659f487e11d9099720a576
Reviewed-on: https://gerrit.readyset.name/c/readyset/+/7184
Tested-by: Buildkite CI
Reviewed-by: Luke Osborne <luke@readyset.io>1 parent deb2d62 commit d6a6405
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2825 | 2825 | | |
2826 | 2826 | | |
2827 | 2827 | | |
2828 | | - | |
2829 | | - | |
2830 | 2828 | | |
2831 | 2829 | | |
2832 | 2830 | | |
| |||
2836 | 2834 | | |
2837 | 2835 | | |
2838 | 2836 | | |
| 2837 | + | |
2839 | 2838 | | |
2840 | 2839 | | |
2841 | 2840 | | |
| |||
2863 | 2862 | | |
2864 | 2863 | | |
2865 | 2864 | | |
2866 | | - | |
2867 | | - | |
2868 | | - | |
2869 | | - | |
| 2865 | + | |
2870 | 2866 | | |
2871 | 2867 | | |
2872 | 2868 | | |
| |||
3040 | 3036 | | |
3041 | 3037 | | |
3042 | 3038 | | |
| 3039 | + | |
3043 | 3040 | | |
3044 | 3041 | | |
3045 | 3042 | | |
| |||
0 commit comments