Add volatile modifier to a variable used in the query cache module.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 20 May 2022 04:55:20 +0000 (13:55 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 20 May 2022 04:55:20 +0000 (13:55 +0900)
commit0f358c9b9ab1c8fb366ed0b9879100d4881adca4
tree0ad7008cb5170c4a95b517dd28a93adeb9698243
parent3d55f84c90587a06a167777d5372a7238161c529
Add volatile modifier to a variable used in the query cache module.

"sts" variable used in pool_fetch_memory_cache() did not have volatile
modifier although it is used in PG_TRY() block. If an exception arises
the value set to variable will be lost in the PG_CATCH block. The bad
effect of this will not be triggered unless error occurs and I think
the bad effect has rarely been observed in the wild (as for as I know,
I have never heard such a report). Anyway, bug is bug.
src/query_cache/pool_memqcache.c