Bug #43574 insert and update error with decimal data type in Entity Framework
Submitted: 11 Mar 2009 21:55 Modified: 3 Apr 2009 13:10
Reporter: Andreas Winkler Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:6.0.0.0 OS:Windows
Assigned to: CPU Architecture:Any
Tags: entity framework, provider

[11 Mar 2009 21:55] Andreas Winkler
Description:
If you use a culture - for eample german - in your system environment the update and insert command (with decimal data types for example) generated by the tokenizer throws the exception 'column count doesn't match value count at row 1'.

If the value to store in a decimal field is 0, the command will be executed successfully.

I guess, the error is caused by the different number formats for decimal,float etc. in german.

Thanks,

Andreas

How to repeat:
DROP TABLE IF EXISTS `sc`.`kundenauftrag`;
CREATE TABLE  `sc`.`kundenauftrag` (
  `AuftragsNr` int(11) NOT NULL AUTO_INCREMENT,
  `KundenNr` int(11) NOT NULL DEFAULT 0,
  `Rechnungswert` decimal(19,2) NOT NULL DEFAULT '0.00',
  `Position` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`AuftragsNr`,`Position`) USING BTREE,
  KEY `KundenNr` (`KundenNr`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci;
[1 Apr 2009 0:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/70980
[1 Apr 2009 0:52] Reggie Burnett
fixed in 6.0.1
[3 Apr 2009 13:10] Tony Bedford
An entry was added to the 6.0.1 changelog:

An insert and update error was generated by the decimal data type in the Entity Framework, when a German collation was used.
[24 Apr 2009 12:45] Gert Brigsted
This bug still exists for me. I'm from Denmark, and I'm currently using utf-8 on the database. Why not simply replace all numerical commas with dots when building the sql?
[2 Jul 2009 15:01] Julio Martinez
This bug still exists for me. I'm from Spain, with DECIMAL data type the connector work fine, but with DOUBLE data type the connector 
throws the exception 'column count doesn't match value count at row 1'.
[23 Jul 2009 7:53] Tonci Grgin
Due to server being down I can not check on patch and confirm Bug#44455 is actually regression but it might be.