[SR-Users] kamailio 4.3v partition column name is reserved word in mysq ndbcluster engine

Daniel-Constantin Mierla miconda at gmail.com
Mon Jul 20 17:58:35 CEST 2015


Hello,

the names of columns should be quoted in order to be safe against
reserved keywords.

What is the exact version you are using (kamailio -v)?

Cheers,
Daniel

On 20/07/15 17:37, José Seabra wrote:
> Hello Daniel,
>
> After update my kamailio to version 4.3 and change the table location
> as required in migration process, kamailio start giving some errors:
>
> [root at ccp1 kamailio]# 35(7637) ERROR: db_mysql [km_dbase.c:121]:
> db_mysql_submit_query(): driver error on query: Unknown column
> 'partition' in 'where clause'
> 35(7637) ERROR: <core> [db_query.c:132]: db_do_query_internal(): error
> while submitting query
>
> that's is because the column name "partition" is reserved word
> (http://dev.mysql.com/doc/refman/5.6/en/keywords.html) in mysql
> ndbcluster engine, so what i did to fix this issue was add a new
> modparam in 
> modules/usrloc/ul_mod.c file:
>
> {"partition_col",       PARAM_STR, &partition_col},
>
>
> with this i can configure what name i want for this column in kamailio
> module configuration and configure a diferent column name in  table
> location(ex: modparam("usrloc", "partition_col", "partitionusrloc") ),
>  Can you please check out if what i did is the correct way to fix it,
> in order to avoid damage something else.
>
> Best regards
> -- 
> Cumprimentos
> José Seabra

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com




More information about the sr-users mailing list