'signal' is a keyword in MySQL 5.5
authorTobias Brunner <tobias@strongswan.org>
Tue, 6 Nov 2012 13:23:56 +0000 (14:23 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 7 Nov 2012 11:37:23 +0000 (12:37 +0100)
Fixes #251.

src/libcharon/plugins/sql/sql_logger.c

index 6db3258..547e769 100644 (file)
@@ -102,7 +102,8 @@ METHOD(logger_t, log_, void,
                                                  DB_BLOB, local_host->get_address(local_host),
                                                  DB_BLOB, remote_host->get_address(remote_host));
                this->db->execute(this->db, NULL, "INSERT INTO logs ("
-                                                 "local_spi, signal, level, msg) VALUES (?, ?, ?, ?)",
+                                                 "local_spi, `signal`, level, msg) "
+                                                 "VALUES (?, ?, ?, ?)",
                                                  DB_BLOB, local_spi, DB_INT, group, DB_INT, level,
                                                  DB_TEXT, message);
        }