Re: [PATCH] dlr_mysql.c - Table name fix

Alejandro Guerrieri <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
The patch looks fine at first sight (didn't tried it). What it does is  
to quote mysql parameters so you can use reserved words as table and/ 
or columns names.

I'm +1 on it.

Regards,

Alex
--
Alejandro Guerrieri
[email protected]



On 09/10/2009, at 15:54, Nikos Balkanas wrote:

> Hi,
>
> But this works as it is. Under what conditions do you recreate  
> error? Lastly what about the binds wouldn't they need escaping, too,  
> if strings?
>
> BR,
> Nikos
> ----- Original Message ----- From: "Vincent CHAVANIS" <[email protected] 
> >
> To: <[email protected]>
> Sent: Friday, October 09, 2009 4:21 PM
> Subject: [PATCH] dlr_mysql.c - Table name fix
>
>
>> Hi all,
>>
>> Here is a patch that escape table names from mysql specs.
>> This will fix the SQL syntax error.
>>
>> Simple POC (set your mysql conf as this)
>> group = dlr-db
>> id = mydlr
>> table = SELECT
>>
>> You will get : ERROR 1064 (42000): You have an error in your SQL  
>> syntax;
>>
>> Vincent
>>
>> -- 
>> Telemaque - 06560 SOPHIA-ANTIPOLIS - (FR)
>> Service Technique/Reseau - NOC
>> Direction du Developpement xMS+
>> http://www.telemaque.fr/
>> [email protected]
>> Tel : +33 4 92 90 99 84 (fax 9142)
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.