Amit,

when you recreate a dropped table, its table definition must match existing
foreign key references to it.

Since MySQL silently changes many char columns to varchar columns, it is
best to use varchar in all foreign key columns currently. Upcoming 3.23.47
fixes the problem, because in .47 you a char column can refer a varchar
column and vice versa.

Regards,

Heikki Tuuri
Innobase Oy
---
Order commercial MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB


>Hi!!
>I have been trying to create the following tables:-
>1) create table scenario (scenario char(10) not null primary key, 
>copyfromscenario char(10)) type = innodb;
>2)create table attributekit(
>attributekit char(25) not null primary key, expression blob not null, 
>linkoperator char(5) default 'eq' not null) type =innodb;
>Here if i convert the "char" to "varchar", then this
>query works ? Why is this so? 
>3)create table attributekitvalue(
>attributekit varchar(25) not null,index attkit_ind(attributekit) , 
>foreign key(attributekit) referencesattributekit(attributekit),   
>value varchar(10) not null, scenario char(10) not null, index
>attkit_sce_ind(scenario), foreign key (scenario) references scenario(scenario))
>type = innodb;
>Here in this table if I convert the "varchar" to
>"char" then this query works. Why is this So?
>Please do reply
>Thanks
>Amit Lonkar




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to