[syslog-ng] [Bug 23] New: MySQL default configuration causes error on 'pid' column

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Tue Sep 23 18:37:18 CEST 2008


           Summary: MySQL default configuration causes error on 'pid' column
           Product: syslog-ng
           Version: 2.1.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: unspecified
         Component: syslog-ng
        AssignedTo: bazsi at balabit.hu
        ReportedBy: mark at la-croix.net
Type of the Report: bug
   Estimated Hours: 0.0

When configuring a MySQL destination, the default 'pid' column type is INT.  However, if a message comes through with no PID, the SQL command tries to insert
an empty quoted string, which causes an error in MySQL 5.0.

Example error:
Error running SQL query; type='mysql', host='!MY_DB_HOST!', port='', user='syslog-ng', database='syslog-ng', error='1366: Incorrect integer value: \'\' for
column \'pid\' at row 1', query='INSERT INTO !MY_LOG_CLIENT_HOST!_2008_09_23 (date, facility, level, host, program, pid, message) VALUES (\'2008-09-23
12:24:35\', \'1\', \'5\', \'!MY_LOG_CLIENT!\', \'root\', \'\', \'test\')'

The message is coming from a TCP source from which a large percentage of messages have no PID associated.

The workaround is to explicitly set the PID column to VARCHAR so it can handle empty strings, but it would be nice to see the empty PID case gracefully

Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the syslog-ng mailing list