Bug #26471 generated request for two tables (many to many relation) bad request generated
Description:
First BUG :
++++++++++++
design 2 tables 'A' and 'B'
and make a relation as : 'A has many B'and 'B has many A'
the generated script is this one :
======================================================
CREATE TABLE `test`.`A` (
`primaryID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`primaryID`)
)
ENGINE = InnoDB
CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE `test`.`B` (
`primaryID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`primaryID`)
)
ENGINE = InnoDB
CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE `test`.`A_has_B` (
`FKAprimaryID` NOT NULL,
`FKBprimaryID` NOT NULL,
CONSTRAINT `FKA` FOREIGN KEY `FKA` (`FKAprimaryID`)
REFERENCES `test`.`A` (`primaryID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `FKB` FOREIGN KEY `FKB` (`FKBprimaryID`)
REFERENCES `test`.`B` (`primaryID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
ENGINE = InnoDB;
======================================================
I ) As you can see the table which is created 'A_has_B' has two keys, ok, but the datatype is messing ! so this script cannot work and generates an error.
II ) the keys are not marked as primary key in 'A_has_B'
Second bug (linked whith the first one).
++++++++++++++++++++++++++++++++++++++++++
I try to modify the middle table 'A_has_B' in order to put the missing data type:
1) the data type are not listed when tab in the column
2) if i cut/past the datatype of another key INT(11) the application crashed
How to repeat:
First BUG :
++++++++++++
1) design 2 tables 'A' and 'B'
2) make a relation as : 'A has many B'and 'B has many A'
3) menu-->Synchronise
==> generated script is a bad script
Second bug (linked whith the first one).
++++++++++++++++++++++++++++++++++++++++++
I try to modify the table 'A_has_B' in order to put the missing data types :
1) when typing int the table editor the data type are not listed
2) if i put by "cutting and pasting" the datatype of another key INT(11)
=====> the application is crashing.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: First BUG : ++++++++++++ design 2 tables 'A' and 'B' and make a relation as : 'A has many B'and 'B has many A' the generated script is this one : ====================================================== CREATE TABLE `test`.`A` ( `primaryID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (`primaryID`) ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE `test`.`B` ( `primaryID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (`primaryID`) ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE `test`.`A_has_B` ( `FKAprimaryID` NOT NULL, `FKBprimaryID` NOT NULL, CONSTRAINT `FKA` FOREIGN KEY `FKA` (`FKAprimaryID`) REFERENCES `test`.`A` (`primaryID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `FKB` FOREIGN KEY `FKB` (`FKBprimaryID`) REFERENCES `test`.`B` (`primaryID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE = InnoDB; ====================================================== I ) As you can see the table which is created 'A_has_B' has two keys, ok, but the datatype is messing ! so this script cannot work and generates an error. II ) the keys are not marked as primary key in 'A_has_B' Second bug (linked whith the first one). ++++++++++++++++++++++++++++++++++++++++++ I try to modify the middle table 'A_has_B' in order to put the missing data type: 1) the data type are not listed when tab in the column 2) if i cut/past the datatype of another key INT(11) the application crashed How to repeat: First BUG : ++++++++++++ 1) design 2 tables 'A' and 'B' 2) make a relation as : 'A has many B'and 'B has many A' 3) menu-->Synchronise ==> generated script is a bad script Second bug (linked whith the first one). ++++++++++++++++++++++++++++++++++++++++++ I try to modify the table 'A_has_B' in order to put the missing data types : 1) when typing int the table editor the data type are not listed 2) if i put by "cutting and pasting" the datatype of another key INT(11) =====> the application is crashing.