[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 18:24:41 CEST 2015
Hello,
the backticks should be added for columns in where condition. Can you
enable logging the query in mysql server logs and send it over to see
how it looks?
Or maybe I didn't understand your problem properly and you changed the
name in the database table for column partition, but there was no way to
change that to usrloc module?
Cheers,
Daniel
On 20/07/15 18:04, José Seabra wrote:
> Hello Daniel,
>
> Result of command kamailio -v
>
> version: kamailio 4.3.1 (x86_64/linux) f38e67-dirty
> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
> SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX,
> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> USE_DST_BLACKLIST, HAVE_RESOLV_RES
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> id: f38e67 -dirty
> compiled on 15:56:29 Jul 20 2015 with gcc 4.4.7
>
> Thank you for your support
>
> BR
> José Seabra
>
> 2015-07-20 16:58 GMT+01:00 Daniel-Constantin Mierla <miconda at gmail.com
> <mailto:miconda at gmail.com>>:
>
> 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://twitter.com/#%21/miconda> -
> http://www.linkedin.com/in/miconda
> Book: SIP Routing With Kamailio - http://www.asipto.com
>
>
>
>
> --
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150720/4c6b7dd8/attachment.html>
More information about the sr-users
mailing list