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

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Wed Sep 24 15:47:22 CEST 2008


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





--- Comment #3 from Balazs Scheidler <bazsi at balabit.hu>  2008-09-24 15:47:22 ---
the bad thing about SQL defaults, that it is almost impossible to create a static default that will work for all databases.

The current one works for MySQL, but fails on Oracle as it uses slightly different syntax, and its varchar() type does not support more than 4096 characters. 
MSSQL has other quirks.

Regarding the 'default' value, would something like this be ok?

columns('id int not null auto_increment primary key', 'date datetime', 'host varchar(256)'
values(default, '$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC', '$HOST')

This would generate this INSERT:

INSERT INTO <table> (date, host) VALUES ('2008-09-24 15:46:25', 'bzorp')

e.g. it'd skip the column where the value has the keyword 'default' instead of a normal template. I think this would solve your problem as well, right?


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