Skip to content

Commit c930f43

Browse files
committed
exmdb: fix unusual command order in table_load_content_table
1 parent d5698d4 commit c930f43

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

exch/exmdb/table.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -935,16 +935,14 @@ static BOOL table_load_content_table(db_conn_ptr &pdb, db_base_wr_ptr &dbase,
935935
last_row_id = sqlite3_last_insert_rowid(pdb->m_sqlite_eph);
936936
sqlite3_reset(pstmt1);
937937
}
938+
pstmt.finalize();
939+
pstmt1.finalize();
938940
if (NULL != psorts) {
939941
if (psort_transact.commit() != SQLITE_OK)
940942
return false;
941943
psort_transact = gx_sql_begin(psqlite, txn_mode::write);
942944
if (!psort_transact)
943945
return false;
944-
}
945-
pstmt.finalize();
946-
pstmt1.finalize();
947-
if (NULL != psorts) {
948946
snprintf(sql_string, std::size(sql_string), "INSERT INTO t%u "
949947
"(inst_id, row_type, row_stat, parent_id, depth, "
950948
"count, inst_num, value, extremum, prev_id) VALUES"

0 commit comments

Comments
 (0)