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

Database upgrade script 05030153 to 05040000 is not idempotent

    XMLWordPrintable

Details

    • Problem report
    • Resolution: Cannot Reproduce
    • Major
    • None
    • 5.4.7
    • Proxy (P)
    • None
    • Team C

    Description

      Steps to reproduce:

      1. Install an earlier version (e.g. 4.0)
      2. Upgrade to the current stable (5.4.X)
      3. Let it automatically update the database.

      Result:

      The database upgrade fails with a number of foreign key errors.

      1. The error already reported at:
        https://support.zabbix.com/browse/ZBX-19435
      2. Tries to add a column that already exists:
        [Z3005] query failed: [1060] Duplicate column name 'evaltype' [alter table `sysmaps_elements` add `evaltype` integer default '0' not null]
        

      3. Tries to create a FK that already exists:

      Can't create table `zabbix`.`#sql-2bf_3467` (errno: 121 "Duplicate key on write or update") [alter table `report_user` add constraint c_report_user_1 foreign key (`reportid`) references `report` (`reportid`) on delete cascade]

      Expected:

      Database script is idempotent: if the column/fk/object already exists, don't create it.

      Include checks for whether this object already exists before creating it.

       

       

       

      Attachments

        Issue Links

          Activity

            People

              kprutkovs Konstantins Prutkovs
              npr npr
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: