diff --git a/core/translate/mod.rs b/core/translate/mod.rs index 777d7573d..33504d369 100644 --- a/core/translate/mod.rs +++ b/core/translate/mod.rs @@ -94,7 +94,7 @@ pub fn translate( query_mode, &schema, &name, - body, + body.map(|b| *b), database_header.clone(), pager, )?, diff --git a/vendored/sqlite3-parser/src/parser/ast/mod.rs b/vendored/sqlite3-parser/src/parser/ast/mod.rs index 8e22e74e3..19e506e8a 100644 --- a/vendored/sqlite3-parser/src/parser/ast/mod.rs +++ b/vendored/sqlite3-parser/src/parser/ast/mod.rs @@ -175,7 +175,7 @@ pub enum Stmt { /// `INSERT` Insert(Box), /// `PRAGMA`: pragma name, body - Pragma(QualifiedName, Option), + Pragma(Box, Option>), /// `REINDEX` Reindex { /// collation or index or table name diff --git a/vendored/sqlite3-parser/src/parser/parse.y b/vendored/sqlite3-parser/src/parser/parse.y index dc92b9198..e939a724d 100644 --- a/vendored/sqlite3-parser/src/parser/parse.y +++ b/vendored/sqlite3-parser/src/parser/parse.y @@ -1139,13 +1139,13 @@ vinto(A) ::= . {A = None;} ///////////////////////////// The PRAGMA command ///////////////////////////// // %ifndef SQLITE_OMIT_PRAGMA -cmd ::= PRAGMA fullname(X). {self.ctx.stmt = Some(Stmt::Pragma(X, None));} -cmd ::= PRAGMA fullname(X) EQ nmnum(Y). {self.ctx.stmt = Some(Stmt::Pragma(X, Some(PragmaBody::Equals(Y))));} -cmd ::= PRAGMA fullname(X) LP nmnum(Y) RP. {self.ctx.stmt = Some(Stmt::Pragma(X, Some(PragmaBody::Call(Y))));} +cmd ::= PRAGMA fullname(X). {self.ctx.stmt = Some(Stmt::Pragma(Box::new(X), None));} +cmd ::= PRAGMA fullname(X) EQ nmnum(Y). {self.ctx.stmt = Some(Stmt::Pragma(Box::new(X), Some(Box::new(PragmaBody::Equals(Y)))));} +cmd ::= PRAGMA fullname(X) LP nmnum(Y) RP. {self.ctx.stmt = Some(Stmt::Pragma(Box::new(X), Some(Box::new(PragmaBody::Call(Y)))));} cmd ::= PRAGMA fullname(X) EQ minus_num(Y). - {self.ctx.stmt = Some(Stmt::Pragma(X, Some(PragmaBody::Equals(Y))));} + {self.ctx.stmt = Some(Stmt::Pragma(Box::new(X), Some(Box::new(PragmaBody::Equals(Y)))));} cmd ::= PRAGMA fullname(X) LP minus_num(Y) RP. - {self.ctx.stmt = Some(Stmt::Pragma(X, Some(PragmaBody::Call(Y))));} + {self.ctx.stmt = Some(Stmt::Pragma(Box::new(X), Some(Box::new(PragmaBody::Call(Y)))));} %type nmnum {Expr} nmnum(A) ::= plus_num(A).