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

incorrect query when deleting an image

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 1.9.2 (alpha)
    • 1.9.1 (alpha)
    • Frontend (F)
    • None

      regression. try to delete an image :

      Error in query [SELECT DISTINCT sm.sysmapid, sm.name FROM sysmaps_elements se, sysmaps sm WHERE sm.sysmapid=se.sysmapid AND ( (se.iconid_off IN (42)) OR (se.iconid_on IN (42)) OR (se.iconid_unknown IN (42)) OR (se.iconid_disabled IN (42)) OR (se.iconid_maintenance IN (42)) OR (sm.backgroundid IN (42)) )] [Unknown column 'se.iconid_unknown' in 'where clause']
      mysql_fetch_assoc() expects parameter 1 to be resource, boolean given[/usr/local/apache2/htdocs/trunk/include/db.inc.php:588]
      mysql_free_result() expects parameter 1 to be resource, boolean given[/usr/local/apache2/htdocs/trunk/include/db.inc.php:590]

      if the image is used in any map :

      Error in query [SELECT DISTINCT sm.sysmapid, sm.name FROM sysmaps_elements se, sysmaps sm WHERE sm.sysmapid=se.sysmapid AND ( (se.iconid_off IN (41)) OR (se.iconid_on IN (41)) OR (se.iconid_unknown IN (41)) OR (se.iconid_disabled IN (41)) OR (se.iconid_maintenance IN (41)) OR (sm.backgroundid IN (41)) )] [Unknown column 'se.iconid_unknown' in 'where clause']
      mysql_fetch_assoc() expects parameter 1 to be resource, boolean given[/usr/local/apache2/htdocs/trunk/include/db.inc.php:588]
      mysql_free_result() expects parameter 1 to be resource, boolean given[/usr/local/apache2/htdocs/trunk/include/db.inc.php:590]
      Error in query [DELETE FROM images WHERE (imageid IN (41)) ] [Cannot delete or update a parent row: a foreign key constraint fails (`zabbix_1_9`.`sysmaps_elements`, CONSTRAINT `c_sysmaps_elements_2` FOREIGN KEY (`iconid_off`) REFERENCES `images` (`imageid`))]
      [ CImage::delete ] DBerror

            Unassigned Unassigned
            richlv richlv
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: