Bug #26290 savepoint outside transaction

Submitted: 12 Feb 2007 15:24 Modified: 13 Feb 2007 9:11
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.36bk OS:Any (*)
Assigned to: CPU Architecture:Any
Tags: savepoint

[12 Feb 2007 15:24] Martin Friebe
Description:
using savepoint outside a transaction, does not give a warning, and does not create a savepoint.

How to repeat:
drop table if exists t1;
create table t1 (a int not null, b int not null, index (a,b)) engine=innodb;
insert into t1 values (1,2), (1,3), (2,3), (2,4);

savepoint s1;
update t1 set a= 11 where b = 2;
rollback to savepoint s1;
#ERROR 1305 (42000): SAVEPOINT s1 does not exist

Suggested fix:
savepoint and rollback to savepoint  outside a transaction should have a consistent behaviour.

Savepoint should probably give an error, at least a warning.

(If savepoint does not give an error or warning, then a savepoint (even if useless) should probably be created, and rollback to savepoint should warn, that all changes were non-transactional.)
[13 Feb 2007 9:11] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Please read carefully about SAVEPOINT at http://dev.mysql.com/doc/refman/5.0/en/savepoints.html and about COMMIT at http://dev.mysql.com/doc/refman/5.0/en/commit.html Especcially look attantion at AUTOCOMMIT

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.