-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Milestone
Description
Expected behavior
Session returned by SessionPool::get() isn't affected by it's previous usage (only MySQL).
Actual behavior
Session returned by SessionPool::get() has state from it's previous usage (only MySQL).
Steps to reproduce the problem
It is quite difficult to simulate it. Lets say we have 2 sessions in SessionPool: session1 and session2.
Get session1 by call SessionPool::get() and use it to insert some data to table:
INSERT INTO my_table ("test");Get session2 from session pool and use it to remove row from table:
DELETE FROM my_table WHERE column="test";Get session1 from session pool and try to find deleted data:
SELECT column FROM my_table WHERE column="test"The statement found the row which was deleted with session2
POCO version
1.9.0
Compiler and version
gcc 7.3.0
Operating system and version
Ubuntu 18.04, Ubuntu 16.04
Other relevant information
This issue can be fixed by using mysql_reset_connection() when Session is returned to the SessionPool.
Reactions are currently unavailable