Bug #3116 | Windows bug with ALTER TABLE and LOCK | ||
---|---|---|---|
Submitted: | 9 Mar 2004 8:07 | Modified: | 27 Sep 2008 12:25 |
Reporter: | Miguel Solorzano | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.18 | OS: | Windows (Windows 2k/XP) |
Assigned to: | Konstantin Osipov | CPU Architecture: | Any |
[9 Mar 2004 8:07]
Miguel Solorzano
[11 Mar 2004 15:01]
Michael Widenius
This is an effect of the fact that windows doesn't allow one to drop a file that is in use. To go around this problem, MySQL will, on Windows, unlock any table that you do ALTER TABLE on. We may try to fix this in the future, but this doesn't have a high priority.
[27 Sep 2008 9:53]
Konstantin Osipov
Needs to be re-verified against current 6.0, where we implemented LOCK TABLES mode differently.
[27 Sep 2008 12:25]
MySQL Verification Team
Not repeatable on 6.0: c:\dbs>c:\dbs\6.0\bin\mysql -uroot --port=3600 --prompt="mysql 6.0 > " Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 6.0.8-alpha-nt-debug-log Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql 6.0 > CREATE DATABASE IF NOT EXISTS locktest; Query OK, 1 row affected (0.02 sec) mysql 6.0 > USE locktest; Database changed mysql 6.0 > DROP TABLE IF EXISTS locktest; Query OK, 0 rows affected, 1 warning (0.06 sec) mysql 6.0 > CREATE TABLE locktest (a TINYINT, b TINYINT); Query OK, 0 rows affected (0.09 sec) mysql 6.0 > LOCK TABLE locktest WRITE; Query OK, 0 rows affected (0.00 sec) mysql 6.0 > INSERT INTO locktest SET a=1, b=2; Query OK, 1 row affected (0.08 sec) mysql 6.0 > ALTER TABLE locktest ADD c TINYINT; Query OK, 1 row affected (0.16 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql 6.0 > INSERT INTO locktest set a=2, b=3, c=4; Query OK, 1 row affected (0.02 sec) mysql 6.0 >