Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-4678

Need disable check foreign keys for new installation

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.0.0rc1
    • Installation (I)
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: