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

SourceForge.net noreply at sourceforge.net
Tue Sep 8 12:49:15 CEST 2009


Bugs item #2851051, was opened at 2009-09-04 12:57
Message generated for change (Comment added) made by thomas_gelf
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: Open
Resolution: None
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: Thomas Gelf (thomas_gelf)
Date: 2009-09-08 12: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 14: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