18 Sep
2020
18 Sep
'20
12:54 p.m.
Hi, Michael!
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 7327f270c33..8f6356b15c7 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1640,6 +1640,7 @@ void THD::reset_for_reuse() abort_on_warning= 0; free_connection_done= 0; m_command= COM_CONNECT; + transaction.on= 1; #if defined(ENABLED_PROFILING) profiling.reset(); #endif
This looks risky, to change transaction.on at some random point in time. I understand that it's not a random point and it should be actually safe here. But perhaps you can add an assert to document that it is safe? Like, transaction.on should be already 1 or there should be no active transaction. Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org