List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:October 8 1999 9:12pm
Subject:Re: finding AUTO_INCREMENT type from client side
View as plain text  
At 15:49, 19991008, Jim O'Quinn wrote:
>All newer databases will be created with AUTO_INC, but I've got a bunch
>of leagcy junk that I don't want to mess with.

OK.  Then I'd just keep a hash of all the old databases, and use that:

    # I'm assuming that this list is static, or at least growing
    # slowly enough that maintaining it won't be a problem.
    my %grandfathers = map { $_ => 1 } qw/old_one bass_ackwards/;

    ...

    if ($grandfathers{$dbname}) {
        # lock, select, update
    } else {
        # whew!  auto_increment saves the day
    }

Tim
Thread
finding AUTO_INCREMENT type from client sideJim O'Quinn7 Oct
  • Re: finding AUTO_INCREMENT type from client sideThimble Smith7 Oct
  • Re: finding AUTO_INCREMENT type from client sideJim O'Quinn7 Oct
    • Re: finding AUTO_INCREMENT type from client sideMichael Widenius8 Oct
  • Re: finding AUTO_INCREMENT type from client sideJim O'Quinn8 Oct
    • Re: finding AUTO_INCREMENT type from client sideThimble Smith8 Oct
  • Re: finding AUTO_INCREMENT type from client sideJim O'Quinn8 Oct
    • Re: finding AUTO_INCREMENT type from client sideThimble Smith8 Oct
    • Re: finding AUTO_INCREMENT type from client sideMichael Widenius10 Oct