Bug #17820 Concurrency violation exception thrown when updating float and double columns
Submitted: 1 Mar 2006 9:40 Modified: 4 Apr 2006 8:12
Reporter: [ name withheld ] Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:1.0.7 OS:Windows (XP)
Assigned to: CPU Architecture:Any

[1 Mar 2006 9:40] [ name withheld ]
Description:
Connector doesn't update row containing float/double cell value. It produces query:

UPDATE `tabExample` SET `id`=1, `varFloat`=1.7, `varAny`='4' WHERE `id`<=>1 AND `varFloat`<=>2.3 AND `varAny`<=>'4' 

but should be:

UPDATE `tabExample` SET `id`=1, `varFloat`=1.7, `varAny`='4' WHERE `id`<=>1

How to repeat:
CREATE TABLE `tabExample` (
  `id` mediumint(8) unsigned NOT NULL default '0',
  `varFloat` float NOT NULL default '0',
  `varAny` varchar(5) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin2;

INSERT INTO `tabExample` VALUES (1, 2.3, '4');

and then try to update that row via connector.

Suggested fix:
CommandBuilder.cs line 339, exchange with:

if (true != (bool)row["IsKey"] && true != (bool)row["IsUnique"])
[4 Apr 2006 8:12] Tonci Grgin
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in MySQL.

Additional info:

This is a duplicate of 17344