mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #11754461 CANNOT ALTER TABLE WHEN KEY PREFIX TOO LONG
The problem was that doing ALTER TABLE on a table which had a key on a TEXT/BLOB column with a prefix longer than the maximum number of characteres in this column (as per the character set), by mistake, caused an error (Error 1170 - ER_BLOB_KEY_WITHOUT_LENGTH). This bug not repeatable in 5.5. This patch adds a regression test to alter_table.test and contains no code changes.
This commit is contained in:
@ -1383,3 +1383,11 @@ ALTER TABLE t1 CHANGE a id INT;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11754461 CANNOT ALTER TABLE WHEN KEY PREFIX TOO LONG
|
||||
#
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
CREATE DATABASE db1 CHARACTER SET utf8;
|
||||
CREATE TABLE db1.t1 (bar TINYTEXT, KEY (bar(100)));
|
||||
ALTER TABLE db1.t1 ADD baz INT;
|
||||
DROP DATABASE db1;
|
||||
|
Reference in New Issue
Block a user