vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r21525: LJSUP-11618: Fetch a groupmask of friend...

Committer: vad
LJSUP-11618: Fetch a groupmask of friend's relation from GC master
U   trunk/cgi-bin/ljrelation.pl
Modified: trunk/cgi-bin/ljrelation.pl
===================================================================
--- trunk/cgi-bin/ljrelation.pl	2012-03-22 15:15:53 UTC (rev 21524)
+++ trunk/cgi-bin/ljrelation.pl	2012-03-22 18:24:02 UTC (rev 21525)
@@ -80,10 +80,10 @@
     my $memkey = [$jid,"frgmask:$jid:$fid"];
     my $mask = LJ::MemCache::get($memkey);
     unless (defined $mask) {
-        my $dbr = LJ::get_db_reader();
-        die "No database reader available" unless $dbr;
+        my $dbw = LJ::get_db_writer();
+        die "No database reader available" unless $dbw;
 
-        $mask = $dbr->selectrow_array("SELECT groupmask FROM friends ".
+        $mask = $dbw->selectrow_array("SELECT groupmask FROM friends ".
                                       "WHERE userid=? AND friendid=?",
                                       undef, $jid, $fid);
         LJ::MemCache::set($memkey, $mask+0, time()+60*15);

Tags: livejournal, pl, vad, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments