Project

General

Profile

Bug #2359

preparing MySQL statement failed, ver. 5.3.5

Added by Igor Shutrov about 3 years ago. Updated about 3 years ago.

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

Description

Hi!

I have SQL error when start ipsec and when client connecting:


2017.06.10 11:19:42 02[NET] <51> received packet: from yyy.yyy.yyy.yyy[64646] to xxx.xxx.xxx.xxx[500] (810 bytes)
2017.06.10 11:19:42 02[ENC] <51> parsed IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) N(HASH_ALG) N(REDIR_SUP) ]
2017.06.10 11:19:42 02[IKE] <51> yyy.yyy.yyy.yyy is initiating an IKE_SA
2017.06.10 11:19:42 02[IKE] <51> remote host is behind NAT
2017.06.10 11:19:42 02[ENC] <51> generating IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) N(HASH_ALG) N(MULT_AUTH) ]
2017.06.10 11:19:42 02[NET] <51> sending packet: from xxx.xxx.xxx.xxx[500] to yyy.yyy.yyy.yyy[64646] (336 bytes)
2017.06.10 11:19:42 12[NET] <51> received packet: from yyy.yyy.yyy.yyy[6053] to xxx.xxx.xxx.xxx[4500] (540 bytes)
2017.06.10 11:19:42 12[ENC] <51> parsed IKE_AUTH request 1 [ IDi N(INIT_CONTACT) CERTREQ CPRQ(ADDR ADDR6 DNS DNS6) N(ESP_TFC_PAD_N) SA TSi TSr N(MOBIKE_SUP) N(NO_ADD_ADDR) N(MULT_AUTH) N(EAP_ONLY) N(MSG_ID_SYN_SUP) ]
2017.06.10 11:19:42 12[IKE] <51> received 1 cert requests for an unknown ca
2017.06.10 11:19:42 12[CFG] <51> looking for peer configs matching xxx.xxx.xxx.xxx[%any]...yyy.yyy.yyy.yyy[vpn_user]
2017.06.10 11:19:42 12[LIB] <51> 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 'virtual, pool, mediation, mediated_by, COALESCE(p.type, 0), p.data FROM peer_con' at line 1

#ipsec version
Linux strongSwan U5.3.5/K4.4.0-38-generic
Institute for Internet Technologies and Applications
University of Applied Sciences Rapperswil, Switzerland
See 'ipsec --copyright' for copyright information.

Associated revisions

Revision 7aa30575 (diff)
Added by Tobias Brunner about 3 years ago

sql: Use qualified names in SQL query statements

VIRTUAL is a new reserved keyword in MySQL 5.7.6 that caused some of these
queries to fail.

Fixes #2359.

History

#1 Updated by Noel Kuntze about 3 years ago

  • Category set to configuration
  • Status changed from New to Feedback
  • Assignee set to Noel Kuntze

Please provide your strongswan.conf, /etc/strongswan.d/charon/mysql.conf (if it exists), /etc/strongswan.d/charon/sql.conf (if it exists) and the output of ipsec statusall.

#2 Updated by Tobias Brunner about 3 years ago

  • Tracker changed from Issue to Bug
  • Category changed from configuration to libcharon
  • Assignee changed from Noel Kuntze to Tobias Brunner
  • Target version set to 5.6.0
  • Resolution set to Fixed

VIRTUAL is apparently a new reserved keyword in MySQL 5.7.6. So that either has to be written as `virtual` or preferably as c.virtual in the SQL queries in source:src/libcharon/plugins/sql/sql_config.c. I did so in the 2359-sql-keywords branch.

#3 Updated by Tobias Brunner about 3 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF