ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10356

Different size of sendto field for usermedia

    Details

      Description

      Please see the attached screenshot. This field varchar(100) on mysql. so text gets cut off when saved.
      I think this "send to" field maxlength should be changed.

        Activity

        Hide
        Oleksiy Zagorskyi added a comment - - edited

        In MySQL parameter "sql_mode" is not set to STRICT_ALL_TABLES or STRICT_TRANS_TABLES (which is supposedly true for default my.cnf), then mysql silently trims too long value (zabbix v2.4).
        http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_strict_all_tables

        If the "sql_mode" is set, then we see this error in zabbix frontend:

        Error in query [INSERT INTO media (mediaid,userid,mediatypeid,sendto,active,severity,period) VALUES ('10','1','6','01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789','0','63','1-7,00:00-24:00')] [Data too long for column 'sendto' at row 1]
        ...trim...
        

        Postgres (zabbix v.2.2) produces an error on top of page:

        pg_query(): Query failed: ERROR:  value too long for type character varying(100) [profile.php:159 → CAPIObject->updateMedia() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CUser->updateMedia() → CUser->addMediaReal() → DBexecute() → pg_query() in /zab/www-dev/2.2pg/include/db.inc.php:509]
        Error in query [INSERT INTO media (mediaid,userid,mediatypeid,sendto,active,severity,period) VALUES ('1','1','1','01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789','0','63','1-7,00:00-24:00')] [ERROR:  value too long for type character varying(100)]
        Cannot insert user media.
        Empty parameters
        

        CONFIRMED

        Show
        Oleksiy Zagorskyi added a comment - - edited In MySQL parameter "sql_mode" is not set to STRICT_ALL_TABLES or STRICT_TRANS_TABLES (which is supposedly true for default my.cnf), then mysql silently trims too long value (zabbix v2.4). http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_strict_all_tables If the "sql_mode" is set, then we see this error in zabbix frontend: Error in query [INSERT INTO media (mediaid,userid,mediatypeid,sendto,active,severity,period) VALUES ('10','1','6','01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789','0','63','1-7,00:00-24:00')] [Data too long for column 'sendto' at row 1] ...trim... Postgres (zabbix v.2.2) produces an error on top of page: pg_query(): Query failed: ERROR: value too long for type character varying(100) [profile.php:159 → CAPIObject->updateMedia() → CAPIObject->__call() → czbxrpc::call() → czbxrpc::callAPI() → call_user_func() → CUser->updateMedia() → CUser->addMediaReal() → DBexecute() → pg_query() in /zab/www-dev/2.2pg/include/db.inc.php:509] Error in query [INSERT INTO media (mediaid,userid,mediatypeid,sendto,active,severity,period) VALUES ('1','1','1','01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789','0','63','1-7,00:00-24:00')] [ERROR: value too long for type character varying(100)] Cannot insert user media. Empty parameters CONFIRMED
        Hide
        Ivo Kurzemnieks added a comment - - edited

        (1) No translation string changes.

        Gunars Pujats CLOSED

        Show
        Ivo Kurzemnieks added a comment - - edited (1) No translation string changes. Gunars Pujats CLOSED
        Hide
        Ivo Kurzemnieks added a comment -

        RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-10356

        Show
        Ivo Kurzemnieks added a comment - RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-10356
        Hide
        Gunars Pujats (Inactive) added a comment -

        Successfully tested!

        Show
        Gunars Pujats (Inactive) added a comment - Successfully tested!
        Hide
        Ivo Kurzemnieks added a comment - - edited

        Fixed in:

        • pre-2.2.12rc1 r58712
        • pre-2.4.8rc1 r58713
        • pre-3.0.2rc1 r58760
        • pre-3.1.0 (trunk) r58761
        Show
        Ivo Kurzemnieks added a comment - - edited Fixed in: pre-2.2.12rc1 r58712 pre-2.4.8rc1 r58713 pre-3.0.2rc1 r58760 pre-3.1.0 (trunk) r58761

          People

          • Assignee:
            Unassigned
            Reporter:
            Kim Jongkwon
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: