MySQL Forums
Forum List  »  Perl

Re: Setting session/global variables using Perl DBI
Posted by: David Shrewsbury
Date: September 14, 2006 04:33PM

Pretty straight forward:

#!/usr/bin/perl -w
use DBI;
$dbh= DBI->connect("dbi:mysql:database=test;host=localhost", "", "")
  or die $dbh->errstr;

@a= $dbh->selectrow_array(q{select @@join_buffer_size});
print "\@\@join_buffer_size is $a[0]\n";

$dbh->do(q{set join_buffer_size=1024 * 1024});

@a= $dbh->selectrow_array(q{select @@join_buffer_size});
print "\@\@join_buffer_size is now $a[0]\n";

$dbh->disconnect;

-Dave

Options: ReplyQuote


Subject
Written By
Posted
Re: Setting session/global variables using Perl DBI
September 14, 2006 04:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.