[OpenSIPS-Devel] [ opensips-Bugs-2851051 ] db_does_uri_exist should respect use_uri_table

SourceForge.net noreply at sourceforge.net
Fri Sep 25 10:37:07 CEST 2009


Bugs item #2851051, was opened at 2009-09-04 13:57
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2851051&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Thomas Gelf (thomas_gelf)
Assigned to: Irina-Maria Stanescu (ironmissy)
Summary: db_does_uri_exist should respect use_uri_table

Initial Comment:
As I reduced OpenSIPS DB structure and DB permissions to an absolute
minimum, I noticed that db_does_uri_exist() throws the following error:

> ERROR:db_mysql:get_new_stmt_ctx: driver error: SELECT command denied
>                to user 'opensips'@'proxy.domain.tld' for table 'uri'
> ERROR:db_mysql:get_new_stmt_ctx: failed while mysql_stmt_prepare()
> ERROR:db_mysql:db_mysql_do_prepared_query: failed to create new context
> ERROR:uri:does_uri_exist: Error while querying database

However, my config says:

> modparam("uri", "use_uri_table", 0)

IMO queries against uri-table shall not be issued in this case. I'm
running OpenSIPS from current trunk, r6069.

Best regards,
Thomas Gelf


----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-09-25 11:37

Message:
I test by myself (uri module with use_uri_table on 0 and doing
does_uri_exist) and the mysql logs shows no attempt from Opensips to use
the URI table. Using trunk r6185.

Please update and if you still have the problem, post the mysql log also,
to see the query. Also check you cfg for double "use_uri_table" definition
;)

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Irina-Maria Stanescu (ironmissy)
Date: 2009-09-09 13:33

Message:
I still cannot reproduce the error. I tried to delete uri table, as you've
said and it does nothing. It behaves as it's supposed to, no matter what
configuration changes i make. Please provide some additional information.

Regards,
Irina Stanescu

----------------------------------------------------------------------

Comment By: Thomas Gelf (thomas_gelf)
Date: 2009-09-08 13:49

Message:
Try to delete your uri-table - that should help to reproduce the error. In
my case OpenSIPS has been granted a very restricted set of permissions,
therefore I got aware of this problem. I'm not saying the function isn't
working, but I guess it is issueing the SQL query against the uri-table
even with use_uri_table=0 - and probably later it decides to take results
from subscriber table.

The error itself is pretty clear, it says "SELECT command denied to user
'opensips'@'proxy.domain.tld' for table 'uri'" - this should never happen
with use_uri_table=0, even if the result may be as expected.

If you need additional information please let me know!

Best regards,
Thomas Gelf


----------------------------------------------------------------------

Comment By: Irina-Maria Stanescu (ironmissy)
Date: 2009-09-04 15:48

Message:
I need more information (maybe the entire log and the configuration file)
because i cannot reproduce this behavior.
I tried db_does_uri_exist and it works just fine using the default table
(subscriber, not uri). The only parameter needed is db_url.

Regards,
Irina Stanescu

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2851051&group_id=232389



More information about the Devel mailing list