Error on dangling NO in CREATE SEQUENCE options (#1104)

This commit is contained in:
Quinn Sinclair 2024-01-24 01:59:52 +01:00 committed by GitHub
parent 3a6d3ecba2
commit 498708c463
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View file

@ -8700,13 +8700,12 @@ impl<'a> Parser<'a> {
)));
}
// [ [ NO ] CYCLE ]
if self.parse_keywords(&[Keyword::NO]) {
if self.parse_keywords(&[Keyword::CYCLE]) {
sequence_options.push(SequenceOptions::Cycle(true));
}
if self.parse_keywords(&[Keyword::NO, Keyword::CYCLE]) {
sequence_options.push(SequenceOptions::Cycle(true));
} else if self.parse_keywords(&[Keyword::CYCLE]) {
sequence_options.push(SequenceOptions::Cycle(false));
}
Ok(sequence_options)
}