I have been experiencing a small problem with altering a table, once it has been locked. If you alter a table (adding a column) while that table is locked, subsequent calls to that table result in MySQL erroring, saying the table was not locked.
I have reproduced this under Windows 2000, running the following versions of MySQL Server: 3.23.58-nt, 4.0.3-beta-nt, and 4.0.18-nt. (The bug does NOT show itself under any Linux versions.) Here is some code to demonstrate the problem: ------------------------------------------------------------- CREATE DATABASE IF NOT EXISTS locktest; USE locktest; DROP TABLE IF EXISTS locktest; CREATE TABLE locktest (a TINYINT, b TINYINT); LOCK TABLE locktest WRITE; INSERT INTO locktest SET a=1, b=2; ALTER TABLE locktest ADD c TINYINT; # This next line fails under Windows INSERT INTO locktest set a=2, b=3, c=4; UNLOCK TABLES; ---------------------------------------------------------------- All runs well, until the 2nd INSERT line, which returns with this message: ERROR 1100: Table 'locktest' was not locked with LOCK TABLES Has anyone else experienced this problem? (I can work around this by faking a locking mechanism of my own, but I would really rather not.) Thanks you, Seth -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]