create schema s1; create schema s2; CREATE TABLE `s1`.`VALUE_LIST` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `discriminator` varchar(50) NOT NULL, `name` varchar(75) DEFAULT NULL, `description` varchar(1000) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=ndbcluster AUTO_INCREMENT=30609 DEFAULT CHARSET=latin1; CREATE TABLE `s2`.`BLACK_LIST` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `date` date NOT NULL, `desctiption` varchar(200) NOT NULL, `iduser` bigint(20) NOT NULL, `idstatus` bigint(20) NOT NULL, `idstatusprevious` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `status_idx` (`idstatus`), KEY `statusprevious_idx` (`idstatusprevious`), CONSTRAINT `status` FOREIGN KEY (`idstatus`) REFERENCES `s1`.`VALUE_LIST` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `statusprevious` FOREIGN KEY (`idstatusprevious`) REFERENCES `s1`.`VALUE_LIST` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=ndbcluster DEFAULT CHARSET=utf8; CREATE TABLE `s2`.`PERSON` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `firstname` varchar(250) NOT NULL COMMENT 'The first name can also be the social reason', `middlename` varchar(250) DEFAULT NULL COMMENT 'The middlename can also be the commercial name', `lastname` varchar(250) DEFAULT NULL, `secondlastname` varchar(250) DEFAULT NULL, `status` bigint(20) NOT NULL, `marriedname` varchar(250) DEFAULT NULL, `nationalityind` varchar(1) NOT NULL DEFAULT 'N', `persontype` bigint(20) NOT NULL, `gender` bigint(20) NOT NULL, `birdthday` date DEFAULT NULL, `passport` varchar(50) DEFAULT NULL, `nit` varchar(25) DEFAULT NULL, `maritalstatus` bigint(20) DEFAULT NULL, `activity` bigint(20) DEFAULT NULL, `creationdate` datetime DEFAULT NULL, `cui` varchar(20) DEFAULT NULL, `dpi` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `status_idx` (`status`), KEY `persontype_idx` (`persontype`), KEY `maritalstatus_idx` (`maritalstatus`), KEY `activity_idx` (`activity`), KEY `gender_idx` (`gender`), CONSTRAINT `activity` FOREIGN KEY (`activity`) REFERENCES `s1`.`VALUE_LIST` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `gender` FOREIGN KEY (`gender`) REFERENCES `s1`.`VALUE_LIST` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `maritalstatus` FOREIGN KEY (`maritalstatus`) REFERENCES `s1`.`VALUE_LIST` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `persontype` FOREIGN KEY (`persontype`) REFERENCES `s1`.`VALUE_LIST` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `status` FOREIGN KEY (`status`) REFERENCES `s1`.`VALUE_LIST` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=ndbcluster DEFAULT CHARSET=utf8; select * from s1.VALUE_LIST order by id asc; -- insert 7000 rows, try to delete and see the error. delete from s1.VALUE_LIST limit 7000;