//再用默认的数据库参数
if (data.tableEngine == null) {
data.tableEngine = database.getTableEngineName();
}
if (data.tableEngine != null) {
TableEngine engine = TableEngineManager.getTableEngine(data.tableEngine);
if (engine == null) {
try {
engine = (TableEngine) Utils.loadUserClass(data.tableEngine).newInstance();
TableEngineManager.registerTableEngine(engine);
} catch (Exception e) {
throw DbException.convert(e);
}
}
return engine.createTable(data);
}
throw DbException.convert(new NullPointerException("table engine is null"));
}
}