Support USE db (#565)

This commit is contained in:
Alex Qyoun-ae 2022-08-11 14:49:20 +04:00 committed by GitHub
parent 71c3ec057b
commit a9db6ed139
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 0 deletions

View file

@ -138,6 +138,16 @@ fn parse_show_create() {
}
}
#[test]
fn parse_use() {
assert_eq!(
mysql_and_generic().verified_stmt("USE mydb"),
Statement::Use {
db_name: Ident::new("mydb")
}
);
}
#[test]
fn parse_create_table_auto_increment() {
let sql = "CREATE TABLE foo (bar INT PRIMARY KEY AUTO_INCREMENT)";