rm -rf 86725 bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/86725 -v bin/mysqld --basedir=$PWD --datadir=$PWD/86725 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/86725/log.err 2>&1 & -- 5.7.18 [1] 30648 [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-advanced-5.7.18: bin/mysql -uroot -S /tmp/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.18-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> set sql_mode=''; Query OK, 0 rows affected, 1 warning (0.00 sec) root@localhost [(none)]> create database test; Query OK, 1 row affected (0.00 sec) root@localhost [(none)]> use test Database changed root@localhost [test]> CREATE TABLE `test` ( -> `col_ttext` TINYTEXT -> ) ENGINE=MyISAM DEFAULT CHARSET=ujis; Query OK, 0 rows affected (0.01 sec) root@localhost [test]> ALTER TABLE `test` ADD KEY `col_ttext` (`col_ttext`(255)); Query OK, 0 rows affected, 1 warning (0.01 sec) Records: 0 Duplicates: 0 Warnings: 1 root@localhost [test]> show warnings; +---------+------+---------------------------------------------------------+ | Level | Code | Message | +---------+------+---------------------------------------------------------+ | Warning | 1071 | Specified key was too long; max key length is 255 bytes | +---------+------+---------------------------------------------------------+ 1 row in set (0.00 sec) root@localhost [test]> SHOW INDEX FROM `test`; +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | test | 1 | col_ttext | 1 | col_ttext | A | NULL | 85 | NULL | YES | BTREE | | | +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ 1 row in set (0.00 sec) root@localhost [test]> ALTER TABLE `test` DROP KEY `col_ttext`; Query OK, 0 rows affected (0.00 sec) Records: 0 Duplicates: 0 Warnings: 0 root@localhost [test]> ALTER TABLE `test` ADD UNIQUE KEY `col_ttext` (`col_ttext`(255)); ERROR 1071 (42000): Specified key was too long; max key length is 255 bytes root@localhost [test]> root@localhost [test]> -- 5.7.16 rm -rf 86725 bin/mysqld --initialize-insecure --basedir=$PWD --datadir=$PWD/86725 -v bin/mysqld --basedir=$PWD --datadir=$PWD/86725 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/86725/log.err 2>&1 & [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-advanced-5.7.16-linux-glibc2.5-x86_64: bin/mysql -uroot -S /tmp/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.16-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. root@localhost [(none)]> set sql_mode=''; Query OK, 0 rows affected, 1 warning (0.00 sec) root@localhost [(none)]> create database test; Query OK, 1 row affected (0.00 sec) root@localhost [(none)]> use test Database changed root@localhost [test]> CREATE TABLE `test` (`col_ttext` TINYTEXT) ENGINE=MyISAM DEFAULT CHARSET=ujis; Query OK, 0 rows affected (0.00 sec) root@localhost [test]> ALTER TABLE `test` ADD KEY `col_ttext` (`col_ttext`(255)); Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0 root@localhost [test]> SHOW INDEX FROM `test`; +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | test | 1 | col_ttext | 1 | col_ttext | A | NULL | 255 | NULL | YES | BTREE | | | +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ 1 row in set (0.00 sec) root@localhost [test]> ALTER TABLE `test` DROP KEY `col_ttext`; Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0 root@localhost [test]> ALTER TABLE `test` ADD UNIQUE KEY `col_ttext` (`col_ttext`(255)); Query OK, 0 rows affected (0.00 sec) Records: 0 Duplicates: 0 Warnings: 0 root@localhost [test]> SHOW INDEX FROM `test`; +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ | test | 0 | col_ttext | 1 | col_ttext | A | NULL | 255 | NULL | YES | BTREE | | | +-------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+ 1 row in set (0.00 sec) root@localhost [test]>