1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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:
Sergei Golubchik
2017-04-03 17:18:37 +02:00
parent 30cbbfbf77
commit 82196f0131
10 changed files with 64 additions and 41 deletions

View File

@ -3949,7 +3949,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (key->type == Key::MULTIPLE)
{
/* not a critical problem */
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
ER_TOO_LONG_KEY,
ER_THD(thd, ER_TOO_LONG_KEY),
key_part_length);