Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-1470

Cannot import zabbix 2.0.* images into DB with other images

    Details

    • Type: Change Request
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't fix
    • Affects Version/s: 2.0.2, 2.0.3
    • Fix Version/s: None
    • Labels:
    • Environment:
      mysql, but suspect other SQL server too
      frontend

      Description

      If I have a Zabbix environment with old/custom images uploaded already, I cannot import images.sql because it tries to overwrite old imageid

      I fixed this, by setting imageid column with AUTO_INCREMENT as follows (image_table_create.sql):

      mysql> describe images;
      ----------------------------------------------------------+

      Field Type Null Key Default Extra

      ----------------------------------------------------------+

      imageid bigint(20) unsigned NO PRI NULL auto_increment
      imagetype int(11) NO MUL 0  
      name varchar(64) NO   0  
      image longblob NO   NULL  

      ----------------------------------------------------------+
      4 rows in set (0.00 sec)

      mysql>

      and images.sql should have not imageid definitions, like this line (images_fixed.sql):

      INSERT INTO `images` (`imagetype`,`name`,`image`) VALUES (1,'Cloud_(128)',0x89504E470D0A1A [..........]);

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sergio.cricca sergio cricca
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: