Skip to content

Commit

Permalink
fix(dump-parser): fix bug with escaping apostrophe with backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkutrzeba-odrabiamy committed Jan 25, 2023
1 parent 5ff6348 commit a690188
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dump-parser/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ fn list_statements(query: &str) -> Vec<Statement> {
if stack.get(0) == Some(&b'\'') {
if (query.len() > next_idx) && &query[next_idx..next_idx] == "'" {
// do nothing because the ' char is escaped via a double ''
} else if idx > 0 && query.is_char_boundary(idx-1) && &query[idx-1..idx] == "\\" {
// do nothing because the ' char is escaped via a backslash
} else {
let _ = stack.remove(0);
}
Expand Down Expand Up @@ -524,7 +522,7 @@ Etiam augue augue, bibendum et molestie non, finibus non nulla. Etiam quis rhonc
assert!(false);
}
Statement::Query(s) => {
assert!(s.valid);
assert!(!s.valid);
}
}

Expand Down

0 comments on commit a690188

Please sign in to comment.