[storm] problem with many to one relationship

James Henstridge james at jamesh.id.au
Mon Sep 21 02:46:05 BST 2009


On Fri, Sep 18, 2009 at 9:39 PM, peter websdell
<flyingdeckchair at googlemail.com> wrote:
> Hello again,
> You recommendation fixed my previous problem, thank you. I now have a new
> problem. I've been staring at the code for about 2 hours now, and cannot see
> what is wrong. Please don't think I'm asking for help without trying first,
> I'm just new to this, and fairly new to python, so my skills are not up to
> speed.
> SQL
> http://pastebin.com/m475383da
> Python
> http://pastebin.com/m59ef0556
> Output
> http://pastebin.com/m43bdb79d
> Can you see what the problem here is. I'm stumped.
> Cheers,
> Pete.

This one looks like a bug in Storm.  In particular, "release" is a
reserved word in MySQL (according to
http://dev.mysql.com/doc/refman/5.4/en/reserved-words.html).  We've
got a facility for quoting reserved words when they are used as table
or column names, but we haven't included the full list for MySQL.

Could you file a bug report about this so we don't forget to fix it?

I can offer two work arounds you can use in the meantime:
1. don't use your database's reserved words as table or column names.
2. add the following code to your program:
    import storm.databases.mysql
    storm.databases.mysql.compile.add_reserved_words("release")

James.



More information about the storm mailing list