1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix, or a workaround for Bug#19386 "Multiple alter causes crashed table"

The problem is that in a MyISAM table the following column
after a varchar field gets corrupted, if varchar field is
extended.

This should be made to work without a copy in the future, but
I'm not sure if this code is ready yet. This fix will force copy
in this case. It will not do any harm to have it here, only makes
alter table a bit slower in this case. If this should work for
MyISAM, then the bug is somewhere else in that code.

Until it works, I propose this as a temporary fix or a workaround.
Test case for the bug has been added.
This commit is contained in:
jani@a193-229-222-105.elisa-laajakaista.fi
2006-05-15 19:41:04 +03:00
parent 9c26c629a2
commit 3846438a9c
3 changed files with 25 additions and 1 deletions

View File

@ -647,3 +647,13 @@ SELECT LENGTH(s) FROM t1;
LENGTH(s)
10
DROP TABLE t1;
CREATE TABLE t1 (v VARCHAR(3), b INT);
INSERT INTO t1 VALUES ('abc', 5);
SELECT * FROM t1;
v b
abc 5
ALTER TABLE t1 MODIFY COLUMN v VARCHAR(4);
SELECT * FROM t1;
v b
abc 5
DROP TABLE t1;