mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-21 21:09:23 +08:00
add test for savepoint Commit or Rollback release
After a top-level savepoint exits on non-Ignore, the savepoint should not be left on the stack.
This commit is contained in:
parent
88653ca62a
commit
8545c5d011
@ -668,6 +668,24 @@ mod test {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_savepoint_drop_behavior_releases() -> Result<()> {
|
||||
let mut db = checked_memory_handle()?;
|
||||
|
||||
{
|
||||
let mut sp = db.savepoint()?;
|
||||
sp.set_drop_behavior(DropBehavior::Commit);
|
||||
}
|
||||
assert!(db.is_autocommit());
|
||||
{
|
||||
let mut sp = db.savepoint()?;
|
||||
sp.set_drop_behavior(DropBehavior::Rollback);
|
||||
}
|
||||
assert!(db.is_autocommit());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_savepoint_names() -> Result<()> {
|
||||
let mut db = checked_memory_handle()?;
|
||||
|
Loading…
Reference in New Issue
Block a user