Need disable check foreign keys for new installation

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Minor
    • None
    • Affects Version/s: 2.0.0rc1
    • Component/s: Installation (I)
    • None
    • Environment:
      only MySQL!!! new installation. rev 25485.

      we was load data.sql, after load schema.sql into mysql database, and get error (images.sql had not been imported yet!! ):
      localhost zabbix-trunk # cat database/mysql/data.sql | mysql -pQwestions zbx_trunk
      ERROR 1452 (23000) at line 12049: Cannot add or update a child row: a foreign key constraint fails (`zbx_trunk`.`sysmaps_elements`, CONSTRAINT `c_sysmaps_elements_2` FOREIGN KEY (`iconid_off`) REFERENCES `images` (`imageid`))

      because some records (inserted rows) have constraint keys. Need to add next rows:
      SET foreign_key_checks = 0; in the begin
      and
      SET foreign_key_checks = 1; in the end

      I think need consider this factor.

            Assignee:
            Unassigned
            Reporter:
            Alexey Pustovalov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: