alberanid/imdbpy — pull request #18 by tdeck (2014-04-08 05:03:05+00:00)
Title: Fix to enable reading from CSV files on MySQL

I've recently been setting up the local variant of the database using imdbpy2sql.py, and I got errors like this:

ERROR: unable to import CSV file imdb_csv/imdb_csv/complete_cast.csv: (1148, 'The used command is not allowed with this MySQL version')
Rather than just file a bug report, I figured this was simple enough that I could fix myself. This patch set is a fix that seems to work; it simply adds the parameter `local_infile=1` when creating a MySQL connection. Unfortunately, I have to do this globally (i.e. for all MySQL connections used by imdbpy), but based on the documentation I don't see how this can do any harm.

I have tested this using the SQLObject version, and I have looked into the code of both SQLObject and SQLAlchemy to ensure that this flag is recognized by both ORMs. This is my first ever pull request; I am submitting it in the hope that it will be helpful.