It seems that I created the table in-between the two commits (while the index was unique). After dropping the table and re-creating it back, all is good. Sorry for the noise.
-ovidiu On Fri, Apr 1, 2016 at 11:01 PM, Ovidiu Sas <[email protected]> wrote: > It's not this particular commit, but the previous one that created the index. > Even with <unique/> removed, the index seems to be unique on mysql. > Here's how the index was created: > CREATE INDEX connection_idx ON location (`server_id`, `connection_id`); > > On Fri, Apr 1, 2016 at 10:53 PM, Ovidiu Sas <[email protected]> wrote: >> This seems to create issues for users re-registering over udp. >> For udp connections, the server_id is 0 and the connection_id is -1. >> If a user crashes and re-registers the location table cannot be updated: >> ERROR: db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver >> error on query: Duplicate entry '0--1' for key 'connection_idx' (1062) >> >> On Wed, Mar 23, 2016 at 10:33 AM, Juha Heinanen <[email protected]> wrote: >>> Module: kamailio >>> Branch: master >>> Commit: d72ac166b152ca6906248d67e2605d5b283fa01e >>> URL: >>> https://github.com/kamailio/kamailio/commit/d72ac166b152ca6906248d67e2605d5b283fa01e >>> >>> Author: Juha Heinanen <[email protected]> >>> Committer: Juha Heinanen <[email protected]> >>> Date: 2016-03-23T16:32:06+02:00 >>> >>> srdb1/schema: removed unique constraint from connection_idx >>> >>> --- >>> >>> Modified: lib/srdb1/schema/location.xml >>> >>> --- >>> >>> Diff: >>> https://github.com/kamailio/kamailio/commit/d72ac166b152ca6906248d67e2605d5b283fa01e.diff >>> Patch: >>> https://github.com/kamailio/kamailio/commit/d72ac166b152ca6906248d67e2605d5b283fa01e.patch >>> >>> --- >>> >>> diff --git a/lib/srdb1/schema/location.xml b/lib/srdb1/schema/location.xml >>> index 07c8d58..c22fcaf 100644 >>> --- a/lib/srdb1/schema/location.xml >>> +++ b/lib/srdb1/schema/location.xml >>> @@ -232,7 +232,6 @@ >>> <name>connection_idx</name> >>> <colref linkend="server_id"/> >>> <colref linkend="connection_id"/> >>> - <unique/> >>> </index> >>> >>> >>> >>> >>> _______________________________________________ >>> sr-dev mailing list >>> [email protected] >>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev >> >> >> >> -- >> VoIP Embedded, Inc. >> http://www.voipembedded.com > > > > -- > VoIP Embedded, Inc. > http://www.voipembedded.com -- VoIP Embedded, Inc. http://www.voipembedded.com _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
