Merging upstream version 11.4.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ecb42ec17f
commit
63746a3e92
89 changed files with 35352 additions and 33081 deletions
|
@ -502,6 +502,7 @@ class Tokenizer(metaclass=_Tokenizer):
|
|||
"CUBE": TokenType.CUBE,
|
||||
"CURRENT_DATE": TokenType.CURRENT_DATE,
|
||||
"CURRENT ROW": TokenType.CURRENT_ROW,
|
||||
"CURRENT_TIME": TokenType.CURRENT_TIME,
|
||||
"CURRENT_TIMESTAMP": TokenType.CURRENT_TIMESTAMP,
|
||||
"DATABASE": TokenType.DATABASE,
|
||||
"DEFAULT": TokenType.DEFAULT,
|
||||
|
@ -725,7 +726,6 @@ class Tokenizer(metaclass=_Tokenizer):
|
|||
TokenType.COMMAND,
|
||||
TokenType.EXECUTE,
|
||||
TokenType.FETCH,
|
||||
TokenType.SET,
|
||||
TokenType.SHOW,
|
||||
}
|
||||
|
||||
|
@ -851,8 +851,10 @@ class Tokenizer(metaclass=_Tokenizer):
|
|||
|
||||
# If we have either a semicolon or a begin token before the command's token, we'll parse
|
||||
# whatever follows the command's token as a string
|
||||
if token_type in self.COMMANDS and (
|
||||
len(self.tokens) == 1 or self.tokens[-2].token_type in self.COMMAND_PREFIX_TOKENS
|
||||
if (
|
||||
token_type in self.COMMANDS
|
||||
and self._peek != ";"
|
||||
and (len(self.tokens) == 1 or self.tokens[-2].token_type in self.COMMAND_PREFIX_TOKENS)
|
||||
):
|
||||
start = self._current
|
||||
tokens = len(self.tokens)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue