<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 4/8/13 7:13 PM, Ross Kusler wrote:<br>
</div>
<blockquote
cite="mid:2D2C5E725FD77F4E856395362B9344B210363406@mbx-w1-ca-2"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:974874755;
        mso-list-type:hybrid;
        mso-list-template-ids:-856103832 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> We noticed an issue with a
bunch of stale entries in the mysql location table recently –
all for the same user. It turns out that if you install
linphone 2.0.2 on an iOS device (other versions/platforms
might also be affected) with the transport mode set to TCP and
the ‘Push Notification’ feature enabled, the client generates
<u>very</u> long contact (258+ character) headers. The
contact column in the location table is varchar(255), anything
longer than this automatically gets truncated upon insert.
When the entry later expires and usrloc tries to remove it, it
generates a delete query that matches on the <u>entire</u>
contact value and not the truncated version. This causes the
delete query to fail and the usrloc record gets left behind in
the location table.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The (truncated) contact header value from
the database:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt"><a class="moz-txt-link-freetext" href="sip:22448462@98.248.37.244:52008;transport=tcp;app-id=org.linphone.phone.prod;pn-type=apple;pn-tok=AA31DC9642E76E7D7DA8A0E419B210E1A00E8DF43A7A77C8CD2955291E1BAC85;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf;line=">sip:22448462@98.248.37.244:52008;transport=tcp;app-id=org.linphone.phone.prod;pn-type=apple;pn-tok=AA31DC9642E76E7D7DA8A0E419B210E1A00E8DF43A7A77C8CD2955291E1BAC85;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf;line=</a><span
style="color:red">932257155</span><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The failed delete query:. <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:8.0pt">delete from
location where username='XXXXXXXX' AND
contact='<a class="moz-txt-link-freetext" href="sip:XXXXXXXX@11.22.333">sip:XXXXXXXX@11.22.333</a>.
44:52000;transport=tcp;app-id=org.linphone.phone.prod;pn-type=apple;pn-tok=AA31DC9642E76E7D7DA8A0E419B210E1A00E8DF43A7A77C8CD2955291E1BAC85;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf;line=<span
style="color:red">932257155<u>f64767</u>' </span>AND
callid='1962857815';<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What do you all think the best solution
here is? My intuition is to simply increase the size of this
column. If this is the right approach then it probably also
makes sense to update the .sql file for new installs.
Thoughts?</p>
</div>
</blockquote>
increasing the column is the solution, indeed. But I guess the db
index on contact column will not work anymore, iirc, text indexes
could be done on varchars (or strings up to 256 chars).<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
- <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
</body>
</html>