[Bug 158] New: syslog-ng tries to add already existing column when using sqlite3
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@balabit.hu ReportedBy: bugzilla.syslogng@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.
https://bugzilla.balabit.com/show_bug.cgi?id=158 --- Comment #1 from Balazs Scheidler <bazsi@balabit.hu> 2012-01-22 09:30:09 --- I seem to remember working with libdbi upstream to fix a similar issue, but I'm not sure that that work has made it into a release. This is the patch (might be about 4 years old) http://git.balabit.hu/?p=bazsi/libdbi-drivers.git;a=commit;h=1f4c3ba026e08db... I'm starting to think that it'd make sense to bundle our own libdbi librariecs (which distributions loathe at) or simply abandon libdbi completely. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=158 Patrick <bugzilla.syslogng@feystorm.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution| |INVALID Status|NEW |RESOLVED --- Comment #2 from Patrick <bugzilla.syslogng@feystorm.net> 2012-01-22 16:27:53 --- That patch (with a minor tweak to fix an error) has resolved the issue. Thanks I'll post the patch to my distro's (gentoo) bug tracker to get it integrated into the build since after 4 years it seems like upstream isnt going to release a build any time soon (it is in their CVS, just not a release) -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=158 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |algernon@balabit.hu --- Comment #3 from Gergely Nagy <algernon@balabit.hu> 2012-01-23 11:30:36 --- (In reply to comment #1)
I'm starting to think that it'd make sense to bundle our own libdbi librariecs (which distributions loathe at) or simply abandon libdbi completely.
My very strong opinion is that libdbi should be dropped. It's quite bad from a performance point of view, it has a terrible API and it's very buggy and inconsistent. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla@bugzilla.balabit.com