[EMAIL PROTECTED] (Chip Turner) wrote:
>A one-line example of this can be tested by running the following in
>two shell windows:
>
>$ perl -MDBI -e 'my $dbh = DBI->connect("DBI:mysql:mysql", "yy", "xx"); 
>  my $sth = $dbh->prepare("SELECT GET_LOCK(\"mysql\", 5)"); $sth->execute;
>  my ($lock) = $sth->fetchrow; print "lock: $lock\n"; sleep 10'

Is there a reason not to use selectrow_array for locks?  

$ perl -MDBI -e 'my ($lock) = DBI->connect("DBI:mysql:mysql", "yy", "xx")
  ->selectrow_array("SELECT GET_LOCK(\"mysql\", 5)"); 
  print "lock: $lock\n"; sleep 10'


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  [EMAIL PROTECTED]                            The Math Forum


Reply via email to