Re: [Spacewalk-devel] lock_web_contact never return with postgres

2011-12-09 Thread Jan Pazdziora
On Tue, Nov 29, 2011 at 05:42:38PM +0100, Michael Calmer wrote:
 
 after a little debugging I found out that the following function never return 
 in case of postgres is used:
 
 package RHN::DB::User;
 sub lock_web_contact()
 
 It stops at this query:
 
  'SELECT * FROM web_contact WHERE id = :user_id FOR UPDATE'
 
 It seems, that postgres support FOR UPDATE so I do not understand why it 
 does not work.
 
 http://www.postgresql.org/docs/9.0/static/sql-select.html#SQL-FOR-UPDATE-SHARE
 
 Maybe DBD:Pg has trouble with it?
 
   $sth-execute_h(user_id = $params{uid}); 
 does not return.
 
 Does somebody has an idea?

On my Spacewalk 1.6 on RHEL 5,

# perl -MRHN::User -e 'RHN::User-lock_web_contact(uid = 2);'

returns just fine. Can you try newer DBD::Pg or something?

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


[Spacewalk-devel] lock_web_contact never return with postgres

2011-11-29 Thread Michael Calmer
Hi,

after a little debugging I found out that the following function never return 
in case of postgres is used:

package RHN::DB::User;
sub lock_web_contact()

It stops at this query:

 'SELECT * FROM web_contact WHERE id = :user_id FOR UPDATE'

It seems, that postgres support FOR UPDATE so I do not understand why it 
does not work.

http://www.postgresql.org/docs/9.0/static/sql-select.html#SQL-FOR-UPDATE-SHARE

Maybe DBD:Pg has trouble with it?

  $sth-execute_h(user_id = $params{uid}); 
does not return.

Does somebody has an idea?

-- 
Regards

Michael Calmer

--
Michael Calmer
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (AG Nürnberg)


signature.asc
Description: This is a digitally signed message part.
___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel