[clug] Re: MySQL error
Kristy A. Bennett
kristy at kristy.id.au
Tue Sep 19 07:20:47 GMT 2006
Steve Walsh wrote:
>My understanding of the error is that it's a known bug in 4.1.10, and an upgrade
>fixes it. If you're not running 4.1.10, what David said is a good idea...
Running v5.0.18-nt as required by my educational institution.
>David Tulloh wrote:
>>I couldn't reproduce the error either, but I was using mysql 4.
>>I would suggest looking at your foreign keys, I think mysql does some
>>foreign key enforcement, which would explain why I couldn't reproduce.
>>You have a field, customer SMALLINT(4),
>>You then link it, CONSTRAINT fk_customer_id FOREIGN KEY (customer)
>>REFERENCES customer(name) ON DELETE CASCADE,
>>I am guessing that the name field in the customer table is not an
>>integer. The incompatible types may explain your problem.
Yep, that was one!! (This is why I should work during daylight hours).
>>If that doesn't work, try cutting out bits until you get the smallest
>>reproducable case. That should give you a far better idea of where to look.
The second was the length of the name for the second foreign key.
For those for whom the link didn't work - it is now http://www.kristy.id.au/blog/2006/09/what-did-i-do-wrong-mysql-v5018-nt.html I changed it because blogger was getting the jitters and wasn't sure at the time if was just me. (It still has them ATM - http://status.blogger.com/).
EML kristy at kristy.id.au
SML PO Box 245, KIPPAX CENTRE ACT 2615
More information about the linux