Bug #14213 MYISAM Table Handler
Submitted: 21 Oct 2005 15:49 Modified: 15 Dec 2005 15:05
Reporter: zhou zhongjin Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.13 rc OS:Windows (Windows XP with sp2)
Assigned to: CPU Architecture:Any

[21 Oct 2005 15:49] zhou zhongjin
Description:
Create Table Table1 (F1 bit not null default 0,F2 char(200) not null default '') Engine=MyISAM default charset=latin1;
insert into table1 Values(0,'This is a new row for test');
update table1 set F1=1;

these three statements above are executed correctly. But if the F2 column of the table Table1 is changed to varchar(200), then update on F1 can not be completed.

alter table table1 modify column F2 varchar(200) not null default '';
update table1 set F1=0;

The last update statement is always ineffective on F1 when F2 is variable length column.

How to repeat:
Create Table Table1 (F1 bit not null default 0,F2 varchar(200) not null default '') Engine=MyISAM default charset=latin1;
insert into table1 Values(0,'This is a new row for test');
update table1 set F1=1; (ineffective statement)
[15 Dec 2005 15:05] Valeriy Kravchuk
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.

Additional info:

Thank you for a problem report. Looks like the problem if any, is solved in 5.0.15-nt already:

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.0.15-nt |
+-----------+
1 row in set (0.02 sec)

mysql> Create Table Table1 (F1 bit not null default 0,F2 varchar(200) not null d
efault '') engine=MyISAM default charset=latin1;
Query OK, 0 rows affected (0.15 sec)

mysql> insert into table1 Values(0,'This is a new row for test');
Query OK, 1 row affected (0.03 sec)

mysql> update table1 set F1=1;
Query OK, 1 row affected (0.04 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from table1;
+----+----------------------------+
| F1 | F2                         |
+----+----------------------------+
| ☺  | This is a new row for test |
+----+----------------------------+
1 row in set (0.02 sec)