Mercurial > hg > orthanc-databases
diff Framework/MySQL/MySQLTransaction.cpp @ 214:ab96698c73a3
removed useless information about read-only in ITransaction and IPrecompiledStatement
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Mar 2021 13:56:26 +0100 |
parents | 3236894320d6 |
children | ee5858d438dc |
line wrap: on
line diff
--- a/Framework/MySQL/MySQLTransaction.cpp Wed Mar 24 15:59:23 2021 +0100 +++ b/Framework/MySQL/MySQLTransaction.cpp Thu Mar 25 13:56:26 2021 +0100 @@ -33,7 +33,6 @@ { MySQLTransaction::MySQLTransaction(MySQLDatabase& db) : db_(db), - readOnly_(true), active_(false) { db_.Execute("START TRANSACTION", false); @@ -65,7 +64,6 @@ { db_.Execute("ROLLBACK", false); active_ = false; - readOnly_ = true; } else { @@ -81,7 +79,6 @@ { db_.Execute("COMMIT", false); active_ = false; - readOnly_ = true; } else { @@ -94,14 +91,7 @@ IResult* MySQLTransaction::Execute(IPrecompiledStatement& statement, const Dictionary& parameters) { - std::unique_ptr<IResult> result(dynamic_cast<MySQLStatement&>(statement).Execute(*this, parameters)); - - if (!statement.IsReadOnly()) - { - readOnly_ = false; - } - - return result.release(); + return dynamic_cast<MySQLStatement&>(statement).Execute(*this, parameters); } @@ -109,10 +99,5 @@ const Dictionary& parameters) { dynamic_cast<MySQLStatement&>(statement).ExecuteWithoutResult(*this, parameters); - - if (!statement.IsReadOnly()) - { - readOnly_ = false; - } } }