Update MySQL reserved words list for 5.5/5.6

Issue #2791 resolved
Former user created an issue

The reserved_words set for MySQL was last updated for MySQL 5.1, but 5.5 and 5.6 have added new words. The new reserved words are:

5.5 (http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-5.html):

'general',
'ignore_server_ids',
'master_heartbeat_period',
'maxvalue',
'resignal',
'signal',
'slow',

5.6 (http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-6.html):

'get',
'io_after_gtids',
'io_before_gtids',
'master_bind',
'one_shot',
'partition',
'sql_after_gtids',
'sql_before_gtids',

I came across this while trying to create a column called 'signal' in an ORM snippet like:

class CellMeasure(_Model):
    ...
    signal = Column(SmallInteger)

This was while using PyMySQL==0.5 and the error was:

ProgrammingError: (ProgrammingError) (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'signal SMALLINT, ...

Comments (4)

  1. Log in to comment