HHH-11473 - Refactor MySQL Dialects

- MySQL56SpatialDialect can default to InnoDB by default
This commit is contained in:
Vlad Mihalcea 2017-02-21 08:09:07 +02:00
parent 91d1f38d95
commit c0e59563dc
2 changed files with 11 additions and 8 deletions

View File

@ -7,9 +7,6 @@
package org.hibernate.spatial.dialect.mysql;
import org.hibernate.dialect.InnoDBStorageEngine;
import org.hibernate.dialect.MySQLStorageEngine;
/**
* Spatial Dialect for MySQL 5.6 with InnoDB engine.
*
@ -20,9 +17,4 @@ import org.hibernate.dialect.MySQLStorageEngine;
@SuppressWarnings("deprecation")
public class MySQL56InnoDBSpatialDialect extends MySQL56SpatialDialect {
@Override
protected MySQLStorageEngine getDefaultMySQLStorageEngine() {
return InnoDBStorageEngine.INSTANCE;
}
}

View File

@ -15,7 +15,9 @@ import java.util.Map;
import org.hibernate.HibernateException;
import org.hibernate.boot.model.TypeContributions;
import org.hibernate.dialect.InnoDBStorageEngine;
import org.hibernate.dialect.MySQL55Dialect;
import org.hibernate.dialect.MySQLStorageEngine;
import org.hibernate.dialect.function.SQLFunction;
import org.hibernate.dialect.function.StandardSQLFunction;
import org.hibernate.service.ServiceRegistry;
@ -149,4 +151,13 @@ public class MySQL56SpatialDialect extends MySQL55Dialect implements SpatialDial
public boolean supports(SpatialFunction function) {
return dialectDelegate.supports( function );
}
/**
* MySQL 5.6 uses InnoDB by default.
* @return Default MySQL Storage Engine.
*/
@Override
protected MySQLStorageEngine getDefaultMySQLStorageEngine() {
return InnoDBStorageEngine.INSTANCE;
}
}