The index on (server_id, connection_id) was made unique with this, but
that doesn't work for udp/sctp, where connection id is always 0,
resulting in duplicate pairs for this constraint. The <unique/>
constraint needs to be removed.
Daniel
On 01/03/16 08:52, Juha Heinanen wrote:
Module: kamailio
Branch: master
Commit: 4f9e0ffc7c320666de1d139658c6b645561e217d
URL:
https://github.com/kamailio/kamailio/commit/4f9e0ffc7c320666de1d139658c6b64…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2016-03-01T09:46:52+02:00
srdb1/schema: added connection_idx index to location table
---
Modified: lib/srdb1/schema/location.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/4f9e0ffc7c320666de1d139658c6b64…
Patch:
https://github.com/kamailio/kamailio/commit/4f9e0ffc7c320666de1d139658c6b64…
---
diff --git a/lib/srdb1/schema/location.xml b/lib/srdb1/schema/location.xml
index 698fcc0..07c8d58 100644
--- a/lib/srdb1/schema/location.xml
+++ b/lib/srdb1/schema/location.xml
@@ -179,7 +179,7 @@
<description>The value of reg-id contact parameter</description>
</column>
- <column>
+ <column id="server_id">
<name>server_id</name>
<type>int</type>
<size>11</size>
@@ -187,7 +187,7 @@
<description>The value of server_id from configuration
file</description>
</column>
- <column>
+ <column id="connection_id">
<name>connection_id</name>
<type>int</type>
<size>11</size>
@@ -228,6 +228,12 @@
<name>expires_idx</name>
<colref linkend="expires"/>
</index>
+ <index>
+ <name>connection_idx</name>
+ <colref linkend="server_id"/>
+ <colref linkend="connection_id"/>
+ <unique/>
+ </index>
</table>
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, Berlin, May 18-20, 2016 -
http://www.kamailioworld.com