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 <osas(a)voipembedded.com> 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 <jh(a)tutpro.com> wrote:
Module: kamailio
Branch: master
Commit: d72ac166b152ca6906248d67e2605d5b283fa01e
URL:
https://github.com/kamailio/kamailio/commit/d72ac166b152ca6906248d67e2605d5…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
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/d72ac166b152ca6906248d67e2605d5…
Patch:
https://github.com/kamailio/kamailio/commit/d72ac166b152ca6906248d67e2605d5…
---
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
sr-dev(a)lists.sip-router.org
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