Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fasiondog committed Oct 7, 2024
1 parent 8381d8c commit 4537624
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions hikyuu_cpp/hikyuu/utilities/db_connect/AutoTransAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,11 @@ class TransAction {
/** 析构函数 */
~TransAction() {
// 如果没有主动提交事务,视为需要回滚
if (!m_started) {
HKU_WARN("Not manul begin transaction!");
return;
}

if (m_started && !m_committed) {
HKU_WARN("The transaction is rolled back!");
m_driver->rollback();
} else if (!m_committed) {
HKU_WARN("Not manul begin transaction!");
}
}

Expand Down

0 comments on commit 4537624

Please sign in to comment.