List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:May 24 1999 4:23pm
Subject:Re: db locking
View as plain text  
Chris wrote:
> 
> I'm using php3 and have encountered the following problem: I am locking my
> mysql tables using 'lock tables' and would like to be able to unlock the
> tables if the user hits the stop button before my php script calls 'unlock
> tables'. Does anyone know the solution to this problem? Currently when
> this happens I have to manually kill the offending processes listed by
> 'show processlist'.
> 
> --Chris
> 

Can PHP trap signals? Trapping a signal would be the
only way to do something when the user hits the stop
button. If not, you have several options:

1) Hack PHP to add the signal trapping functionality.
Should not be super hard.
2) Do not lock the tables, and think of a some trick to
ensure table integrity
3) Use a language that can trap signals for the part of
the code in question. My understanding is that you can
load a shared library and  call C functions from PHP.

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
MySQL GUI client for KDESasha Pachev21 May
  • Re: MySQL GUI client for KDEVan22 May
    • Re: MySQL GUI client for KDEDr Eberhard W Lisse22 May
      • Re: MySQL GUI client for KDESirtaj Singh Kang22 May
        • Re: MySQL GUI client for KDEDr Eberhard W Lisse22 May
      • Re: MySQL GUI client for KDEOliver Artelt22 May
      • Re: MySQL GUI client for KDESasha Pachev22 May
      • Re: MySQL GUI client for KDEVivek Khera24 May
        • db lockingChris24 May
          • Re: db lockingSasha Pachev24 May
            • Re: db lockingStefan Möhl25 May
        • Re: MySQL GUI client for KDEDr Eberhard W Lisse24 May
          • Re: MySQL GUI client for KDEJon Gunnar Rue25 May
        • Re: MySQL GUI client for KDEDr Eberhard W Lisse24 May