Should/can COMMIT/ROLLBACK emit an error when no transaction is active?
0
votes
0
answers
131
views
What does ISO/IEC 9075-1:2023 standard say about COMMIT/ROLLBACK queries? Should (or can) they emit an error/exception when executed outside an active transaction?
I am asking because of https://jira.mariadb.org/browse/MDEV-32652 and because the standard is not public/free - https://stackoverflow.com/questions/20121248/where-can-i-get-read-sql-standard-sql2011 .
Here is how the main DB vendors currently behave:
SQLite - https://dbfiddle.uk/BmwZpE6v - emits an error
MSSQL - https://dbfiddle.uk/IK9y_GEK - emits an error
PostgreSQL - https://dbfiddle.uk/tC9pxsJK - no error
Oracle - https://stackoverflow.com/questions/53410508#53412359 - have no "start transaction"
MySQL - https://dbfiddle.uk/UCxKq6nU - no error
Asked by mvorisek
(428 rep)
Nov 1, 2023, 01:08 PM
Last activity: Nov 4, 2023, 09:31 AM
Last activity: Nov 4, 2023, 09:31 AM