vinzenz/vsqlite--

destructor of transaction class throws an exception

Closed this issue · 1 comments

The problem is that in at least current SQLite documentation is stated that:

COMMIT is an an alias to END TRANSACTION
and SQLite does not support nested transaction

now the code in destructor is:

transaction::~transaction() {
    commit(); // effectively sends COMMIT
    end(); // sends END TRANSACTION
}

It effectively tries to end transaction twice as it was a nested transaction. SQlite team also probably don't want to make possible an assumption that it is safe to execute END TRANSACTION twice because in future versions of SQLite when nested transactions would be supported it will break existing code.

With regards,

Janusz Korczak

Thanks for reporting, mmickey contributed already a fix for this in the pull request #5 which I will take in, as soon as possible. I had to clarify something with the mysql workbench team first.