Reputation: 115
I've created a Federated table with MySQL and I've found that the local table that results only contain a subset of the data of the remote one.
This is the Federated:
CREATE TABLE `Activities` (
`idActivity` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Periods_idPeriod` int(10) unsigned NOT NULL DEFAULT 1,
`applicationActivityId` varchar(255) DEFAULT NULL,
`previousApplicationActivityId` varchar(255) DEFAULT NULL,
`title` text,
`ActivityTypes_idActivityType` int(10) unsigned DEFAULT 4,
`comment1` text,
`comment2` text,
`comment3` text,
`Areas_idArea` int(10) unsigned DEFAULT NULL,
`sentReports` int(11) DEFAULT '1',
PRIMARY KEY (`idActivity`)
) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://admin:*******@*******:3306/sup_supperdb/Activities';
And this is the remote (original) one:
CREATE TABLE `Activities` (
`idActivity` int(10) unsigned NOT NULL auto_increment,
`Periods_idPeriod` int(10) unsigned NOT NULL default '0',
`applicationActivityId` varchar(255) default NULL,
`previousApplicationActivityId` varchar(255) default NULL,
`title` text,
`ActivityTypes_idActivityType` int(10) unsigned default NULL,
`comment1` text,
`comment2` text,
`comment3` text,
`Areas_idArea` int(10) unsigned default NULL,
`sentReports` int(11) default '1',
PRIMARY KEY (`idActivity`),
KEY `Activities_FKIndex1` (`Periods_idPeriod`),
KEY `Areas_idArea` (`Areas_idArea`),
KEY `ActivityTypes_idActivityType` (`ActivityTypes_idActivityType`),
CONSTRAINT `Activities_ibfk_1` FOREIGN KEY (`Areas_idArea`) REFERENCES `Areas` (`idArea`) ON DELETE SET NULL,
CONSTRAINT `Activities_ibfk_2` FOREIGN KEY (`ActivityTypes_idActivityType`) REFERENCES `ActivityTypes` (`idActivityType`) ON DELETE SET NULL,
CONSTRAINT `Activities_ibfk_3` FOREIGN KEY (`Periods_idPeriod`) REFERENCES `Periods` (`idPeriod`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
In the original one I get 3045 rows, but in the Federated only 2946.
If anybody has a hint on what may be happening or if is some kind of Federated tables limitations his comment will be appreciated.
Upvotes: 1
Views: 192