On Thu, Oct 28, 2010 at 5:00 PM, laurent <l.ver...@libertysurf.fr> wrote:
>  Hi everybody,

Hi!
I'm very sorry for the time it took to approve your mail: I didn't notice
it in the list of pending messages.

>  I installed imbdpy and downloaded the imdb files to install a mysql
> database of it. I ran
>  " ./imdbpy2sql.py -d /mnt/win_h/video/imdb_data/ --mysql-innodb -u
> 'mysql://user:passw...@localhost/base' " and everything went fine. It
> took about 5 hours to complete. At the end, i got the innodb tables
> created but the foreign keys weren't created. Here is the end of the logs:

  [...]
> # TIME createForeignKeys() : 49min, 26sec (wall) 0min, 0sec (user) 0min,
> 0sec (system)
> EXECUTING "END:FOR_EVERY_TABLE:ALTER TABLE %(table)s ENGINE=InnoDB;"...
> EXECUTING "ALTER TABLE aka_name ENGINE=InnoDB;"... DONE!
> # TIME END command : 0min, 35sec (wall) 0min, 0sec (user) 0min, 0sec
> (system)

Well, that's odd: it seems that the script _did_ something.

>   I don't know if i did something wrong but i suspect that creating the
> foreign keys before having tables in innodb format is the problem
> because in myisam, we can't have foreign keys.

Well, I assume you're right: probably the previous step just created
some normal indexes, instead of foreign keys in the MyISAM tables.

> Right now i'm generating the foreign keys 1 by 1 so i have some time
> to report the problem :)

Wooops. :-)
To tell the truth foreign keys are not required, for IMDbPY, so you can
live without them.

Anyway, I've modified the imdbpy2sql.py script in the Mercurial repository [1]
so that it would modify the tables (from MyISAM to InnoDB) _before_ the
creation of the indexes and foreign keys.
I've not tested it, but it should work.

PS: thank you very much - I've added your name to the credits.

+++
[1] http://bitbucket.org/alberanid/imdbpy/
-- 
Davide Alberani <davide.alber...@gmail.com>  [PGP KeyID: 0x465BFD47]
http://www.mimante.net/

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Imdbpy-help mailing list
Imdbpy-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-help

Reply via email to