Bug #8536 altering varchar columns after updateing from 4.0.x to 4.1.9

Submitted: 16 Feb 2005 9:53 Modified: 16 Feb 2005 14:50
Reporter: Antony Mandilas Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.1.9 OS:Windows (windows XP)
Assigned to: CPU Architecture:Any

[16 Feb 2005 9:53] Antony Mandilas
Description:
Trying to execute both the queries with change and modify i get the following error :

BLOB/TEXT column '...' used in key specification without a key length

How to repeat:
having a table t with a column t1 which is currently varchar try to execute the following.

ALTER TABLE t CHANGE t1 t1 BLOB;
[16 Feb 2005 13:28] Heikki Tuuri
Hi!

Only prefixes of BLOB columns can be used in indexes. Please see the MySQL manual.

Regards,

Heikki
[16 Feb 2005 13:33] Antony Mandilas
Yes ok, but i am not trying to use any index.

i just want to convert a column from varchar to Blob, actually i try to follow the instructions of updating Char columns from 4.0.x to 4.1.9.

Best regards
Antony
[16 Feb 2005 14:34] Heikki Tuuri
Ok,

I am reopening this bug. Please show what

SHOW CREATE TABLE ...

prints.

--Heikki
[16 Feb 2005 14:50] Heikki Tuuri
Hi!

I am able to change a VARCHAR to BLOB.

I am putting this bug report to the state Can't repeat.

regards,

Heikki

heikki@hundin:~/mysql-4.1/client> ./mysql test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.10-debug-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table t(a int not null primary key, b varchar(20)) type = innodb;
Query OK, 0 rows affected, 1 warning (0.11 sec)

mysql> insert into the values (10, 'jidhgjkdfidf');
ERROR 1146 (42S02): Table 'test.the' doesn't exist
mysql> insert into t values (10, 'jidhgjkdfidf');
Query OK, 1 row affected (0.00 sec)

mysql> alter table t change b b blob;
Query OK, 1 row affected (0.10 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql>

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.