[syslog-ng] [Bug 158] New: syslog-ng tries to add already existing column when using sqlite3

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Sun Jan 22 01:07:44 CET 2012


https://bugzilla.balabit.com/show_bug.cgi?id=158

           Summary: syslog-ng tries to add already existing column when
                    using sqlite3
           Product: syslog-ng
           Version: 3.3.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: unspecified
         Component: syslog-ng
        AssignedTo: bazsi at balabit.hu
        ReportedBy: bugzilla.syslogng at feystorm.net
Type of the Report: ---
   Estimated Hours: 0.0


I'm trying to use an sqlite3 database through the sql driver, however syslog-ng seems to be unable to verify the table structure and is trying to add a column
which already exists, and so the add fails.

2012-01-21 18:58:10 syslog-ng[14564]: Error running SQL query; type='sqlite3', host='', port='', user='syslog-ng', database='/var/log/logs.sql3', error='1:
duplicate column name: time', query='ALTER TABLE logs ADD time text'
2012-01-21 18:58:10 syslog-ng[14564]: Error adding missing column, giving up; table='logs', column='time'
2012-01-21 18:58:10 syslog-ng[14564]: Error checking table, disconnecting from database, trying again shortly; time_reopen='60'


Relevant portion of my config
destination d_sqlite {
   sql(
      type('sqlite3')
      database("/var/log/logs.sql3")
      table("logs")
      columns("time", "time_r", "host", "facility", "priority", "program", "pid", "tag", "message")
      values("$S_UNIXTIME", "$R_UNIXTIME", "$FULLHOST", "$FACILITY_NUM", "$PRIORITY", "$PROGRAM", "$PID", "$DBTAG", "$MSG")
      null("")
      flags(explicit-commits)
      flush_lines(10)
      flush_timeout(200)
   );
};


My database schema
CREATE TABLE logs (id integer primary key autoincrement, time unsigned integer not null, time_r unsigned integer not null, host text not null, facility
unsigned integer not null, priority unsigned integer not null, program text not null, pid unsigned integer, tag text, message text not null);


This is occurring with syslog-ng 3.3.4 and libdbi 0.8.3


-- 
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