Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.4
-
Fix Version/s: 10.4.4
-
Component/s: Data Definition - Alter Table, Data types
-
Labels:None
Description
Before MDEV-371, an attempt to add an unlimited (non-unique) index on a blob column caused an error, regardless the strictness of SQL_MODE:
create table t1 (f text); |
alter table t1 add index ind1 (f); |
10.3 dcdeb394 |
mysqltest: At line 2: query 'alter table t1 add index ind1 (f)' failed: 1170: BLOB/TEXT column 'f' used in key specification without a key length
|
Now instead it causes a warning, also regardless the strictness of SQL_MODE, and an index is created with automatically specified length:
10.4 c0ba036b |
alter table t1 add index ind1 (f);
|
Warnings:
|
Note 1071 Specified key was too long; max key length is 1000 bytes
|
show create table t1;
|
Table Create Table
|
t1 CREATE TABLE `t1` (
|
`f` text DEFAULT NULL,
|
KEY `ind1` (`f`(1000))
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
If the change is intentional, it needs to be documented somewhere.
Attachments
Issue Links
- is caused by
-
MDEV-371 Unique indexes for blobs
-
- Closed
-