HHH-13910 : MySQL57Dialect selected by automatic dialect resolution when using MySQL 8.0 database

(cherry picked from commit e1d2aecef7)
This commit is contained in:
Gail Badner 2020-03-26 21:02:44 -07:00 committed by gbadner
parent 5d51d48cea
commit 2574016f44
1 changed files with 8 additions and 0 deletions

View File

@ -349,6 +349,14 @@ public enum Database {
return new MySQL57Dialect();
}
}
else if ( majorVersion < 8) {
// There is no MySQL 6 or 7.
// Adding this just in case.
return new MySQL57Dialect();
}
else if ( majorVersion == 8 ) {
return new MySQL8Dialect();
}
return latestDialectInstance( this );
}