summaryrefslogtreecommitdiffstats
path: root/src/Statements/CreateStatement.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Statements/CreateStatement.php')
-rw-r--r--src/Statements/CreateStatement.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Statements/CreateStatement.php b/src/Statements/CreateStatement.php
index 0f2e565..bc7cf73 100644
--- a/src/Statements/CreateStatement.php
+++ b/src/Statements/CreateStatement.php
@@ -421,9 +421,11 @@ class CreateStatement extends Statement
$brackets = false;
} elseif (($token->type === Token::TYPE_KEYWORD) && ($token->value === 'PARTITIONS')) {
$token = $list->getNextOfType(Token::TYPE_NUMBER);
+ --$list->idx; // `getNextOfType` also advances one position.
$this->partitionsNum = $token->value;
} elseif (($token->type === Token::TYPE_KEYWORD) && ($token->value === 'SUBPARTITIONS')) {
$token = $list->getNextOfType(Token::TYPE_NUMBER);
+ --$list->idx; // `getNextOfType` also advances one position.
$this->subpartitionsNum = $token->value;
} elseif (!empty($field)) {
@@ -457,7 +459,9 @@ class CreateStatement extends Statement
$this->partitions = ArrayObj::parse(
$parser,
$list,
- array('type' => 'SqlParser\Components\PartitionDefinition')
+ array(
+ 'type' => 'SqlParser\\Components\\PartitionDefinition'
+ )
);
}
break;