<div dir="ltr">I changed the column name in the database table from partition to partitionusrloc, and i added a new modparam (<span style="font-size:12.8000001907349px">partition_col</span>) in <span style="font-size:12.8000001907349px">modules/usrloc/ul_mod.c  file:</span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">{"partition_col",       PARAM_STR, &partition_col},<br></div><div><br></div><div><br></div><div>in order to be able to configure the name of this column from partition to partitionusrloc in kamailio module configuration section, with following configuration:</div><div><br></div><div><span style="font-size:12.8000001907349px">modparam("usrloc", "partition_col", "partitionusrloc")</span><br></div><div><br></div><div>I will enable the mysql log then collect the query log, and reply back to you with this information.</div><div><br></div><div>BR</div><div>Thank you.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-20 17:24 GMT+01:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    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?<br>
    <br>
    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?<br>
    <br>
    Cheers,<br>
    Daniel<div><div><br>
    <br>
    <div>On 20/07/15 18:04, José Seabra wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="ltr">Hello Daniel,
        <div><br>
        </div>
        <div>Result of command kamailio -v</div>
        <div><br>
        </div>
        <div>version: kamailio 4.3.1 (x86_64/linux) f38e67-dirty<br>
        </div>
        <div>
          <div>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</div>
          <div>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144,
            MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT
            PKG_SIZE 8MB</div>
          <div>poll method support: poll, epoll_lt, epoll_et, sigio_rt,
            select.</div>
          <div>id: f38e67 -dirty</div>
          <div>compiled on 15:56:29 Jul 20 2015 with gcc 4.4.7</div>
        </div>
        <div><br>
        </div>
        <div>Thank you for your support</div>
        <div><br>
        </div>
        <div>BR</div>
        <div>José Seabra</div>
      </div>
      </div></div><div class="gmail_extra"><br>
        <div class="gmail_quote"><div><div>2015-07-20 16:58 GMT+01:00
          Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br>
          </div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hello,<br>
            <br>
            the names of columns should be quoted in order to be safe
            against<br>
            reserved keywords.<br>
            <br>
            What is the exact version you are using (kamailio -v)?<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <span><br>
              On 20/07/15 17:37, José Seabra wrote:<br>
              > Hello Daniel,<br>
              ><br>
              > After update my kamailio to version 4.3 and change
              the table location<br>
              > as required in migration process, kamailio start
              giving some errors:<br>
              ><br>
              > [root@ccp1 kamailio]# 35(7637) ERROR: db_mysql
              [km_dbase.c:121]:<br>
              > db_mysql_submit_query(): driver error on query:
              Unknown column<br>
              > 'partition' in 'where clause'<br>
              > 35(7637) ERROR: <core> [db_query.c:132]:
              db_do_query_internal(): error<br>
              > while submitting query<br>
              ><br>
              > that's is because the column name "partition" is
              reserved word<br>
            </span>> (<a href="http://dev.mysql.com/doc/refman/5.6/en/keywords.html" rel="noreferrer" target="_blank">http://dev.mysql.com/doc/refman/5.6/en/keywords.html</a>)
            in mysql<br>
            <div>
              <div>> ndbcluster engine, so what i did to
                fix this issue was add a new<br>
                > modparam in<br>
                > modules/usrloc/ul_mod.c file:<br>
                ><br>
                > {"partition_col",       PARAM_STR,
                &partition_col},<br>
                ><br>
                ><br>
                > with this i can configure what name i want for this
                column in kamailio<br>
                > module configuration and configure a diferent
                column name in  table<br>
                > location(ex: modparam("usrloc", "partition_col",
                "partitionusrloc") ),<br>
                >  Can you please check out if what i did is the
                correct way to fix it,<br>
                > in order to avoid damage something else.<br>
                ><br>
                > Best regards<br>
                > --<br>
                > Cumprimentos<br>
                > José Seabra<br>
                <br>
              </div>
            </div>
            </div></div><span><font color="#888888">--<br>
                Daniel-Constantin Mierla<br>
                <a href="http://twitter.com/#%21/miconda" rel="noreferrer" target="_blank">http://twitter.com/#!/miconda</a>
                - <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">http://www.linkedin.com/in/miconda</a><span><br>
                Book: SIP Routing With Kamailio - <a href="http://www.asipto.com" rel="noreferrer" target="_blank">http://www.asipto.com</a><br>
                <br>
              </span></font></span></blockquote>
        </div>
        <br>
        <br clear="all"><span><font color="#888888">
        <div><br>
        </div>
        -- <br>
        <div>Cumprimentos
          <div>José Seabra</div>
        </div>
      </font></span></div>
    </blockquote><span>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a></pre>
  </span></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Cumprimentos<div>José Seabra</div></div>
</div></div>