IMO, this is a bug in mySQL.  It's fine to convert to
fixed to variable length under the hood; however, it
should not impact implementation.

What's the best work around for this "feature"?  It
looks like I will be forced to change my enroll to use
VARCHAR.  I shouldn't have to do this to make it work.
 Other suggestions?

Thanks.

--- Harald Fuchs <[EMAIL PROTECTED]> wrote:
> In article
>
<[EMAIL PROTECTED]>,
> Ed Smith <[EMAIL PROTECTED]> writes:
> 
> > Greetings.  When I execute the SQL script below in
> > mySQL 4.1, I get
> 
> > ERROR 1216: Cannot add or update a child row: a
> > foreign key constraint fails
> 
> > It is, of course, choking on the enroll row
> insert. 
> > Why is this happening?  Here are some things that
> make
> > the problem go away:
> 
> > 1.  Take out the "name VARCHAR(30)" attribute from
> > student OR change the type to CHAR(30):  In
> Section
> > 6.5.3.1 (second bullet), it says that if one
> attribute
> > is variable length, all attributes "silently"
> become
> > variable length.  Does this mean student.sid is
> really
> > a VARCHAR?  Could this be related to the problem?
> 
> Exactly.  The VARCHAR name switches sid from CHAR to
> VARCHAR (as SHOW
> CREATE TABLE would have told you), whereas
> enroll.sid stays CHAR
> because there's no VARCHAR column.
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
>
http://lists.mysql.com/[EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to