Project

General

Profile

Bug #251

Problems with SQL synax with strongSwan 5.0.1 and mysql 5.5.28 on Debian 6.0.6 + dotdeb repository

Added by Dmitry Korzhevin over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
libcharon
Target version:
Start date:
04.11.2012
Due date:
Estimated time:
Affected version:
5.0.1
Resolution:
Fixed

Description

I have errors in mysql syntax, logs table is empty in strongswan mysql database. I created database tables with sql file from this page:

http://wiki.strongswan.org/projects/strongswan/wiki/SQL

http://wiki.strongswan.org/projects/strongswan/repository/entry/src/libcharon/plugins/sql/mysql.sql

Nov 4 19:37:25 13[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 13[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 13[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 13[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 13[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 13[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 13[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 13[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 15[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 15[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 15[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 15[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 15[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 07[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 07[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 07[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 07[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 07[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 07[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 07[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 07[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 08[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 08[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 08[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 08[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 08[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 08[LIB] preparing MySQL statement failed: 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
'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 09[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 09[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 09[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 10[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 10[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 10[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 10[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 10[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 10[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 10[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 12[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 12[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 12[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 12[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 12[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 14[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 14[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:25 14[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:41 08[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:41 08[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:41 08[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1
Nov 4 19:37:41 08[LIB] preparing MySQL statement failed: 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 'signal, level, msg) VALUES (?, ?, ?, ?)' at line 1

0001-signal-is-a-keyword-in-MySQL-5.5.patch (987 Bytes) 0001-signal-is-a-keyword-in-MySQL-5.5.patch Tobias Brunner, 06.11.2012 14:27
mysql_problem (11 KB) mysql_problem mysql commands output Dmitry Korzhevin, 07.11.2012 10:18

Associated revisions

Revision ed05a1a3 (diff)
Added by Tobias Brunner over 6 years ago

'signal' is a keyword in MySQL 5.5

Fixes #251.

History

#1 Updated by Tobias Brunner over 6 years ago

signal is a new keyword in MySQL 5.5. Could you please try if the attached patch works for you?

#2 Updated by Dmitry Korzhevin over 6 years ago

Hello, Tobias

Thank you, this helps:

patch -p0 sql_logger.c < 0001-signal-is-a-keyword-in-MySQL-5.5.patch

Then i make:

make clean
./configure --sysconfdir=/etc --enable-eap-identity --enable-eap-mschapv2 --enable-md4 --enable-integrity-test --enable-test-vectors --enable-sql --enable-mysql --enable-xauth-eap
make
make install

#3 Updated by Dmitry Korzhevin over 6 years ago

According to /var/log/charon.log no more sql errors, but i see strange characters (maby bad encoding), at table 'logs', column local_spi - please look at attached file.

Example:

2 | �u> 9 | 1 | parsed ID_PROT request 0 [ SA V V V ]

#4 Updated by Tobias Brunner over 6 years ago

  • Status changed from Assigned to Closed
  • Resolution set to Fixed

I pushed the fix to master.

2 | �u> 9 | 1 | parsed ID_PROT request 0 [ SA V V V ]

That's normal as this field contains the local IKE SPI as binary blob.

Also available in: Atom PDF