It's a wrapper. I'm updating and putting in a POD now. I'm also going to add an example of when this fails -- it seems mySQL clients < 4.00 are thread safe.
Update: Thanks gmax for pointing out why DBD::mysql clients can't fork for mysql version 4+, this node. For what it's worth, code to replicate this problem can be used here:
#! /usr/bin/perl use strict; use warnings; use DBI; my $conn = DBI->connect("DBI:mysql:database=db;host=localhost;", "user +", "password"); my $pid = fork; die ("No more resources") unless (defined $pid); my $query = "SELECT * FROM table"; my $result = $conn->prepare($query) or die ("Cannot prepare query. $!"); $result->execute or die ("Cannot execute query. $!");
In reply to Re: Re: Thread and Fork Safe DBI and DBD::mysql replacement
by Vautrin
in thread Thread and Fork Safe DBI and DBD::mysql replacement
by Vautrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |