Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If in the first case the referenced table does exist, or in the second case the referenced data exists in the target table, then probably the foreign keys are damaged some how.

Solution for case 1:

Code Block
languagesql
titleExample SQL which had triggered the error in the past
CREATE TABLE `LEK_match_analysis_taskassoc` (
  `id` INT NOT NULL AUTO_INCREMENT,
  `taskGuid` VARCHAR(38) NULL,
  `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `internalFuzzy` TINYINT(1) NULL DEFAULT 0,
  `pretranslateMatchrate` INT(11) NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_LEK_match_analysis_taskassoc_1_idx` (`taskGuid` ASC),
  CONSTRAINT `fk_LEK_match_analysis_taskassoc_1`
    FOREIGN KEY (`taskGuid`)
    REFERENCES `LEK_task` (`taskGuid`)
    ON DELETE CASCADE 
    ON UPDATE CASCADE);

...

What probably could also help: If there is a key on the foreign table affecting the field to be used as foreign key: recreate that index. (Not tested)

Solution for case 2:

In that case the error happened on Updating data in the LEK_term_attributes table. Error was:

...