Skip to content

Commit fafe68d

Browse files
Merge #87
87: box parser r=psarna a=MarinPostma This pr puts the parser on the heap. It's quite chunky, and caused stackoverflows in the past. I'm working to get a nicer patch to upstream lemon-rs, but it requires more work for somilar effects. I also remove the dependency on my patch Co-authored-by: ad hoc <[email protected]>
2 parents 0141433 + d2e04d6 commit fafe68d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

libsql-server/Cargo.lock

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libsql-server/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ members = [
88
[patch."https://github.com/psarna/mvsqlite"]
99
mvfs = { git = "https://github.com/MarinPostma/mvsqlite", branch = "use-cchar" }
1010
mwal = { git = "https://github.com/MarinPostma/mvsqlite", branch = "use-cchar" }
11-
12-
[patch.crates-io]
13-
sqlite3-parser = { git = "https://github.com/MarinPostma/lemon-rs.git", rev = "d3a6365" }

libsql-server/sqld/src/query_analysis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Statement {
9696
kind,
9797
})
9898
}
99-
let mut parser = Parser::new(s.as_bytes());
99+
let mut parser = Box::new(Parser::new(s.as_bytes()));
100100
std::iter::from_fn(move || match parser.next() {
101101
Ok(Some(cmd)) => Some(parse_inner(cmd)),
102102
Ok(None) => None,

0 commit comments

Comments
 (0)