1
0
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:
Jon Olav Hauglid
2011-02-21 12:30:08 +01:00
parent 95b4ff0081
commit f7a0b45f5a
2 changed files with 23 additions and 0 deletions

View File

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