mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix the VACUUM command so that it does not commit a transaction when it is
mistakenly run within a transaction - it should leave the transaction open. (CVS 6200) FossilOrigin-Name: 75cc709be46ae2096d2ba3e7ac58de8140f8130c
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing the VACUUM statement.
|
||||
#
|
||||
# $Id: vacuum.test,v 1.41 2008/04/15 02:36:34 drh Exp $
|
||||
# $Id: vacuum.test,v 1.42 2009/01/22 23:04:47 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -102,14 +102,18 @@ ifcapable vacuum {
|
||||
} {1}
|
||||
}
|
||||
ifcapable vacuum {
|
||||
do_test vacuum-2.1 {
|
||||
do_test vacuum-2.1.1 {
|
||||
catchsql {
|
||||
BEGIN;
|
||||
VACUUM;
|
||||
COMMIT;
|
||||
}
|
||||
} {1 {cannot VACUUM from within a transaction}}
|
||||
catch {db eval COMMIT}
|
||||
do_test vacuum-2.1.2 {
|
||||
sqlite3_get_autocommit db
|
||||
} {0}
|
||||
do_test vacuum-2.1.3 {
|
||||
db eval {COMMIT}
|
||||
} {}
|
||||
}
|
||||
do_test vacuum-2.2 {
|
||||
sqlite3 db2 test.db
|
||||
|
Reference in New Issue
Block a user