[Bug 120] New: afsql. c afsql_dd_format_* routines should include table in persist_name string
https://bugzilla.balabit.com/show_bug.cgi?id=120 Summary: afsql.c afsql_dd_format_* routines should include table in persist_name string Product: syslog-ng Version: 3.2.x Platform: Other URL: https://lists.balabit.hu/pipermail/syslog-ng/2011- February/015913.html OS/Version: Other Status: NEW Severity: normal Priority: unspecified Component: syslog-ng AssignedTo: bazsi@balabit.hu ReportedBy: jtk@cymru.com Type of the Report: bug Estimated Hours: 0.0 Created an attachment (id=36) --> (https://bugzilla.balabit.com/attachment.cgi?id=36) include table name in persist_name As originally discovered in the syslog-ng list post entitled "[syslog-ng] duplicate config elements in sql destinations" by John Kristoff on 2011-02-11, syslog-ng will complain, when multiple destinations all point to the same database, but different tables with the message: Internal error, duplicate configuration elements refer to the same persistent config; name='afsql_dd(pgsql,127.0.0.1,,bar)' Balazs responded describing the potential problems with counters being swapped and a fix that appears to work in testing. A Patch for syslog-ng 3.2.4 is attached, but similar patch should work for earlier versions as indicated by Balazs' posting. Thank you, John -- 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=120 --- Comment #1 from John Kristoff <jtk@cymru.com> 2011-05-16 18:29:21 --- (From update of attachment 36)
<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><pre>--- afsql.c +++ new.afsql.c @@ -865,11 +865,11 @@ static gchar * afsql_dd_format_stats_instance(AFSqlDestDriver *self) { - static gchar persist_name[64]; + static gchar persist_name[256];
g_snprintf(persist_name, sizeof(persist_name), - "%s,%s,%s,%s", - self->type, self->host, self->port, self->database); + "%s,%s,%s,%s,%s", + self->type, self->host, self->port, self->database, self->table->template); return persist_name; }
@@ -879,8 +879,8 @@ static gchar persist_name[256];
g_snprintf(persist_name, sizeof(persist_name), - "afsql_dd(%s,%s,%s,%s)", - self->type, self->host, self->port, self->database); + "afsql_dd(%s,%s,%s,%s,%s)", + self->type, self->host, self->port, self->database, self->table->template); return persist_name; }
-- 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=120 --- Comment #2 from Balazs Scheidler <bazsi@balabit.hu> 2011-05-19 13:45:52 --- Thanks for the patch, it indeed should fix this problem, however it causes the name of the keys in the persist file to change, so upgrade path must be implemented too. -- 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=120 Balazs Scheidler <bazsi@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution| |FIXED Status|NEW |RESOLVED --- Comment #3 from Balazs Scheidler <bazsi@balabit.hu> 2011-10-23 09:12:39 --- this was fixed in 3.3.1 -- 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