mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-11995 ALTER TABLE proceeds despite reporting ER_TOO_LONG_KEY error
automatic shortening of a too-long non-unique key should be not a warning, but a note. It's a normal optimization, doesn't affect correctness, and should never be converted to an error, no matter how strict sql_mode is.
This commit is contained in:
13
mysql-test/suite/innodb/r/alter_table.result
Normal file
13
mysql-test/suite/innodb/r/alter_table.result
Normal file
@ -0,0 +1,13 @@
|
||||
set @@sql_mode=strict_trans_tables;
|
||||
create table t1(a text not null) row_format=dynamic engine=innodb;
|
||||
create index idx1 on t1(a(3073));
|
||||
Warnings:
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` text NOT NULL,
|
||||
KEY `idx1` (`a`(3072))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
drop table t1;
|
||||
set @@sql_mode=default;
|
Reference in New Issue
Block a user