diff options
author | Hugues Peccatte <hugues.peccatte@aareon.fr> | 2019-11-01 09:36:57 +0100 |
---|---|---|
committer | Hugues Peccatte <hugues.peccatte@aareon.fr> | 2019-11-01 10:27:06 +0100 |
commit | ccb20a1c7c1cbe75645f9d19a908bed4c98672fd (patch) | |
tree | 4b6fd46f53b1cfe93d5301f676402ee1d8cb35ee /tests | |
parent | fe98a34d4c5e557fbc3c0ae1152f8570bcaf2991 (diff) | |
download | sql-parser-ccb20a1c7c1cbe75645f9d19a908bed4c98672fd.zip sql-parser-ccb20a1c7c1cbe75645f9d19a908bed4c98672fd.tar.gz sql-parser-ccb20a1c7c1cbe75645f9d19a908bed4c98672fd.tar.bz2 |
Add test case to check partition name starting by a number
Signed-off-by: Hugues Peccatte <hugues.peccatte@aareon.fr>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Components/PartitionDefinitionTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/Components/PartitionDefinitionTest.php b/tests/Components/PartitionDefinitionTest.php index 7edc21e..3c9a847 100644 --- a/tests/Components/PartitionDefinitionTest.php +++ b/tests/Components/PartitionDefinitionTest.php @@ -19,4 +19,16 @@ class PartitionDefinitionTest extends TestCase $this->assertEquals('LESS THAN', $component->type); $this->assertEquals('(1990)', $component->expr->expr); } + + public function testParseNameWithUnderscore() + { + $component = PartitionDefinition::parse( + new Parser(), + $this->getTokensList('PARTITION 2017_12 VALUES LESS THAN (\'2018-01-01 00:00:00\') ENGINE = MyISAM') + ); + $this->assertFalse($component->isSubpartition); + $this->assertEquals('2017_12', $component->name); + $this->assertEquals('LESS THAN', $component->type); + $this->assertEquals('(\'2018-01-01 00:00:00\')', $component->expr->expr); + } } |