Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.3(EOL)
-
None
Description
10.3.11-MariaDB-1 Debian buildd-unstable
|
|
MariaDB [st_forum]> create table test (a varchar(255), key(a)) engine = myisam;
|
Query OK, 0 rows affected, 1 warning (0.005 sec)
|
|
MariaDB [st_forum]> show create table test;
|
+-------+---------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+---------------------------------------------------------------------------------------------------------------------+
|
| test | CREATE TABLE `test` (
|
`a` varchar(255) DEFAULT NULL,
|
KEY `a` (`a`(250))
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 |
|
+-------+---------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.001 sec)
|
|
Update:
OK, not entirely silent apparently.. but warnings are nearly invisible.
varchar(255) is a common type.. why is it no longer possible to create indexes on it?
The warning / error also seems to be inconsistent, in alter table convert charset it appears to be an error.
IMO it should always be an error.
MariaDB [st_forum]> show warnings;
|
+---------+------+----------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------------------------+
|
| Warning | 1071 | Specified key was too long; max key length is 1000 bytes |
|
+---------+------+----------------------------------------------------------+
|
1 row in set (0.000 sec)
|