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:
gwenn
2020-03-04 20:26:31 +01:00
parent 670b1c221e
commit 1fb00e99b7
2 changed files with 12 additions and 7 deletions

View File

@@ -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();
}
}
}