At 14:45 +0100 1/5/03, [EMAIL PROTECTED] wrote:
  >Description:
	A SELECT statement fails if you have table aliases and use
	table locking with the LOCK command
This is not a bug.  It's documented in the manual that you must lock
all the tables at once that you intend to use, *including* locking
any aliases for those tables that you'll use.

  >How-To-Repeat:
	DROP TABLE IF EXISTS CK1;
         CREATE TABLE CK1 (
           ID INT UNSIGNED NOT NULL,
           PRIMARY KEY(ID)
         );
         LOCK TABLES CK1 READ; # you must have locking privileges
         SELECT * FROM CK1; # works
         SELECT * FROM CK1 AS SOME_ALIAS; # fails, error 1100: Table
'SOME_ALIAS' was not locked with LOCK TABLES
         UNLOCK TABLES;
Fix:
	Do not check for aliases, but for table names.
sql, query

---------------------------------------------------------------------
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