Hello.

On Sun, Jun 10, 2001 at 02:56:45PM +0200, [EMAIL PROTECTED] wrote:
> I've got this php script which has three times now halted with this error 
> message:
> 
> SELECT * FROM eZSession_Session WHERE Hash=''
> Table 'eZSession_Session' was not locked with LOCK TABLES

Usually, one gets this error if one uses LOCK TABLES and uses a table
which was omitted in the LOCK statement. You have to lock _all_ tables
which you intend to use between LOCK and UNLOCK. The following is
quoted from http://www.mysql.com/doc/L/O/LOCK_TABLES.html:

----------------------------------------------------------------------
 When you use LOCK TABLES, you must lock all tables that you are going
to use and you must use the same alias that you are going to use in
your queries! If you are using a table multiple times in a query (with
aliases), you must get a lock for each alias! This policy ensures that
table locking is deadlock free and makes the locking code smaller,
simpler and much faster.
----------------------------------------------------------------------

> After this Apache or MySQL has to be restarted to get contact with the 
> database.

I am not sure, how this happens, but it seems like it is related to
persistent connections.

Bye,

        Benjamin.

> I do not understand why this message appears, I also have no locking
> code which locks the session table ( is this the reason ?)
>
> Any hints on why this may happen?

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to