List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:July 16 1999 4:26pm
Subject:Re: Lock Error Message
View as plain text  
Lee Soo Khoon wrote:
> 
> Hi there!
> 
> I have a the following lock error messsage which I don't understand what
> does it mean :
> 
> DBD::mysql::st execute failed: Table 'User' was not locked with LOCK
> TABLES at DB_Acct.pm line 2419.
> can't execute the query: DBI::st=HASH(0x8160ac8)->errstr
> 
> It breaks at the following code (which has been working fine) :
> 
>         $sql = "SELECT user_password, user_id FROM User
>                 WHERE user_name = '$user_name' ";
> 
>         $sql .= ($cookie eq "") ? "" : "AND cookie = '$cookie'";
> 
>         $sth = $dbh->prepare($sql)
>                 or die "Can't prepare $sql: $dbh->errstr\n";
> 
>         $rv = $sth->execute
>                 or die "can't execute the query: $sth->errstr\n";
> 
> Any advice is greatly appreciated.
> 
> Thanks,
> SK
> 
>

Not exactly sure, but the first thing I would check is if somebody else
has put a write lock on the table. Worst comes to worse, see if
restarting mysqld will help. 

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
Lock Error MessageLee Soo Khoon16 Jul
  • Re: Lock Error MessageSasha Pachev16 Jul
    • Re: Lock Error Messageelble16 Jul