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:
what would return the value of 1844674407370955161(on my machine).
2) gen_schema.pl (that generates dbschema.c)
has the following line
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)
|