12 Commits

Author SHA1 Message Date
Jack Christensen
b7a85d1a6f Consider any "0A000" error a possible cached plan changed error
https://github.com/jackc/pgx/issues/1162
2022-03-05 08:23:58 -06:00
Jack Christensen
146268e829 Move context test above bad statement cleanup 2021-11-13 04:12:35 -06:00
Georges Varouchas
cd7dcd5802 have lru.Get() always check if context is already expired 2021-11-13 04:10:45 -06:00
Georges Varouchas
141f132ae7 add a unit test on LRU context check
TestLRUContext highlights the lack of context check when querying for a cached value
2021-11-13 04:10:45 -06:00
Jack Christensen
4bde08d1a6 LRU statement cache tests handle CockroackDB 2021-02-13 11:19:09 -06:00
Jack Christensen
cba610c245 StatementErrored does not need context nor return an error 2020-11-11 15:52:59 -06:00
Jack Christensen
426124b32f Add stmtcache.LRU test thjat integrates over the database 2020-11-11 15:48:49 -06:00
Ethan Pailes
a885de9c94 stmtcache: add new StatementErrored method
This patch adds a new StatementErrored method to the stmtcache.
This routine MUST be called by users of the cache whenever the
execution of a statement results in an error. This will allow
the cache to make an intelligent decision about whether or not
the statement needs to be purged from the cache.
2020-11-11 11:18:21 -05:00
Jack Christensen
f5eead90fc Fix statement cache reuse bug 2019-09-19 21:04:14 -05:00
Jack Christensen
da9fc85c44 Rename PreparedStatementDescription to StatementDescription
PreparedStatementDescription was too long. It also no longer entirely
represents its purpose now that it is also intended for use with
described statements.
2019-08-24 20:39:03 -05:00
Jack Christensen
78abbdf1d7 Rename LRUCache to LRU 2019-08-24 19:48:43 -05:00
Jack Christensen
bcd6b9244a Rename pscache to stmtcache 2019-08-24 19:46:14 -05:00