Bug 4431

Summary: gammu-0.31 has bug in mysql syntax
Product: Mageia Reporter: Derek Jennings <derekjenn>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: gammu-1.31.0-1.mga2 CVE:
Status comment:

Description Derek Jennings 2012-02-07 19:21:08 CET
Description of problem:
The gammu-smsd daemon is able to interface with a number of different databases. Due to the lack of a libdbi-drivers package in Mageia (See bug 4421 ) it is not possible to use the default sqlite3 database, so mysql/mariadb is the best alternative.

A bug in gammu-0.31 causes a conflict between a column name in the gammu database and a reserved word in mysql see  https://bugs.cihar.com/view.php?id=1380
The bug is marked resolved but it appears to have come back again.




Version-Release number of selected component (if applicable):
gammu-0.31

How reproducible:
Only affects the gammu-smsd daemon when using mysql database.


Workaround

The bug can be worked around by putting a custom sql statement into the configuration file /etc/gammu-smsdrc like this:-


[sql]
insert_phone = INSERT INTO phones (IMEI, ID, Send, Receive, InsertIntoDB, TimeOut, Client, Battery, `Signal`) VALUES (%I, %P, %1, %2, NOW(), (NOW() + INTERVAL 10 SECOND) + 0, %N, -1, -1)
refresh_phone_status = UPDATE phones SET TimeOut= (NOW() + INTERVAL 10 SECOND) + 0,Battery = %1,`Signal` = %2 WHERE IMEI = %I
Comment 1 Derek Jennings 2012-02-08 00:54:54 CET
Ignore this bug report. The problem was between the keyboard and chair.


I was using gammu-0.31, but had libgammu-0.29 installed. Upgrading to the correct library resolved the issue.

Status: NEW => RESOLVED
Resolution: (none) => INVALID