Ticket #175 (new defect)

Opened 9 months ago

Column lengths incorrect using multi-byte charsets in MySQL

Reported by: ChrisBlackwell Owned by: dhughes
Type: defect Priority: highest
Milestone: 1.0 Release Component: Reactor - DAO
Version: Severity: major
Keywords: mysql utf8 field length Cc:

Description

There is a problem with the MySQL ObjectDAO when using multi-byte character sets, returning an incorrect length for the field. This causes validation errors with char, varchar and enum fields.

The readFields() method incorrectly uses CHARACTER_MAXIMUM_LENGTH when i believe it should use CHARACTER_OCTET_LENGTH.

From - http://dev.mysql.com/doc/refman/5.0/en/columns-table.html

CHARACTER_OCTET_LENGTH should be the same as CHARACTER_MAXIMUM_LENGTH, except for multi-byte character sets.

Attachments

ObjectDao.cfc (8.7 kB) - added by ChrisBlackwell 9 months ago.
updated mysql ObjectDAO

Change History

Changed 9 months ago by ChrisBlackwell

updated mysql ObjectDAO

Note: See TracTickets for help on using tickets.