[syslog-ng] SQL driver - Table names with dots failing to create

Balazs Scheidler bazsi at balabit.hu
Mon Jan 16 22:55:44 CET 2012


On Mon, 2012-01-16 at 08:05 -0500, phil at mindfury.net wrote:
> Hello.
> 
> I'm running v3.3.3 built from source on a Red Hat EL 5.3 machine.
> 
> I've been trying to narrow down a problem where hosts sending syslogs 
> to this box aren't showing up in MySQL, so I checked the internal log 
> and found this:
> 
> Error running SQL query; type='mysql', host='localhost', port='', 
> user='syslog-ng', database='syslog-ng', error='1064: You have an error 
> in your SQL syntax; check the manual that corresponds to your MySQL 
> server version for the right syntax to use near \'.3.4_20120113 (date 
> text, facility text, level text, host text, program text, pi\' at line 
> 1', query='CREATE TABLE messages_172.25.3.4_20120113 (date text, 
> facility text, level text, host text, program text, pid text, message 
> text)'
> 
> Looks like in MySQL, that table name can be misinterpreted as <database 
> name>.<table name>, the suggestion is to quote the table identifier with 
> backticks.  My question is, is there an option for the SQL driver that 
> does this that I'm just not seeing?
> 
> I know a workaround would be to ensure the IPs for my hosts reverse map 
> to a name, however it may not be feasible in all situations.
> 
> Any pointers would be appreciated.

Currently backticking is not supported by the SQL driver, though
probably would make sense.

-- 
Bazsi




More information about the syslog-ng mailing list