Skip to content

Commit 5790812

Browse files
committed
Remove useless flag "EVENT" in case of ALTER EVENT parsing.
1 parent 052de52 commit 5790812

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Components/AlterOperation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
342342

343343
// Not only when aliasing but also when parsing the body of an event, we just list the tokens of the
344344
// body in the unknown tokens list, as they define their own statements.
345-
if ($ret->options->has('AS') || (isset($options['EVENT']) && $ret->options->has('DO'))) {
345+
if ($ret->options->has('AS') || $ret->options->has('DO')) {
346346
for (; $list->idx < $list->count; ++$list->idx) {
347347
if ($list->tokens[$list->idx]->type === Token::TYPE_DELIMITER) {
348348
break;

src/Statements/AlterStatement.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use PhpMyAdmin\SqlParser\Token;
1313
use PhpMyAdmin\SqlParser\TokensList;
1414

15-
use function array_merge;
1615
use function implode;
1716

1817
/**
@@ -117,7 +116,7 @@ public function parse(Parser $parser, TokensList $list)
117116
} elseif ($this->options->has('USER')) {
118117
$options = AlterOperation::$USER_OPTIONS;
119118
} elseif ($this->options->has('EVENT')) {
120-
$options = array_merge(AlterOperation::$EVENT_OPTIONS, ['EVENT' => 0]);
119+
$options = AlterOperation::$EVENT_OPTIONS;
121120
}
122121

123122
$this->altered[] = AlterOperation::parse($parser, $list, $options);

0 commit comments

Comments
 (0)