Improve memory management of raw SQL execution and preparing
Closed, ResolvedPublic

Description

  • Change KDbSqlResult* KDbConnection::executeSQL to QSharedPointer<KDbSqlResult> KDbConnection::prepareSql (fixes risks of memory leaks and unfinished execution when resulting object is ignored)
  • Change bool KDbConnection::executeVoidSQL to bool KDbConnection::executeSql (also in Kexi)
  • Change KDbConnection::insertRecord to return QSharedPointer<KDbSqlResult> (fixes risks of memory leaks and unfinished execution when resulting object is ignored)
  • Change KDbConnection::recentSQLString() to recentSqlString()
  • Change KDbSqlRecord* KDbSqlResult::fetchRecord() to QSharedPointer<KDbSqlRecord> fetchRecord()
  • Change KDbSqlResult* KDbPreparedStatementInterface::execute() to QSharedPointer<KDbSqlResult> KDbPreparedStatementInterface::execute()
  • Change KDb::lastInsertedAutoIncValue(KDbSqlResult *result, ...) to KDb::lastInsertedAutoIncValue(QSharedPointer<KDbSqlResult>, ...)
  • Update drivers accordingly
  • KDb & Kexi: Replace KDbConnection::executeVoidSQL uses with KDbConnection::executeSql and Replace KDbConnection::executeSQL uses with KDbConnection::prepareSql where needed (fix memory leak and unfinished execution)
staniek created this task.Apr 29 2017, 10:48 PM
staniek updated the task description. (Show Details)Apr 29 2017, 11:07 PM
staniek updated the task description. (Show Details)
staniek updated the task description. (Show Details)Apr 30 2017, 6:28 PM
staniek moved this task from TODO 3.2 to In Progress on the KDb board.May 8 2017, 3:06 PM
staniek updated the task description. (Show Details)May 8 2017, 3:08 PM
staniek updated the task description. (Show Details)
staniek updated the task description. (Show Details)May 8 2017, 3:24 PM
staniek renamed this task from Replace KDbConnection::executeSQL uses with KDbConnection::executeVoidSQL where needed to Improve memory management of raw SQL execution and preparing.May 8 2017, 3:27 PM
staniek updated the task description. (Show Details)May 8 2017, 6:12 PM
staniek moved this task from Backlog to In Progress on the KEXI board.May 8 2017, 8:37 PM
piggz added a subscriber: piggz.Jun 5 2017, 5:38 PM

is this done?

Pushed but review would be welcome...

staniek closed this task as Resolved.Aug 21 2017, 9:00 AM