I am having problems with modifying an existing table in MySQL. When adding a new column, MySQL complains about indexing on an existing column. Here is what I am seeing:
mysql> CREATE TABLE test (name TINYTEXT, KEY(name(255)));
Query OK, 0 rows affected (0.08 sec)
mysql> ALTER TABLE test ADD name2 TINYTEXT;
ERROR 1170 (42000): BLOB/TEXT column 'name' used in key specification without a key length
What am I doing wrong? I already have a key length on the key specification, and I'm not changing it anyways.