diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/MySQL578Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/MySQL578Keywords.php new file mode 100644 index 00000000000..13a3a26d6e7 --- /dev/null +++ b/lib/Doctrine/DBAL/Platforms/Keywords/MySQL578Keywords.php @@ -0,0 +1,57 @@ +. + */ + +namespace Doctrine\DBAL\Platforms\Keywords; + +/** + * MySQL 5.7.8 reserved keywords list. + * + * @author İsmail BASKIN + * @link www.doctrine-project.org + * @since 2.6 + */ +class MySQL578Keywords extends MySQL57Keywords +{ + /** + * {@inheritdoc} + */ + public function getName() + { + return 'MySQL578'; + } + + /** + * {@inheritdoc} + * + * @link https://dev.mysql.com/doc/refman/5.7/en/keywords.html + */ + protected function getKeywords() + { + $parentKeywords = array_diff(parent::getKeywords(), array( + 'NONBLOCKING', + )); + + return array_merge($parentKeywords, array( + 'GENERATED', + 'OPTIMIZER_COSTS', + 'STORED', + 'VIRTUAL' + )); + } +} diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php index f7acd0a86ee..a726543a177 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php @@ -33,6 +33,7 @@ class ReservedWordsCommand extends Command private $keywordListClasses = array( 'mysql' => 'Doctrine\DBAL\Platforms\Keywords\MySQLKeywords', 'mysql57' => 'Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords', + 'mysql578' => 'Doctrine\DBAL\Platforms\Keywords\MySQL578Keywords', 'sqlserver' => 'Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords', 'sqlserver2005' => 'Doctrine\DBAL\Platforms\Keywords\SQLServer2005Keywords', 'sqlserver2008' => 'Doctrine\DBAL\Platforms\Keywords\SQLServer2008Keywords',