<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I tried this one and it doesn't apply either. Is the right patch for
    master head?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 12/03/14 10:49, jay binks wrote:<br>
    </div>
    <blockquote
cite="mid:CAO47Hpcwy8wsY0iXwBuTPnnXCYiyepbXyfTGTxiws5ULmjxPqg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Sigh... seems my last patch was not against head...
        <div><br>
        </div>
        <div>new patch... git log..</div>
        <div>
          <div>commit 99d50e2da0753d7482ed2884e665e08e235daf5e</div>
          <div>Author: Jason Penton <<a moz-do-not-send="true"
              href="mailto:jason.penton@gmail.com">jason.penton@gmail.com</a>></div>
          <div>Date:   Mon Mar 10 19:49:39 2014 +0200</div>
        </div>
        <div><br>
        </div>
        <div>Sorry all ! </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On 12 March 2014 19:32, jay binks <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:jaybinks@gmail.com" target="_blank">jaybinks@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">I just explicitly testing this.
              <div><br>
              </div>
              <div>Results : </div>
              <div><br>
              </div>
              <div>A sane query, but table dosnt exist performed as
                expected :</div>
              <div><br>
              </div>
              <div>
                <div><span style="white-space:pre-wrap"> </span>avp_db_query("INSERT
                  INTO tablenothere ( KEY, added ) VALUES ( '$si', '$Ts'
                  );");</div>
                <div> 0(26936) ERROR: db_cassandra
                  [dbcassa_base.cpp:729]: db_cassa_raw_query(): Invalid
                  Request caused error details: unconfigured
                  columnfamily tablenothere.</div>
                <div><br>
                </div>
                <div>And insane query where its virtually just crap in a
                  statement also behaved well :</div>
                <div><br>
                </div>
                <div><span style="white-space:pre-wrap"> </span>avp_db_query("INSERT
                  INTO tablenothere ( idont enven K'now how to Sql");</div>
                <div> 0(26913) ERROR: db_cassandra
                  [dbcassa_base.cpp:729]: db_cassa_raw_query(): Invalid
                  Request caused error details: line 1:55 mismatched
                  character '<EOF>' expecting '''.</div>
              </div>
              <div><br>
              </div>
              <div>Id say the answer to your question is yes, my patch
                works as expected in this regard.</div>
              <div><br>
              </div>
              <div>Jay</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
            </div>
            <div class="gmail_extra">
              <div>
                <div class="h5">
                  <br>
                  <br>
                  <div class="gmail_quote">On 12 March 2014 19:27,
                    Daniel-Constantin Mierla <span dir="ltr"><<a
                        moz-do-not-send="true"
                        href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000">
                        <div> <br>
                          <div>On 12/03/14 10:16, jay binks wrote:<br>
                          </div>
                          <blockquote type="cite">
                            <div dir="ltr">In my test case I was doing
                              an INSERT query... 
                              <div>yet db_cassandra would complain there
                                was no result... ( both the log message
                                and return code )</div>
                            </div>
                          </blockquote>
                        </div>
                        In understand that and you are right here --
                        even select can have no result (but maybe is
                        setting some other fields there). What I want to
                        clarify is that in case of a query error (e.g.,
                        wrong statement or something happened with the
                        connection), is it detected? Not to behave like
                        it was all ok.<br>
                        <br>
                        Cheers,<br>
                        Daniel
                        <div>
                          <div><br>
                            <br>
                            <blockquote type="cite">
                              <div dir="ltr">
                                <div><br>
                                </div>
                                <div>This is the reason I provided the
                                  patch.</div>
                                <div><br>
                                </div>
                                <div>after a little more testing I have
                                  found that I get this log message :</div>
                                <div><br>
                                </div>
                                <div>0(23827) ERROR: <core>
                                  [db_res.c:130]: db_free_result():
                                  invalid parameter<br>
                                </div>
                                <div><br>
                                </div>
                                <div>So far in my testing everything has
                                  performed flawlessly, just with a few
                                  less log lines :)</div>
                                <div><br>
                                </div>
                                <div>in essence this patch simply makes
                                  db_cassandra act the same when there
                                  is no result set as it does when there
                                  are now rows.</div>
                                <div>( previously it would act like no
                                  result set was a big deal )</div>
                                <div><br>
                                </div>
                                <div>Jay</div>
                                <div><br>
                                </div>
                                <div><br>
                                </div>
                                <div><br>
                                </div>
                              </div>
                              <div class="gmail_extra"><br>
                                <br>
                                <div class="gmail_quote">On 12 March
                                  2014 18:49, Daniel-Constantin Mierla <span
                                    dir="ltr"><<a
                                      moz-do-not-send="true"
                                      href="mailto:miconda@gmail.com"
                                      target="_blank">miconda@gmail.com</a>></span>
                                  wrote:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin:0 0 0
                                    .8ex;border-left:1px #ccc
                                    solid;padding-left:1ex">
                                    <div bgcolor="#FFFFFF"
                                      text="#000000"> What would be the
                                      situation when the query is like
                                      SELECT but there is no result. Is
                                      the behaviour as expected with the
                                      new patch?<br>
                                      <br>
                                      Anyone here using cassandra having
                                      comments? From my point of view is
                                      no problem to push the patch, but
                                      I am not using cassandra, so
                                      cannot do a proper review.<br>
                                      <br>
                                      Cheers,<br>
                                      Daniel
                                      <div>
                                        <div><br>
                                          <br>
                                          <div>On 12/03/14 08:53, jay
                                            binks wrote:<br>
                                          </div>
                                        </div>
                                      </div>
                                      <blockquote type="cite">
                                        <div>
                                          <div>
                                            <div dir="ltr">If doing a
                                              query that returns no
                                              results ( Insert etc )
                                              <div><span
style="line-height:17.000099182128906px;font-size:13.333333969116211px;font-family:Arial,FreeSans,Helvetica,sans-serif">db_cassa_raw_query


                                                  would cause these
                                                  ERRORS to be logged</span>
                                                <div> <span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif"><br>
                                                  </span></div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif">0(22283)


                                                    ERROR: db_cassandra </span><span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif">[dbcassa_base.cpp:739]</span><span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif">:
                                                    db_cassa_raw_query():
                                                    The resultype rows
                                                    was not set, no
                                                    point trying to
                                                    parse result.</span><br
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif">
                                                  <span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif">0(22283)


                                                    ERROR: avpops </span><span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif">[avpops_db.c:333]</span><span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif">:
                                                    db_query_avp():
                                                    cannot do the query</span><br>
                                                </div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif"><br>
                                                  </span></div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13.333333969116211px;font-family:Arial,FreeSans,Helvetica,sans-serif">db_cassa_raw_query


                                                    would also return -1
                                                    as a failure code
                                                    which caused
                                                    avpops_db to log the
                                                    query failure.</span><br>
                                                </div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13.333333969116211px;font-family:Arial,FreeSans,Helvetica,sans-serif"><br>
                                                  </span></div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13.333333969116211px;font-family:Arial,FreeSans,Helvetica,sans-serif">my


                                                    patch changes the </span><span
style="line-height:17.000099182128906px;font-size:13.333333969116211px;font-family:Arial,FreeSans,Helvetica,sans-serif">db_cassa_raw_query


                                                    log message to debug
                                                    level, and returns
                                                    success from the
                                                    function.</span></div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13.333333969116211px;font-family:Arial,FreeSans,Helvetica,sans-serif"><br>
                                                  </span></div>
                                                <div><font
                                                    color="#000000"
                                                    face="Arial,
                                                    FreeSans, Helvetica,
                                                    sans-serif"><span
                                                      style="line-height:17.000099182128906px">I
                                                      had a quick look
                                                      to see if there
                                                      was an elegant way
                                                      to determine if we
                                                      should expect
                                                      results, so we can
                                                      vary the response
                                                      code based on
                                                      query type, but I
                                                      was unable to find
                                                      anything other
                                                      than doing string
                                                      comparisons on the
                                                      query, so I opted
                                                      to not bother with
                                                      this as it would
                                                      be erroneous.</span></font></div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13.333333969116211px;font-family:Arial,FreeSans,Helvetica,sans-serif"><br>
                                                  </span></div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13.333333969116211px;font-family:Arial,FreeSans,Helvetica,sans-serif">Please


                                                    find attached patch.</span></div>
                                                <div><span
style="line-height:17.000099182128906px;font-size:13px;font-family:Arial,FreeSans,Helvetica,sans-serif"><br>
                                                  </span></div>
                                                -- <br>
                                                Sincerely<br>
                                                <br>
                                                Jay </div>
                                            </div>
                                            <br>
                                            <fieldset></fieldset>
                                            <br>
                                          </div>
                                        </div>
                                        <pre>_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><span><font color="#888888">
</font></span></pre>
                                        <span><font color="#888888"> </font></span></blockquote>
                                      <span><font color="#888888"> <br>
                                          <pre cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference - April 2-4, 2014, Berlin, Germany
<a moz-do-not-send="true" href="http://www.kamailioworld.com" target="_blank">http://www.kamailioworld.com</a></pre>
                                        </font></span></div>
                                    <br>
_______________________________________________<br>
                                    sr-dev mailing list<br>
                                    <a moz-do-not-send="true"
                                      href="mailto:sr-dev@lists.sip-router.org"
                                      target="_blank">sr-dev@lists.sip-router.org</a><br>
                                    <a moz-do-not-send="true"
                                      href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev"
                                      target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
                                    <br>
                                  </blockquote>
                                </div>
                                <br>
                                <br clear="all">
                                <div><br>
                                </div>
                                -- <br>
                                Sincerely<br>
                                <br>
                                Jay </div>
                            </blockquote>
                            <br>
                            <pre cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference - April 2-4, 2014, Berlin, Germany
<a moz-do-not-send="true" href="http://www.kamailioworld.com" target="_blank">http://www.kamailioworld.com</a></pre>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <div><br>
                  </div>
                </div>
              </div>
              <span class="HOEnZb"><font color="#888888">-- <br>
                  Sincerely<br>
                  <br>
                  Jay
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        Sincerely<br>
        <br>
        Jay
      </div>
    </blockquote>
    <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 2-4, 2014, Berlin, Germany
<a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
  </body>
</html>