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

Query failed when updating existing host prototypes

XMLWordPrintable

    • Sprint 63 (Apr 2020), Sprint 64 (May 2020)
    • 0.125

       57058:20200430:143323.381 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR:  syntax error at or near "for"
      LINE 1: select null from group_prototype where for update
                                                     ^
       [select null from group_prototype where for update]
      
      diff --git a/src/zabbix_server/lld/lld_host.c b/src/zabbix_server/lld/lld_host.c
      index caa35e2581..4d48fa39fa 100644
      --- a/src/zabbix_server/lld/lld_host.c
      +++ b/src/zabbix_server/lld/lld_host.c
      @@ -1532,11 +1532,14 @@ static void     lld_groups_save(zbx_vector_ptr_t *groups, const zbx_vector_ptr_t *gr
       
              DBbegin();
       
      -       if (SUCCEED != DBlock_group_prototypeids(&new_group_prototype_ids))
      +       if (0 != new_group_prototype_ids.values_num)
              {
      -               /* the host group prototype was removed while processing lld rule */
      -               DBrollback();
      -               goto out;
      +               if (SUCCEED != DBlock_group_prototypeids(&new_group_prototype_ids))
      +               {
      +                       /* the host group prototype was removed while processing lld rule */
      +                       DBrollback();
      +                       goto out;
      +               }
              }
       
              if (0 != new_group_prototype_ids.values_num)
      

            viktors.tjarve Viktors Tjarve
            vso Vladislavs Sokurenko
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: