mysql_engine problem

Issue #93 resolved
Former user created an issue

Whel I specify mysql_engine when using MySQL 4.1, MySQL complains about error in SQL syntax.

The problem is in a function sqlalchemy.databases.mysql.post_create_table:

    def post_create_table(self, table):
        mysql_engine = table.kwargs.get('mysql_engine', None)
        if mysql_engine is not None:
            return " ENGINE=%s" % mysql_engine
        else:
            return ""

It works fine if it is changed to:

    def post_create_table(self, table):
        mysql_engine = table.kwargs.get('mysql_engine', None)
        if mysql_engine is not None:
            return " TYPE=%s" % mysql_engine
        else:
            return ""

I don't know if "ENGINE=InnoDB" works for MySQL 5.0 but for MySQL 4.1 it definetly should be "TYPE=InnoDB"

Comments (1)

  1. Log in to comment