title: Spring is setting mysql dialect when using h2 dialect for test
body: <p>I'm doing some tests in Spring and I saw a strange thing.</p>
  
  <p>When I set datasource in <code>application.properties</code> like this</p>
  
  <pre><code>spring.datasource.url = jdbc:mysql://localhost:3306/test?useSSL=false
  spring.datasource.username = root
  spring.datasource.password = 123456
  spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
  </code></pre>
  
  <p>and use <code>@DataJpaTest</code> for setting H2 database for testings, the spring uses mysql dialect instead H2 dialect.</p>
  
  <p>Here is some lines of console</p>
  
  <pre><code>2018-08-22 14:42:53.881  INFO 852 --- [           main] beddedDataSourceBeanFactoryPostProcessor : Replacing 'dataSource' DataSource bean with embedded version
  2018-08-22 14:42:53.882  INFO 852 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'dataSource' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]] with [Root bean: class [org.springframework.boot.test.autoconfigure.jdbc.TestDatabaseAutoConfiguration$EmbeddedDataSourceFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  2018-08-22 14:42:54.066  INFO 852 --- [           main] o.s.j.d.e.EmbeddedDatabaseFactory        : Starting embedded database: url='jdbc:h2:mem:7ee61de9-3134-4b5e-93cb-02b1c11727ee;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=false', username='sa'
  2018-08-22 14:42:54.410  INFO 852 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
  2018-08-22 14:42:54.426  INFO 852 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [  name: default   ...]
  2018-08-22 14:42:54.479  INFO 852 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.2.17.Final}
  2018-08-22 14:42:54.480  INFO 852 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
  2018-08-22 14:42:54.510  INFO 852 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
  2018-08-22 14:42:54.605  INFO 852 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
  </code></pre>
  
  <p>I saw that <code>H2EmbeddedDatabaseConfigurer.java</code> of Spring does not set the dialect for H2 database.</p>
  
  <p>The test pass with no errors, but it's like that H2 was putted in mysql mode automatically.</p>
  
  <p>Is the same with derby and hsql databases. Someone can explain why this happen?</p>