Project

General

Profile

Bug #137

eap-simaka-sql: Incompatibility with MySQL

Added by Stefan Tomas about 9 years ago. Updated almost 9 years ago.

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

Description

`use` table filed name is incompatible with MySQL.

In source:src/libcharon/plugins/eap_simaka_sql/eap_simaka_sql_provider.c get_triplet() and get_quintuplet() functions:

        query = this->db->query(this->db,
                                "select rand, sres, kc from triplets where id = ? order by use",
                                DB_TEXT, buf, DB_BLOB, DB_BLOB, DB_BLOB);

This SQL query returns error: #1064 - You have an error in your SQL syntax
See http://dev.mysql.com/doc/refman/5.1/en/use.html
MySQL version used: 5.1

`use` filed should be replaced with `order` or similar name.

Files that require update:
  1. source:src/libcharon/plugins/eap_simaka_sql/eap_simaka_sql_provider.c
  2. source:src/libcharon/plugins/eap_simaka_sql/sqlite.sql
  3. source:src/libcharon/plugins/eap_simaka_sql/test.sql

History

#1 Updated by Stefan Tomas about 9 years ago

`use` filed should be replaced with `order` or similar name.

Well that wouldn't make much sense, would it? `order` is also a SQL keyword :)
So I'll suggest yet another name `ord`

#2 Updated by Tobias Brunner about 9 years ago

  • Category set to libcharon
  • Status changed from New to Resolved
  • Assignee changed from Stefan Tomas to Tobias Brunner
  • Target version set to 4.6.0

Thanks for the report.

Fixed with f35578acb. As the column stores a timestamp of the last usage of a triplet or quintuplet I used 'used' as column name.

#3 Updated by Tobias Brunner almost 9 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF