mysql foreign key contraint bug

View: New views
2 Messages — Rating Filter:   Alert me  

mysql foreign key contraint bug

by Chris Dosé :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I noticed a bug in the creation of foreign key constraints when using
the mysql option.  When printing the sql for foreign keys using the
mysql or ingres types, it prints the first line of the alter table
block as a comment, and at the end appends "for $opt_t" instead of the
regular line delimiter.  I have this diff file here:

2818c2818
< $return  = "alter table $className add constraint $constraintName" . $nl;
---
> $return  = &sqlComment("alter table $className add constraint $constraintName") . $nl;
2820c2820
< $return .= $in . "$refTable ($refColumns) $goCommand";
---
> $return .= $in . "$refTable ($refColumns) for $opt_t";

That fixes the problem for me, but I don't know perl at all, so I may
have done something not so good.  Anyway, I like this project, it's
been useful to me, and I hope this helps fix this problem permenantly.

-Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: mysql foreign key contraint bug

by Chris Dosé :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm sorry, I didn't correct against the latest revision, just the one
in the ubuntu repository.  The bug is still there though, it's just on
lines 2838 and 2840.

-Chris

On Nov 8, 2007 12:10 AM, Chris Dosé <chris.dose@...> wrote:

> Hi,
> I noticed a bug in the creation of foreign key constraints when using
> the mysql option.  When printing the sql for foreign keys using the
> mysql or ingres types, it prints the first line of the alter table
> block as a comment, and at the end appends "for $opt_t" instead of the
> regular line delimiter.  I have this diff file here:
>
> 2818c2818
> <               $return  = "alter table $className add constraint $constraintName" . $nl;
> ---
> >               $return  = &sqlComment("alter table $className add constraint $constraintName") . $nl;
> 2820c2820
> <               $return .= $in . "$refTable ($refColumns) $goCommand";
> ---
> >               $return .= $in . "$refTable ($refColumns) for $opt_t";
>
> That fixes the problem for me, but I don't know perl at all, so I may
> have done something not so good.  Anyway, I like this project, it's
> been useful to me, and I hope this helps fix this problem permenantly.
>
> -Chris
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...