K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / doc / libdbd-mysql-perl / examples /
server ip : 104.21.89.46

your ip : 172.69.59.10

H O M E


Filename/usr/share/doc/libdbd-mysql-perl/examples/bug14979.pl
Size789
Permissionrwxr-xr-x
Ownerroot : root
Create time27-Apr-2025 10:10
Last modified18-Oct-2013 03:23
Last accessed07-Jul-2025 02:16
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
#! /usr/bin/perl -wT

use strict;
use DBI();

MAIN: {
$ENV{'DBI_DSN'} ||= 'dbi:mysql:dbname=mysql:mysql_server_prepare=1';
$ENV{'DBI_USER'} ||= 'root';
$ENV{'DBI_PASS'} ||= '';
my ($dbh) = DBI->connect($ENV{DBI_DSN}, $ENV{DBI_USER}, $ENV{DBI_PASS}, {RaiseError => 1, PrintError => 0, AutoCommit => 0});
$dbh->trace(3,"bug14979.trace");
my ($sql) = qq[SELECT * FROM mysql.user WHERE user LIKE ?];
my ($sth) = $dbh->prepare($sql);
$sth->execute('foo');
$sth->finish();
my ($pid);
if ($pid = fork()) {
waitpid($pid, 0);
unless ($? == 0) {
die("Child failed to execute successfully\n");
}
} elsif (defined $pid) {
$dbh->{'InactiveDestroy'} = 1;
exit(0);
} else {
die("Failed to fork:$!\n");
}
$sth->execute('foo');
$sth->finish();
$dbh->disconnect();
}