Skip to content

SessionImpl::close() does not check return code of close handle specific function  #1373

@micheleselea

Description

@micheleselea

When in void SessionPool::closeAll(SessionList& sessionList) we call (*it)->session()->close(); the correspond function of SessionImpl is called.
About SQLite::SessionImpl we have this code

void SessionImpl::close()
{
    if (_pDB)
    {
        sqlite3_close(_pDB);
        _pDB = 0;
    }
        _connected = false;
}

accorling to this docs
https://www.sqlite.org/c3ref/close.html
the function sqlite3_close(_pDB); can fail with SQLITE_BUSY. So we set NULL to a not closed HANDLE.
I think we should check if sqlite3_close(_pDB); is working as we expect, because if you have for example an in memory db, you will not obtain the "memory clear" you expect when you close session. What do you think?

I do not know in other backend (like MySql) how it works

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions