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

Ensure the ZBX_TYPE_LONGTEXT is consistently processed in server

    XMLWordPrintable

Details

    • Team C
    • Sprint 80 (Sep 2021), Sprint 81 (Oct 2021), Sprint 82 (Nov 2021)
    • 0.5

    Description

      There is a ZBX_TYPE_LONGTEXT type defined in Zabbix for database upgrade and schema generation. It is defined as longtext for MySQL(4Gb), nclob for Oracle(4Gb) and text for Postgresql(which is unlimited).
      However, various places in codebase assume different lengths for it. For example:
      1) get_string_field_size() function in db.c has the following:

      ZBX_TYPE_LONGTEXT:                                                                                                                                                               
                              return ZBX_SIZE_T_MAX
      

      what would return the value of 1844674407370955161(on my machine).
      2) gen_schema.pl (that generates dbschema.c)
      has the following line

      #define ZBX_TYPE_LONGTEXT_LEN 0                                                                                                                                                                     
      #define ZBX_TYPE_TEXT_LEN       65535  
      

      what suggest that for the regular text the limit is 65 kb but for Long text it is 0.

      ZBX_TYPE_LONGTEXT_LEN limit must be universally and consistently defined to the limit it is constrained by DBs: 4GB in MySQL and Oracle (and also for PostgreSQL which does not define a limit but we could still try to impose it for consistency for other DBs)

      Attachments

        Activity

          People

            arimdjonoks Artjoms Rimdjonoks
            arimdjonoks Artjoms Rimdjonoks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: