Ad Widget

Collapse

string values get truncated

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #1

    string values get truncated

    Hi,
    (zabbix 2.0.9, mysql)

    I wonder why item's lastvalue gets truncated to 255 characters even if the item type is set to "text"?

    I understand that item type "char" is limited but the docs say that "text" is unlimited. In mysql the "lastvalue" field in the "items" table is "varchar(255)" but that should allow values longer than 255.

    Anyway:

    MariaDB [zabbix]> select itemid,lastvalue from items where length(lastvalue)>255;
    Empty set (0.01 sec)

    What gives?
    Thanks for any hint.
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    Ok, my fault.

    The items table truncates "lastvalue" to 255 chars maximum. But in the history_* tables the complete value is stored.

    items
    +- itemid
    +- lastclock
    +- lastvalue

    history_text
    +- itemid
    +- clock
    +- value

    All values correspond.

    Comment

    Working...