mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
mysqlxx transaction exception safety
Fix terminate on exception and rollback query fail.
This commit is contained in:
parent
c629799500
commit
a11759c75b
@ -22,8 +22,14 @@ public:
|
||||
|
||||
virtual ~Transaction()
|
||||
{
|
||||
if (!finished)
|
||||
rollback();
|
||||
try
|
||||
{
|
||||
if (!finished)
|
||||
rollback();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void commit()
|
||||
|
Loading…
Reference in New Issue
Block a user