mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-17 17:02:24 +08:00
Fix error while executing ALTER statement
`execute_bacth` should be used for DDL. `execute` should still work except when `extra-check` feature is activated.
This commit is contained in:
@@ -1745,5 +1745,14 @@ mod test {
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "extra_check"))]
|
||||
fn test_alter_table() {
|
||||
let db = checked_memory_handle();
|
||||
db.execute_batch("CREATE TABLE x(t);").unwrap();
|
||||
// `execute_batch` should be used but `execute` should also work
|
||||
db.execute("ALTER TABLE x RENAME TO y;", params![]).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user