Description

When trying to use a htable with column names different than globally configured, Kamailio won't start.

Troubleshooting

Reproduction

Debugging Data

When running an an ngrep trace while starting Kamailio, you can see the following statement:

T 2017/01/24 22:29:58.603428 127.0.0.1:53843 -> 127.0.0.1:3306 [AP]
I....select `foo_name`,`key_value` from `htable_different`  order by key_name

T 2017/01/24 22:29:58.603555 127.0.0.1:3306 -> 127.0.0.1:53843 [AP]
4......#42S22Unknown column 'key_name' in 'order clause'

So when trying to read from the database, it correctly uses the changed column name in the select part, but uses the default column name in the order by part of the query.

Additional Information

version: kamailio 4.4.5 (x86_64/linux) 
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, 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: unknown 
compiled with gcc 4.9.2
Debian 8.6
Linux osboxes 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.