[Kamailio-Devel] [ openser-Bugs-2033211 ] postgres queries overlapping

SourceForge.net noreply at sourceforge.net
Thu Nov 13 10:22:43 CET 2008


Bugs item #2033211, was opened at 2008-07-30 22:34
Message generated for change (Comment added) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2033211&group_id=139143

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: ver 1.3.x
Status: Closed
Resolution: Accepted
Priority: 5
Private: No
Submitted By: hjqlopez (hjqlopez)
Assigned to: Henning Westerholt (henningw)
Summary: postgres queries overlapping

Initial Comment:
When upgrading from 1.2.2 to 1.3.2. the log shows a postgres error because the DELETE query (delete from location where expires...) is overlapped with a previous INSERT in the accounting table.

I did some changes in postgres/dbase.c to always set the end of the string for pg_delete, pg_update, pg_query, as it is for pg_insert.  


*******The problem's log*******


Jul 29 13:06:01 localhost /usr/local/sbin/openser[4730]: WARNING:postgres:pg_get_result: 0x8193ef0 Probable invalid query

Jul 29 13:06:01 localhost /usr/local/sbin/openser[4730]: WARNING:postgres:pg_get_result: 0x8193ef0: PGRES_FATAL_ERROR

Jul 29 13:06:01 localhost /usr/local/sbin/openser[4730]: WARNING:postgres:pg_get_result: 0x8193ef0: ERROR:  syntax error at or near "_from" LINE 1: ...07-29 13:06:02' AND expires!='1969-12-31 19:00:00'_from,sip_...                                                              ^

Jul 29 13:06:01 localhost /usr/local/sbin/openser[4730]: WARNING:postgres:pg_delete: 0x8193ef0 Query: delete from location where expires<'2008-07-29 13:06:02' AND expires!='1969-12-31 19:00:00'_from,sip_to,i_uri,o_uri,from_uri,to_uri,username,domain,hunt,invite_time,ringing_time ) values ('INVITE','e5326044ad106ef2', ...



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

>Comment By: Henning Westerholt (henningw)
Date: 2008-11-13 09:22

Message:
Hi,

unfortunally this patch did not make it to the 1.3.3 release, as i merged
it a bit to late. But it will be in 1.3.4, that we will release next week.
Your patch was commited in this changeset to the 1.3 branch:
http://openser.svn.sourceforge.net/openser/?rev=4981&view=rev

Henning

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

Comment By: hjqlopez (hjqlopez)
Date: 2008-11-12 21:58

Message:
Hi,

I just updated to 1.3.3 and I found that the problem is still there and
the patch was not applied:

2008-11-12T13:40:09.726-05:00 linux /usr/local/sbin/openser[32088]:
ERROR:p
ostgres:pg_get_result: 0x81af6d0: ERROR:  syntax error at or near
"aller_cseq" L
INE 1: ...11-12 13:40:10' AND expires!='1969-12-31 19:00:00'aller_cseq...
                                                       ^
2008-11-12T13:40:09.726-05:00 linux /usr/local/sbin/openser[32088]:
WARNING
:postgres:pg_delete: 0x81af6d0 Query: delete from location where
expires<'2008-1
1-12 13:40:10' AND expires!='1969-12-31
19:00:00'aller_cseq,callee_cseq,caller_r
oute_set,callee_route_set,caller_contact,callee_contact,caller_sock,callee_sock
from dialog

Thanks,

HQ

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

Comment By: Henning Westerholt (henningw)
Date: 2008-09-23 16:35

Message:
Hi,

thanks for the report. I've commited your patch (after some merging) to
the 1.3 branch. The 1.4 branch and trunk is not affected, because of the DB
API changes. Here the null termination is already done.

Cheers,

Henning

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2033211&group_id=139143



More information about the Devel mailing list