Skip to content

Commit 81c138a

Browse files
fix(dump-parser): fix bug with escaping apostrophe with backslash
1 parent 5f92f02 commit 81c138a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

dump-parser/src/utils.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ fn list_statements(query: &str) -> Vec<Statement> {
190190
if stack.get(0) == Some(&b'\'') {
191191
if (query.len() > next_idx) && &query[next_idx..next_idx] == "'" {
192192
// do nothing because the ' char is escaped via a double ''
193-
} else if idx > 0 && query.is_char_boundary(idx-1) && &query[idx-1..idx] == "\\" {
194-
// do nothing because the ' char is escaped via a backslash
195193
} else {
196194
let _ = stack.remove(0);
197195
}
@@ -524,7 +522,7 @@ Etiam augue augue, bibendum et molestie non, finibus non nulla. Etiam quis rhonc
524522
assert!(false);
525523
}
526524
Statement::Query(s) => {
527-
assert!(s.valid);
525+
assert!(!s.valid);
528526
}
529527
}
530528

0 commit comments

Comments
 (0)