[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1372) Support for MySQL5 new varchar length
Steve Ebersole (JIRA)
noreply at atlassian.com
Mon Mar 21 13:00:35 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-1372.
-------------------------------
Closing stale resolved issues
> Support for MySQL5 new varchar length
> -------------------------------------
>
> Key: HHH-1372
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1372
> Project: Hibernate Core
> Issue Type: New Feature
> Components: core
> Affects Versions: 3.1
> Environment: Hibernate 3, MySQL5
> Reporter: Marc Batchelor
> Assignee: Steve Ebersole
> Fix For: 3.1.2
>
>
> MySQL5 now supports varchars at 65535 characters. There should probably be a specific Mysql5 dialect to handle this difference between MySql4 and MySql5.
> The code change:
> The constructor currently has these lines for the VARCHAR type:
> ...
> registerColumnType( Types.VARCHAR, "longtext" );
> registerColumnType( Types.VARCHAR, 16777215, "mediumtext" );
> registerColumnType( Types.VARCHAR, 65535, "text" );
> registerColumnType( Types.VARCHAR, 255, "varchar($l)" );
> ...
> For MySql5, this section should look like this:
> ...
> registerColumnType( Types.VARCHAR, "longtext" ); //$NON-NLS-1$
> registerColumnType( Types.VARCHAR, 16777215, "mediumtext" ); //$NON-NLS-1$
> registerColumnType( Types.VARCHAR, 65535, "varchar($l)" ); //$NON-NLS-1$
> ...
> It would be pretty handy if the Dialect had an unRegisterColumnType. Then, MySQL5Dialect could subclass MySQLDialect. The constructor could call the super, then unregister the VARCHAR types and re-register 'em as desired. But that's another topic.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list