Bug #999

SQL Error when import computer with softwares

Added by David Durieux 11 months ago. Updated 7 months ago.

Status:Closed Start date:07/02/2011
Priority:Normal Due date:
Assignee:David Durieux % Done:

100%

Category:-
Target version:2.4.0 (0.80+1.0)
For junior contributor:No

Description

*** MySQL query error :
***
SQL: INSERT
                   INTO `glpi_computers_softwareversions` (`computers_id`,`softwareversions_id`,`is_template`,`is_deleted`) VALUES (\'2656\',\'20845\',\'0\',\'0\')
Error: Duplicate entry '2656-20845' for key 'unicity'
Backtrace :
/Donnees/www/data-dist/glpi080/inc/commondbtm.class.php :355               DBmysql->query()
/Donnees/www/data-dist/glpi080/inc/commondbtm.class.php :665               CommonDBTM->addToDB()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/inc/import_software.class.php :123          CommonDBTM->add()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/inc/libhook.class.php :406          PluginFusinvinventoryImport_Software->addSoftware()
 :         PluginFusinvinventoryLibhook::addSections()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/inc/lib.class.php :578              call_user_func()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/inc/lib.class.php :163              PluginFusinvinventoryLib->updateLibMachine()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/inc/inventory.class.php :220                PluginFusinvinventoryLib->startAction()
/Donnees/www/data-dist/glpi080/plugins/fusioninventory/inc/ruleimportequipment.class.php :578              PluginFusinvinventoryInventory->rulepassed()
/Donnees/www/data-dist/glpi080/inc/rule.class.php :770             PluginFusioninventoryRuleImportEquipment->executeActions()
/Donnees/www/data-dist/glpi080/inc/rulecollection.class.php :668           Rule->process()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/inc/inventory.class.php :139                RuleCollection->processAllRules()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/inc/importxml.class.php :89         PluginFusinvinventoryInventory->sendCriteria()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/front/importxml.php :52             PluginFusinvinventoryImportXML->importXMLFile()
/Donnees/www/data-dist/glpi080/plugins/fusinvinventory/front/importxml.php

Related issues

duplicates FusionInventory for GLPI - Bug #723: SQL errors on addSoftware() Closed 03/28/2011

Associated revisions

Revision ce05618f
Added by David Durieux 11 months ago

Fix SQL Error when import computer with softwares. closes #999

Revision 94876599
Added by David Durieux 11 months ago

Fix SQL Error when import computer with softwares. references #999

History

Updated by David Durieux 11 months ago

This is the problem when have 2 same softwares, bug of agent fixed #927 but have this error with old agent version.
So in this case check if this software is yet here, if yes refuse to import it.

Updated by David Durieux 11 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Updated by David Durieux 9 months ago

  • Target version changed from 59 to 2.4.0 (0.80+1.0)

Updated by David Durieux 7 months ago

  • Project changed from 18 to FusionInventory for GLPI

Also available in: Atom PDF