diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2009-03-27 10:24:32 +0400 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2009-03-27 10:24:32 +0400 |
commit | c2c47b67fd6f6130b941a0b50fa701b0bb105ba7 (patch) | |
tree | 724935190d8b69f11e5a0110b89287881ee73cb9 /mysql-test/r/innodb_mysql.result | |
parent | f606cfeae3f934b4e6864693994ed80b7f2631ef (diff) | |
download | mariadb-git-c2c47b67fd6f6130b941a0b50fa701b0bb105ba7.tar.gz |
Fix for bug #26288: savepoint not deleted, comit on empty transaction
Problem: commit doesn't delete savepoints if there are no changes
in the transaction.
Fix: delete them in such cases.
mysql-test/r/innodb_mysql.result:
Fix for bug #26288: savepoint not deleted, comit on empty transaction
- test result.
mysql-test/t/innodb_mysql.test:
Fix for bug #26288: savepoint not deleted, comit on empty transaction
- test case.
sql/handler.cc:
Fix for bug #26288: savepoint not deleted, comit on empty transaction
- call transaction.cleanup() even if nht is 0 to delete
possible savepoints.
Diffstat (limited to 'mysql-test/r/innodb_mysql.result')
-rw-r--r-- | mysql-test/r/innodb_mysql.result | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 682cc2e82e2..d95499fe3ba 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1267,4 +1267,28 @@ CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; a DROP TABLE t1; +# +# BUG #26288: savepoint are not deleted on comit, if the transaction +# was otherwise empty +# +BEGIN; +SAVEPOINT s1; +COMMIT; +RELEASE SAVEPOINT s1; +ERROR 42000: SAVEPOINT s1 does not exist +BEGIN; +SAVEPOINT s2; +COMMIT; +ROLLBACK TO SAVEPOINT s2; +ERROR 42000: SAVEPOINT s2 does not exist +BEGIN; +SAVEPOINT s3; +ROLLBACK; +RELEASE SAVEPOINT s3; +ERROR 42000: SAVEPOINT s3 does not exist +BEGIN; +SAVEPOINT s4; +ROLLBACK; +ROLLBACK TO SAVEPOINT s4; +ERROR 42000: SAVEPOINT s4 does not exist End of 5.0 tests |