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

6.0.9 -> 6.2.3: database upgrade failed

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Trivial
    • Resolution: Won't fix
    • 6.2.3
    • None
    • Server (S)
    • None
    • Debian 11
      MariaDB 10.8.5
      Zabbix server 6.0.9 -> 6.2.3

    Description

      Steps to reproduce:

      1. Schema in use is attached to this case
      2. AX-6.0.9.sql
      3. Upgrade from 6.0.9 -> 6.2.3

      Result:

        7681:20221028:150332.462 completed 77% of database upgrade
        7681:20221028:150341.729 slow query: 9.266241 sec, "alter table `items` add constraint c_items_2 foreign key (`templateid`) references `items` (`itemid`)"
        7681:20221028:150341.730 completed 78% of database upgrade
        7681:20221028:150341.799 completed 79% of database upgrade
        7681:20221028:150406.845 slow query: 25.045478 sec, "alter table `items` add constraint c_items_5 foreign key (`master_itemid`) references `items` (`itemid`)"
        7681:20221028:150406.846 completed 80% of database upgrade
        7681:20221028:150407.091 completed 81% of database upgrade
        7681:20221028:150410.627 completed 82% of database upgrade
        7681:20221028:150410.652 completed 83% of database upgrade
        7681:20221028:150410.675 [Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`#sql-alter-318-2c`, CONSTRAINT `c_functions_1` FOREIGN KEY (`itemid`) REFERENCES `items` (`itemid`)) [alter table `functions` add constraint c_functions_1 foreign key (`itemid`) references `items` (`itemid`)]
        7681:20221028:150410.675 database upgrade failed

      Expected:

      Database upgrade

       

      Attachments

        1. AX-6.0.9.sql
          168 kB
        2. constraint.sql
          1 kB
        3. correction.sql
          11 kB
        4. O9J8m7c72k.png
          O9J8m7c72k.png
          110 kB

        Activity

          People

            edgar.akhmetshin Edgar Akhmetshin
            starko Marco Hofmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: